Skip to content

Commit 07f6c19

Browse files
committed
feat(ts-interface-generator)!: prepare for TypeScript 6/7
Cap TypeScript peer dependency at <7.0.0 since the Go-based TS7 has no JavaScript compiler API that this tool relies on. Modernize tsconfig settings from deprecated options (moduleResolution: "node", target: "es6", module: "commonjs") to their modern equivalents (node16, es2022) to avoid hard errors in TypeScript 6.
1 parent d62ede0 commit 07f6c19

6 files changed

Lines changed: 40 additions & 40 deletions

File tree

‎packages/ts-interface-generator/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"yargs": "18.0.0"
5555
},
5656
"peerDependencies": {
57-
"typescript": ">=5.2.0"
57+
"typescript": ">=5.2.0 <7.0.0"
5858
},
5959
"files": [
6060
"dist"

‎packages/ts-interface-generator/tsconfig-testcontrol.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"compilerOptions": {
33
"rootDirs": ["./src/test/samples/sampleControl"],
44
"outDir": "./src/test/dist",
5-
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */,
6-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
7-
"sourceMap": true /* Generates corresponding '.map' file. */,
8-
"strict": true /* Enable all strict type-checking options. */,
9-
"strictNullChecks": false /* Enable strict null checks. */,
10-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
11-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
12-
"skipLibCheck": true /* Skip type checking of declaration files. */,
13-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
5+
"target": "es2022",
6+
"module": "node16",
7+
"sourceMap": true,
8+
"strict": true,
9+
"strictNullChecks": false,
10+
"moduleResolution": "node16",
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"forceConsistentCasingInFileNames": true
1414
},
1515
"include": ["./src/test/samples/sampleControl/**/*"]
1616
}

‎packages/ts-interface-generator/tsconfig-testmanagedobject.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"compilerOptions": {
33
"rootDirs": ["./src/test/samples/sampleManagedObject"],
44
"outDir": "./src/test/dist",
5-
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */,
6-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
7-
"sourceMap": true /* Generates corresponding '.map' file. */,
8-
"strict": true /* Enable all strict type-checking options. */,
9-
"strictNullChecks": false /* Enable strict null checks. */,
10-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
11-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
12-
"skipLibCheck": true /* Skip type checking of declaration files. */,
13-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
5+
"target": "es2022",
6+
"module": "node16",
7+
"sourceMap": true,
8+
"strict": true,
9+
"strictNullChecks": false,
10+
"moduleResolution": "node16",
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"forceConsistentCasingInFileNames": true
1414
},
1515
"include": ["./src/test/samples/sampleManagedObject/**/*"]
1616
}

‎packages/ts-interface-generator/tsconfig-tests.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"compilerOptions": {
33
"rootDirs": ["./src/test"],
44
"outDir": "./src/test/dist",
5-
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */,
6-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
7-
"sourceMap": true /* Generates corresponding '.map' file. */,
8-
"strict": true /* Enable all strict type-checking options. */,
9-
"strictNullChecks": false /* Enable strict null checks. */,
10-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
11-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
12-
"skipLibCheck": true /* Skip type checking of declaration files. */,
13-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
5+
"target": "es2022",
6+
"module": "node16",
7+
"sourceMap": true,
8+
"strict": true,
9+
"strictNullChecks": false,
10+
"moduleResolution": "node16",
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"forceConsistentCasingInFileNames": true
1414
},
1515
"include": ["./src/test/**/*"]
1616
}

‎packages/ts-interface-generator/tsconfig-testwebcomponent.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"compilerOptions": {
33
"rootDirs": ["./src/test/samples/sampleWebComponent"],
44
"outDir": "./src/test/dist",
5-
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */,
6-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */,
7-
"sourceMap": true /* Generates corresponding '.map' file. */,
8-
"strict": true /* Enable all strict type-checking options. */,
9-
"strictNullChecks": false /* Enable strict null checks. */,
10-
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
11-
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
12-
"skipLibCheck": true /* Skip type checking of declaration files. */,
13-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
5+
"target": "es2022",
6+
"module": "node16",
7+
"sourceMap": true,
8+
"strict": true,
9+
"strictNullChecks": false,
10+
"moduleResolution": "node16",
11+
"esModuleInterop": true,
12+
"skipLibCheck": true,
13+
"forceConsistentCasingInFileNames": true
1414
},
1515
"include": ["./src/test/samples/sampleWebComponent/**/*"]
1616
}

‎packages/ts-interface-generator/tsconfig.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"compilerOptions": {
33
"rootDir": "./src",
44
"outDir": "dist",
5-
"target": "es6",
6-
"module": "commonjs",
5+
"target": "es2022",
6+
"module": "node16",
77
"sourceMap": true,
88
"strict": true,
99
"strictNullChecks": false,
10-
"moduleResolution": "node",
10+
"moduleResolution": "node16",
1111
"esModuleInterop": true,
1212
"skipLibCheck": true,
1313
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)