Skip to content

Commit c86a11c

Browse files
chore: update typescript (#4725)
1 parent 4f415db commit c86a11c

File tree

8 files changed

+341
-173
lines changed

8 files changed

+341
-173
lines changed

package-lock.json

Lines changed: 315 additions & 160 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"css-loader": "^7.1.2",
6666
"del-cli": "^7.0.0",
6767
"eslint": "^9.29.0",
68-
"eslint-config-webpack": "^4.5.0",
68+
"eslint-config-webpack": "^4.9.5",
6969
"execa": "^9.6.1",
7070
"get-port": "^7.1.0",
7171
"husky": "^9.1.4",
@@ -80,7 +80,7 @@
8080
"ts-jest": "^29.0.1",
8181
"ts-loader": "^9.3.1",
8282
"ts-node": "^10.9.1",
83-
"typescript": "^5.0.4",
83+
"typescript": "^6.0.2",
8484
"webpack": "^5.105.4",
8585
"webpack-bundle-analyzer": "^5.1.0",
8686
"webpack-dev-server": "^5.1.0"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"outDir": "lib",
5-
"rootDir": "src"
4+
"outDir": "./lib",
5+
"rootDir": "./src"
66
},
77
"include": ["./src"]
88
}

test/build/config-format/disable-interpret/disable-interpret.test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ const { run } = require("../../../utils/test-utils");
66
describe("webpack cli", () => {
77
it('should work with the "disable-interpret" option from flags', async () => {
88
const configFileName = "webpack.config";
9-
const configFilePath = resolve(__dirname, `${configFileName}.ts`);
109
const { execa } = await import("execa");
11-
const buildScripts = await execa("yarn", ["tsc", configFilePath]);
12-
expect(buildScripts.stdout).toBeTruthy();
10+
11+
await execa("tsc", [], { cwd: __dirname });
1312

1413
const { exitCode, stderr, stdout } = await run(__dirname, ["--disable-interpret"]);
1514
unlinkSync(resolve(__dirname, `${configFileName}.js`));
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs"
3+
"types": ["node"],
4+
"module": "CommonJS",
5+
"target": "ES2022",
6+
"esModuleInterop": true,
7+
"skipLibCheck": true,
8+
"ignoreDeprecations": "6.0"
49
}
510
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
{
22
"compilerOptions": {
3+
"types": ["node"],
34
"target": "esnext",
5+
"module": "commonjs",
6+
"moduleResolution": "bundler",
47
"allowImportingTsExtensions": true,
58
"rewriteRelativeImportExtensions": true,
6-
"module": "commonjs"
9+
"erasableSyntaxOnly": true,
10+
"strict": true
711
}
812
}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"compilerOptions": {
3+
"types": ["node"],
34
"target": "esnext",
5+
"module": "nodenext",
6+
"moduleResolution": "bundler",
47
"allowImportingTsExtensions": true,
58
"rewriteRelativeImportExtensions": true,
6-
"module": "esnext"
9+
"verbatimModuleSyntax": true,
10+
"erasableSyntaxOnly": true,
11+
"strict": true
712
}
813
}

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"exclude": ["node_modules", "lib"],
33
"files": [],
44
"compilerOptions": {
5+
"types": ["node"],
56
"lib": ["es2023"],
67
"module": "nodenext",
78
"target": "ES2022",
@@ -14,10 +15,9 @@
1415
"allowSyntheticDefaultImports": true,
1516

1617
"rootDir": ".",
17-
"outDir": "lib",
18-
"baseUrl": ".",
18+
"outDir": "./lib",
1919
"paths": {
20-
"@webpack-cli/*": ["packages/*/src"]
20+
"@webpack-cli/*": ["./packages/*/src"]
2121
},
2222
"isolatedModules": true,
2323
"composite": true,

0 commit comments

Comments
 (0)