Skip to content

Commit 53e421a

Browse files
committed
build: migrate tsconfigs off options deprecated in TypeScript 6
- remove baseUrl; paths entries are now relative to the declaring tsconfig - replace target es5 (tools) with the workspace ES2020 target - drop the ignoreDeprecations "5.0" escape hatch - set strict: false explicitly (TS 6 defaults it to true) - list types explicitly where configs relied on implicit @types inclusion (TS 6 defaults types to []) - typedoc config: inherit module/lib from the base config so core type-checks under it - apps/ui: drop the unused tns-core-modules/* path mapping
1 parent 83531af commit 53e421a

12 files changed

Lines changed: 22 additions & 28 deletions

File tree

‎apps/automated/tsconfig.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"compilerOptions": {
44
"diagnostics": false,
55
"paths": {
6-
"~/*": ["src/*"]
6+
"~/*": ["./src/*"]
77
}
88
}
99
}

‎apps/toolbox/tsconfig.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"compilerOptions": {
55
"diagnostics": false,
66
"paths": {
7-
"~/*": ["src/*"]
7+
"~/*": ["./src/*"]
88
}
99
}
1010
}

‎apps/ui/e2e/tsconfig.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"compilerOptions": {
33
"module": "commonjs",
44
"target": "es6",
5+
"strict": false,
56
"experimentalDecorators": true,
67
"emitDecoratorMetadata": true,
78
"importHelpers": false,
@@ -14,7 +15,6 @@
1415
"lib": [
1516
"es2015",
1617
"dom"
17-
],
18-
"baseUrl": "."
18+
]
1919
}
2020
}

‎apps/ui/tsconfig.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"compilerOptions": {
44
"diagnostics": false,
55
"paths": {
6-
"~/*": ["src/*"],
7-
"tns-core-modules/*": ["@nativescript/core/*"]
6+
"~/*": ["./src/*"]
87
}
98
},
109
"exclude": ["e2e"]

‎packages/core/tsconfig.lib.json‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
"noEmitOnError": true,
55
"noEmitHelpers": true,
66
"declaration": true,
7-
"ignoreDeprecations": "5.0",
87
"removeComments": false,
98
"emitDecoratorMetadata": true,
109
"experimentalDecorators": true,
1110
"diagnostics": true,
1211
"sourceMap": true,
1312
"inlineSourceMap": false,
14-
"baseUrl": ".",
1513
"types": ["node"]
1614
},
1715
"exclude": ["**/*.spec.ts", "**/*.test.ts", "dist", "__tests__", "vite.config.ts", "vitest.setup.ts"],

‎packages/devtools/tsconfig.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"rootDir": "./src",
4-
"baseUrl": ".",
4+
"strict": false,
55
"target": "ES2020",
66
"module": "esnext",
77
"moduleResolution": "bundler",
@@ -15,11 +15,12 @@
1515
"skipDefaultLibCheck": true,
1616
"diagnostics": true,
1717
"paths": {
18-
"@nativescript/devtools": ["src"]
18+
"@nativescript/devtools": ["./src"]
1919
},
2020
"esModuleInterop": true,
2121
"allowSyntheticDefaultImports": true,
22-
"stripInternal": true
22+
"stripInternal": true,
23+
"types": ["node"]
2324
},
2425
"include": ["src"],
2526
"exclude": ["node_modules"]

‎packages/vite/tsconfig.lib.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"noEmitOnError": true,
55
"noEmitHelpers": true,
66
"declaration": true,
7-
"ignoreDeprecations": "5.0",
87
"removeComments": false,
98
"emitDecoratorMetadata": false,
109
"experimentalDecorators": true,

‎packages/webpack5/tsconfig.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"rootDir": ".",
4-
"baseUrl": ".",
4+
"strict": false,
55
"target": "es2018",
66
"module": "commonjs",
77
"declaration": true,
@@ -13,11 +13,12 @@
1313
"skipDefaultLibCheck": true,
1414
"diagnostics": true,
1515
"paths": {
16-
"@nativescript/webpack": ["src"]
16+
"@nativescript/webpack": ["./src"]
1717
},
1818
"esModuleInterop": true,
1919
"allowSyntheticDefaultImports": true,
20-
"stripInternal": true
20+
"stripInternal": true,
21+
"types": ["node", "jest"]
2122
},
2223
"include": ["src", "scripts", "__tests__"],
2324
"exclude": ["node_modules"]

‎tools/scripts/tsconfig.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
**/
44
{
55
"compilerOptions": {
6-
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
7-
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
6+
"target": "es2020" /* Specify ECMAScript target version. */,
7+
"module": "commonjs" /* Specify module code generation. */,
88
"strict": true /* Enable all strict type-checking options. */,
99
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
1010
}

‎tools/scripts/tsconfig.typedoc.json‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
44
"outDir": "../../dist/packages/core",
5-
"target": "es5",
6-
"module": "commonjs",
7-
"declaration": false,
8-
"lib": ["es6", "dom"]
5+
"declaration": false
96
},
107
"include": ["../../packages/core/**/*.d.ts"],
118
"exclude": [

0 commit comments

Comments
 (0)