Skip to content

Commit

Permalink
chore: bump TS and adjust tsconfigs (#2145)
Browse files Browse the repository at this point in the history
TS 5.2 is more strict about module resolution, and seems to not take into account "extends". Therefore inline the base.
  • Loading branch information
dummdidumm committed Sep 4, 2023
1 parent 1018345 commit 4ba8d9e
Show file tree
Hide file tree
Showing 15 changed files with 69 additions and 66 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"lint": "prettier --check ."
},
"dependencies": {
"typescript": "^5.1.3"
"typescript": "^5.2.2"
},
"devDependencies": {
"cross-env": "^7.0.2",
Expand Down
3 changes: 1 addition & 2 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"node": ">= 12.0.0"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
"@types/estree": "^0.0.42",
"@types/lodash": "^4.14.116",
"@types/mocha": "^9.1.0",
Expand All @@ -58,7 +57,7 @@
"svelte": "^3.57.0",
"svelte-preprocess": "~5.0.4",
"svelte2tsx": "workspace:~",
"typescript": "*",
"typescript": "^5.2.2",
"vscode-css-languageservice": "~6.2.0",
"vscode-html-languageservice": "~5.0.0",
"vscode-languageserver": "8.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ describe('CompletionProviderImpl', function () {
assert.deepStrictEqual(data, {
data: undefined,
hasAction: undefined,
filterText: undefined,
insertText: undefined,
isPackageJsonImport: undefined,
isImportStatementCompletion: undefined,
Expand Down Expand Up @@ -1441,7 +1442,7 @@ describe('CompletionProviderImpl', function () {
assert.deepStrictEqual(item, {
label: 'hi',
kind: CompletionItemKind.Method,
sortText: '17',
sortText: '11',
preselect: undefined,
insertText: `hi(name: string): string {${newLine}${indent}$0${newLine}}`,
insertTextFormat: 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type 'HTMLParagraphElement' is not assignable to parameter of type 'HTMLInputElement'.\n Type 'HTMLParagraphElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 52 more.",
"message": "Argument of type 'HTMLParagraphElement' is not assignable to parameter of type 'HTMLInputElement'.\n Type 'HTMLParagraphElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 54 more.",
"code": 2345,
"tags": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"severity": 1,
"source": "ts",
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 52 more.",
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 54 more.",
"code": 2740,
"tags": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"severity": 1,
"source": "ts",
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 52 more.",
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 54 more.",
"code": 2740,
"tags": []
},
Expand Down
9 changes: 6 additions & 3 deletions packages/language-server/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"target": "es2021",
"moduleResolution": "node",
"module": "CommonJS",

"outDir": "dist",
"strict": true,
"declaration": true,
"outDir": "dist",
"esModuleInterop": true,
"sourceMap": true,
"composite": true,
"skipLibCheck": true
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
}
}
1 change: 0 additions & 1 deletion packages/svelte-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-replace": "5.0.2",
"@rollup/plugin-typescript": "^10.0.0",
"@tsconfig/node16": "^1.0.0",
"@types/sade": "^1.7.2",
"builtin-modules": "^3.3.0",
"rollup": "3.7.5",
Expand Down
9 changes: 7 additions & 2 deletions packages/svelte-check/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"module": "CommonJS",
"target": "es2021",
"moduleResolution": "node",

"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src/**/*"]
}
3 changes: 1 addition & 2 deletions packages/svelte-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,12 @@
]
},
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
"@types/lodash": "^4.14.116",
"@types/node": "^16.0.0",
"@types/vscode": "^1.67",
"js-yaml": "^3.14.0",
"tslib": "^2.4.0",
"typescript": "*",
"typescript": "^5.2.2",
"vscode-tmgrammar-test": "^0.0.11"
},
"dependencies": {
Expand Down
10 changes: 8 additions & 2 deletions packages/svelte-vscode/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"module": "CommonJS",
"target": "es2021",
"moduleResolution": "node",

"outDir": "dist",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"outDir": "dist",
"sourceMap": true,
"composite": true
}
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte2tsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"svelte": "~3.57.0",
"tiny-glob": "^0.2.6",
"tslib": "^2.4.0",
"typescript": "^5.1.3"
"typescript": "^5.2.2"
},
"peerDependencies": {
"svelte": "^3.55 || ^4.0.0-next.0 || ^4.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/typescript-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
"author": "The Svelte Community",
"license": "MIT",
"devDependencies": {
"@tsconfig/node16": "^1.0.0",
"@types/node": "^16.0.0",
"typescript": "*"
"typescript": "^5.2.2"
},
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.14",
Expand Down
10 changes: 7 additions & 3 deletions packages/typescript-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"lib": ["es2021"],
"target": "es2021",
"moduleResolution": "node",
"module": "CommonJS",

"outDir": "dist",
"esModuleInterop": true,
"strict": true,
"declaration": true,
"outDir": "dist",
"sourceMap": true,
"composite": true
"composite": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["./src/**/*"],
"exclude": ["./node_modules"]
Expand Down
Loading

0 comments on commit 4ba8d9e

Please sign in to comment.