Skip to content

Commit 02c2069

Browse files
authored
update test pack to TS 5.2 (#1633)
* feat: ts 5.2 * chore: rename * feat: update * fix: lint * fix: test * fix: run on 5.2.2 * chore: shrink test matrix and move to node 20 * feat: narrow matrix further
1 parent d13d9c3 commit 02c2069

File tree

1,341 files changed

+360
-337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,341 files changed

+360
-337
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module.exports = {
3030
'@typescript-eslint/no-unused-vars': 'off',
3131
// '@typescript-eslint/explicit-function-return-type': 'off',
3232
// '@typescript-eslint/no-namespace': 'off' // maybe we should consider enabling it in the future
33+
'@typescript-eslint/consistent-type-imports': 'error', // the replacement of "importsNotUsedAsValues": "error"
3334
},
3435
},
3536
],

.github/workflows/push.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ jobs:
4848
name: Execution Tests Ubuntu
4949
strategy:
5050
matrix:
51-
node: [18, 16]
52-
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, 4.4.2, 4.5.2, 4.6.2, 4.7.3, 4.8.2, 4.9.3, 5.0.4, 5.1.3, next]
51+
node: [18, 20]
52+
ts: [4.4.2, 4.5.2, 4.6.2, 4.7.3, 4.8.2, 4.9.3, 5.0.4, 5.1.3, 5.2.2, next]
5353
runs-on: ubuntu-latest
5454
steps:
5555
- uses: actions/checkout@v3
@@ -75,8 +75,8 @@ jobs:
7575
name: Execution Tests Windows
7676
strategy:
7777
matrix:
78-
node: [18, 16]
79-
ts: [3.8.3, 3.9.3, 4.0.3, 4.1.5, 4.2.4, 4.3.2, 4.4.2, 4.5.2, 4.6.2, 4.7.3, 4.8.2, 4.9.3, 5.0.4, 5.1.3, next]
78+
node: [18, 20]
79+
ts: [4.4.2, 4.5.2, 4.6.2, 4.7.3, 4.8.2, 4.9.3, 5.0.4, 5.1.3, 5.2.2, next]
8080
runs-on: windows-latest
8181
steps:
8282
- uses: actions/checkout@v3

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"@types/micromatch": "^4.0.0",
6464
"@types/node": "*",
6565
"@types/semver": "^7.3.4",
66-
"@typescript-eslint/eslint-plugin": "^5.0.0",
67-
"@typescript-eslint/parser": "^5.0.0",
66+
"@typescript-eslint/eslint-plugin": "^6.0.0",
67+
"@typescript-eslint/parser": "^6.0.0",
6868
"babel": "^6.0.0",
6969
"babel-core": "^6.0.0",
7070
"babel-loader": "^7.0.0",
@@ -93,7 +93,7 @@
9393
"mocha": "^6.0.0",
9494
"prettier": "^2.0.5",
9595
"rimraf": "^2.6.2",
96-
"typescript": "^5.1.3",
96+
"typescript": "^5.2.2",
9797
"webpack": "^5.74.0",
9898
"webpack-cli": "^4.10.0"
9999
},

src/after-compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as webpack from 'webpack';
44

55
import * as constants from './constants';
66
import { getEmitFromWatchHost, getEmitOutput } from './instances';
7-
import {
7+
import type {
88
FilePathKey,
99
LoaderOptions,
1010
TSFiles,

src/compilerSetup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as semver from 'semver';
22
import type * as typescript from 'typescript';
33

4-
import { LoaderOptions } from './interfaces';
5-
import * as logger from './logger';
4+
import type { LoaderOptions } from './interfaces';
5+
import type * as logger from './logger';
66

77
export function getCompiler(loaderOptions: LoaderOptions, log: logger.Logger) {
88
let compiler: typeof typescript | undefined;

src/config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Chalk } from 'chalk';
1+
import type { Chalk } from 'chalk';
22
import * as path from 'path';
33
import type * as typescript from 'typescript';
4-
import * as webpack from 'webpack';
4+
import type * as webpack from 'webpack';
55

66
import { getCompilerOptions } from './compilerSetup';
7-
import { LoaderOptions } from './interfaces';
8-
import * as logger from './logger';
7+
import type { LoaderOptions } from './interfaces';
8+
import type * as logger from './logger';
99
import { formatErrors, useCaseSensitiveFileNames } from './utils';
1010

1111
interface ConfigFile {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
initializeInstance,
1313
reportTranspileErrors,
1414
} from './instances';
15-
import {
15+
import type {
1616
FilePathKey,
1717
LoaderOptions,
1818
LoaderOptionsCache,

src/instance-cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as webpack from 'webpack';
2-
import { TSInstance } from './interfaces';
1+
import type * as webpack from 'webpack';
2+
import type { TSInstance } from './interfaces';
33

44
// Some loaders (e.g. thread-loader) will set the _compiler property to undefined.
55
// We can't use undefined as a WeakMap key as it will throw an error at runtime,

src/instances.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
tsTsxRegex,
1515
} from './constants';
1616
import { getTSInstanceFromCache, setTSInstanceInCache } from './instance-cache';
17-
import { FilePathKey, LoaderOptions, TSFiles, TSInstance } from './interfaces';
17+
import type { FilePathKey, LoaderOptions, TSFiles, TSInstance } from './interfaces';
1818
import * as logger from './logger';
1919
import {
2020
getSolutionErrors,

src/interfaces.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type * as typescript from 'typescript';
22

3-
import { Chalk } from 'chalk';
4-
import * as logger from './logger';
3+
import type { Chalk } from 'chalk';
4+
import type * as logger from './logger';
55

66
export interface ErrorInfo {
77
code: number;

0 commit comments

Comments
 (0)