Skip to content

Commit 4ba8d9e

Browse files
authored
chore: bump TS and adjust tsconfigs (#2145)
TS 5.2 is more strict about module resolution, and seems to not take into account "extends". Therefore inline the base.
1 parent 1018345 commit 4ba8d9e

File tree

15 files changed

+69
-66
lines changed

15 files changed

+69
-66
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"lint": "prettier --check ."
1414
},
1515
"dependencies": {
16-
"typescript": "^5.1.3"
16+
"typescript": "^5.2.2"
1717
},
1818
"devDependencies": {
1919
"cross-env": "^7.0.2",

packages/language-server/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"node": ">= 12.0.0"
3535
},
3636
"devDependencies": {
37-
"@tsconfig/node16": "^1.0.0",
3837
"@types/estree": "^0.0.42",
3938
"@types/lodash": "^4.14.116",
4039
"@types/mocha": "^9.1.0",
@@ -58,7 +57,7 @@
5857
"svelte": "^3.57.0",
5958
"svelte-preprocess": "~5.0.4",
6059
"svelte2tsx": "workspace:~",
61-
"typescript": "*",
60+
"typescript": "^5.2.2",
6261
"vscode-css-languageservice": "~6.2.0",
6362
"vscode-html-languageservice": "~5.0.0",
6463
"vscode-languageserver": "8.0.2",

packages/language-server/test/plugins/typescript/features/CompletionProvider.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@ describe('CompletionProviderImpl', function () {
476476
assert.deepStrictEqual(data, {
477477
data: undefined,
478478
hasAction: undefined,
479+
filterText: undefined,
479480
insertText: undefined,
480481
isPackageJsonImport: undefined,
481482
isImportStatementCompletion: undefined,
@@ -1441,7 +1442,7 @@ describe('CompletionProviderImpl', function () {
14411442
assert.deepStrictEqual(item, {
14421443
label: 'hi',
14431444
kind: CompletionItemKind.Method,
1444-
sortText: '17',
1445+
sortText: '11',
14451446
preselect: undefined,
14461447
insertText: `hi(name: string): string {${newLine}${indent}$0${newLine}}`,
14471448
insertTextFormat: 2,

packages/language-server/test/plugins/typescript/features/diagnostics/fixtures/actions-animations-transitions-typechecks/expectedv2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"severity": 1,
1616
"source": "ts",
17-
"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.",
17+
"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.",
1818
"code": 2345,
1919
"tags": []
2020
}

packages/language-server/test/plugins/typescript/features/diagnostics/fixtures/bind-this/expected_svelte_4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"severity": 1,
2727
"source": "ts",
28-
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 52 more.",
28+
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 54 more.",
2929
"code": 2740,
3030
"tags": []
3131
},

packages/language-server/test/plugins/typescript/features/diagnostics/fixtures/bind-this/expectedv2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
"severity": 1,
2727
"source": "ts",
28-
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 52 more.",
28+
"message": "Type 'HTMLDivElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 54 more.",
2929
"code": 2740,
3030
"tags": []
3131
},
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
{
2-
"extends": "@tsconfig/node16/tsconfig.json",
32
"compilerOptions": {
3+
"lib": ["es2021"],
4+
"target": "es2021",
45
"moduleResolution": "node",
56
"module": "CommonJS",
7+
8+
"outDir": "dist",
69
"strict": true,
710
"declaration": true,
8-
"outDir": "dist",
911
"esModuleInterop": true,
1012
"sourceMap": true,
1113
"composite": true,
12-
"skipLibCheck": true
14+
"skipLibCheck": true,
15+
"forceConsistentCasingInFileNames": true
1316
}
1417
}

packages/svelte-check/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"@rollup/plugin-node-resolve": "^15.0.0",
4747
"@rollup/plugin-replace": "5.0.2",
4848
"@rollup/plugin-typescript": "^10.0.0",
49-
"@tsconfig/node16": "^1.0.0",
5049
"@types/sade": "^1.7.2",
5150
"builtin-modules": "^3.3.0",
5251
"rollup": "3.7.5",
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
2-
"extends": "@tsconfig/node16/tsconfig.json",
32
"compilerOptions": {
3+
"lib": ["es2021"],
4+
"module": "CommonJS",
5+
"target": "es2021",
46
"moduleResolution": "node",
7+
58
"strict": true,
6-
"esModuleInterop": true
9+
"esModuleInterop": true,
10+
"skipLibCheck": true,
11+
"forceConsistentCasingInFileNames": true
712
},
813
"include": ["src/**/*"]
914
}

packages/svelte-vscode/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,13 +708,12 @@
708708
]
709709
},
710710
"devDependencies": {
711-
"@tsconfig/node16": "^1.0.0",
712711
"@types/lodash": "^4.14.116",
713712
"@types/node": "^16.0.0",
714713
"@types/vscode": "^1.67",
715714
"js-yaml": "^3.14.0",
716715
"tslib": "^2.4.0",
717-
"typescript": "*",
716+
"typescript": "^5.2.2",
718717
"vscode-tmgrammar-test": "^0.0.11"
719718
},
720719
"dependencies": {

0 commit comments

Comments
 (0)