Skip to content

Commit

Permalink
feat: editor support for ts 5.4 (#2334)
Browse files Browse the repository at this point in the history
Follow up to #2313. The auto-import problem is fixed in 5.4.5.
  • Loading branch information
jasonlyu123 committed Apr 16, 2024
1 parent 4cf8410 commit 4c8c0db
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 41 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.3.2"
"typescript": "^5.4.5"
},
"devDependencies": {
"cross-env": "^7.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"svelte": "^3.57.0",
"svelte-preprocess": "^5.1.3",
"svelte2tsx": "workspace:~",
"typescript": "~5.3.2",
"typescript": "^5.3.2",
"typescript-auto-import-cache": "^0.3.2",
"vscode-css-languageservice": "~6.2.10",
"vscode-html-languageservice": "~5.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ class ImpliedNodeFormatResolver {
let mode = undefined;
if (sourceFile) {
this.cacheImpliedNodeFormat(sourceFile, compilerOptions);
// @ts-expect-error remove when bumping to TS 5.4
mode = ts.getModeForResolutionAtIndex(sourceFile, importIdxInFile, compilerOptions);
}
return mode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type 'boolean' is not assignable to parameter of type 'String | Number | null | undefined'.",
"message": "Argument of type 'true' is not assignable to parameter of type 'String | Number | null | undefined'.",
"code": 2345,
"tags": []
},
Expand All @@ -17,7 +17,7 @@
},
"severity": 1,
"source": "ts",
"message": "Argument of type 'boolean' is not assignable to parameter of type 'String | Number | null | undefined'.",
"message": "Argument of type 'true' is not assignable to parameter of type 'String | Number | null | undefined'.",
"code": 2345,
"tags": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"value": "MouseEvent",
"location": {
"range": {
"start": { "line": 15586, "character": 10 },
"end": { "line": 15586, "character": 20 }
"start": { "line": 15692, "character": 10 },
"end": { "line": 15692, "character": 20 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"value": "MouseEvent",
"location": {
"range": {
"start": { "line": 15586, "character": 10 },
"end": { "line": 15586, "character": 20 }
"start": { "line": 15692, "character": 10 },
"end": { "line": 15692, "character": 20 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
Expand All @@ -21,8 +21,8 @@
"value": "EventTarget",
"location": {
"range": {
"start": { "line": 8192, "character": 10 },
"end": { "line": 8192, "character": 21 }
"start": { "line": 8237, "character": 10 },
"end": { "line": 8237, "character": 21 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
Expand All @@ -32,8 +32,8 @@
"value": "HTMLButtonElement",
"location": {
"range": {
"start": { "line": 9684, "character": 10 },
"end": { "line": 9684, "character": 27 }
"start": { "line": 9732, "character": 10 },
"end": { "line": 9732, "character": 27 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
"@types/vscode": "^1.67",
"js-yaml": "^3.14.0",
"tslib": "^2.4.0",
"typescript": "~5.3.2",
"typescript": "^5.4.5",
"vscode-tmgrammar-test": "^0.0.11"
},
"dependencies": {
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.3.2"
"typescript": "^5.4.5"
},
"peerDependencies": {
"svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"license": "MIT",
"devDependencies": {
"@types/node": "^16.0.0",
"typescript": "^5.3.2"
"typescript": "^5.4.5"
},
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.14",
Expand Down
50 changes: 25 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4c8c0db

Please sign in to comment.