Skip to content

Commit

Permalink
chore: upgrade to TS 5.5 (#2415)
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Jun 24, 2024
1 parent 7008652 commit 1d5f3cd
Show file tree
Hide file tree
Showing 14 changed files with 68 additions and 43 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.4.5"
"typescript": "^5.5.2"
},
"devDependencies": {
"cross-env": "^7.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"svelte": "^3.57.0",
"svelte-preprocess": "^5.1.3",
"svelte2tsx": "workspace:~",
"typescript": "^5.3.2",
"typescript-auto-import-cache": "^0.3.2",
"typescript": "^5.5.2",
"typescript-auto-import-cache": "^0.3.3",
"vscode-css-languageservice": "~6.2.10",
"vscode-html-languageservice": "~5.1.1",
"vscode-languageserver": "8.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from 'typescript-auto-import-cache/out/5_0/projectService';
import { createProject as createProject50 } from 'typescript-auto-import-cache/out/5_0/project';
import { createProject as createProject53 } from 'typescript-auto-import-cache/out/5_3/project';
import { createProject as createProject55 } from 'typescript-auto-import-cache/out/5_5/project';
import ts from 'typescript';
import { ExportInfoMap } from 'typescript-auto-import-cache/out/5_0/exportInfoMap';
import { ModuleSpecifierCache } from 'typescript-auto-import-cache/out/5_0/moduleSpecifierCache';
Expand Down Expand Up @@ -70,7 +71,7 @@ export function createProject(
return undefined;
}

const factory = minor < 3 ? createProject50 : createProject53;
const factory = minor < 3 ? createProject50 : minor < 5 ? createProject53 : createProject55;
const project = factory(ts, host, createLanguageService, options);

const proxyMethods: (keyof typeof project)[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,8 +1153,8 @@ describe('CodeActionsProvider', function () {
edits: [
{
newText:
`\n${indent}import FixAllImported2 from \"./importing/FixAllImported2.svelte\";\n` +
`${indent}import { FixAllImported3 } from \"./importing/c\";\n`,
`\n${indent}import { FixAllImported3 } from \"./importing/c\";` +
`\n${indent}import FixAllImported2 from \"./importing/FixAllImported2.svelte\";\n`,
range: {
start: {
character: 18,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"value": "MouseEvent",
"location": {
"range": {
"start": { "line": 15692, "character": 10 },
"end": { "line": 15692, "character": 20 }
"start": { "line": 15860, "character": 10 },
"end": { "line": 15860, "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": 15692, "character": 10 },
"end": { "line": 15692, "character": 20 }
"start": { "line": 15860, "character": 10 },
"end": { "line": 15860, "character": 20 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
Expand All @@ -21,8 +21,8 @@
"value": "EventTarget",
"location": {
"range": {
"start": { "line": 8237, "character": 10 },
"end": { "line": 8237, "character": 21 }
"start": { "line": 8318, "character": 10 },
"end": { "line": 8318, "character": 21 }
},
"uri": "<node_modules>/typescript/lib/lib.dom.d.ts"
}
Expand All @@ -32,8 +32,8 @@
"value": "HTMLButtonElement",
"location": {
"range": {
"start": { "line": 9732, "character": 10 },
"end": { "line": 9732, "character": 27 }
"start": { "line": 9810, "character": 10 },
"end": { "line": 9810, "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 @@ -722,7 +722,7 @@
"@types/vscode": "^1.67",
"js-yaml": "^3.14.0",
"tslib": "^2.4.0",
"typescript": "^5.4.5",
"typescript": "^5.5.2",
"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.4.5"
"typescript": "^5.5.2"
},
"peerDependencies": {
"svelte": "^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="svelte" />
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
$$bindings?: Bindings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/** @typedef {typeof __propDef.events} Test2Events */
/** @typedef {typeof __propDef.slots} Test2Slots */
export default class Test2 extends SvelteComponentTyped<{
foo: boolean;
foo: import("./foo").Foo;
}, {
[evt: string]: CustomEvent<any>;
}, {}> {
Expand All @@ -13,7 +13,7 @@ export type Test2Slots = typeof __propDef.slots;
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
foo: import('./foo').Foo;
foo: import("./foo").Foo;
};
events: {
[evt: string]: CustomEvent<any>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="svelte" />
declare class __sveltets_Render<T extends Record<string, any>, K extends keyof T> {
props(): {
foo: T;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/// <reference types="svelte" />
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
$$bindings?: Bindings;
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.4.5",
"typescript": "^5.5.2",
"svelte": "^3.57.0"
},
"dependencies": {
Expand Down
69 changes: 48 additions & 21 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 1d5f3cd

Please sign in to comment.