diff --git a/package.json b/package.json index afe861991..abeb14d72 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "cross-env": "^7.0.2", - "prettier": "~3.1.0", + "prettier": "~3.2.5", "ts-node": "^10.0.0" }, "packageManager": "pnpm@8.4.0" diff --git a/packages/language-server/package.json b/packages/language-server/package.json index e15bc971d..45de36a36 100644 --- a/packages/language-server/package.json +++ b/packages/language-server/package.json @@ -52,10 +52,10 @@ "estree-walker": "^2.0.1", "fast-glob": "^3.2.7", "lodash": "^4.17.21", - "prettier": "~3.1.0", - "prettier-plugin-svelte": "~3.1.1", + "prettier": "~3.2.5", + "prettier-plugin-svelte": "^3.2.2", "svelte": "^3.57.0", - "svelte-preprocess": "~5.1.0", + "svelte-preprocess": "^5.1.3", "svelte2tsx": "workspace:~", "typescript": "^5.3.2", "typescript-auto-import-cache": "^0.3.2", diff --git a/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts b/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts index f12f8427a..c9c2ee434 100644 --- a/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts +++ b/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts @@ -637,11 +637,10 @@ export class CodeActionsProviderImpl implements CodeActionsProvider { return []; } - const codeActionsNotFilteredOut = codeActions.filter( - ({ codeAction }) => - codeAction.edit?.documentChanges?.every( - (change) => (change).edits.length > 0 - ) + const codeActionsNotFilteredOut = codeActions.filter(({ codeAction }) => + codeAction.edit?.documentChanges?.every( + (change) => (change).edits.length > 0 + ) ); const fixAllActions = this.getFixAllActions( diff --git a/packages/language-server/test/plugins/css/CSSPlugin.test.ts b/packages/language-server/test/plugins/css/CSSPlugin.test.ts index 0a05d4456..06973b4ca 100644 --- a/packages/language-server/test/plugins/css/CSSPlugin.test.ts +++ b/packages/language-server/test/plugins/css/CSSPlugin.test.ts @@ -133,32 +133,33 @@ describe('CSS Plugin', () => { const completions = await plugin.getCompletions(document, Position.create(0, 22), { triggerKind: CompletionTriggerKind.Invoked } as CompletionContext); - assert.deepStrictEqual(completions?.items.find((item) => item.label === 'none'), < - CompletionItem - >{ - insertTextFormat: undefined, - kind: 12, - label: 'none', - documentation: { - kind: 'markdown', - value: 'The element and its descendants generates no boxes\\.' - }, - sortText: ' ', - tags: [], - textEdit: { - newText: 'none', - range: { - start: { - line: 0, - character: 21 - }, - end: { - line: 0, - character: 22 + assert.deepStrictEqual( + completions?.items.find((item) => item.label === 'none'), + { + insertTextFormat: undefined, + kind: 12, + label: 'none', + documentation: { + kind: 'markdown', + value: 'The element and its descendants generates no boxes\\.' + }, + sortText: ' ', + tags: [], + textEdit: { + newText: 'none', + range: { + start: { + line: 0, + character: 21 + }, + end: { + line: 0, + character: 22 + } } } } - }); + ); }); it('not for style attribute with interpolation', async () => { @@ -183,25 +184,26 @@ describe('CSS Plugin', () => { } }); const completions = await plugin.getCompletions(document, Position.create(0, 16)); - assert.deepStrictEqual(completions?.items.find((item) => item.label === 'foo.css'), < - CompletionItem - >{ - label: 'foo.css', - kind: 17, - textEdit: { - newText: 'foo.css', - range: { - end: { - character: 18, - line: 0 - }, - start: { - character: 16, - line: 0 + assert.deepStrictEqual( + completions?.items.find((item) => item.label === 'foo.css'), + { + label: 'foo.css', + kind: 17, + textEdit: { + newText: 'foo.css', + range: { + end: { + character: 18, + line: 0 + }, + start: { + character: 16, + line: 0 + } } } } - }); + ); }); }); diff --git a/packages/language-server/test/plugins/typescript/features/CompletionProvider.test.ts b/packages/language-server/test/plugins/typescript/features/CompletionProvider.test.ts index 226917f82..419b03f49 100644 --- a/packages/language-server/test/plugins/typescript/features/CompletionProvider.test.ts +++ b/packages/language-server/test/plugins/typescript/features/CompletionProvider.test.ts @@ -638,7 +638,10 @@ describe('CompletionProviderImpl', function () { ); assert.deepStrictEqual( - sortBy(completions?.items.map((item) => item.label), (x) => x), + sortBy( + completions?.items.map((item) => item.label), + (x) => x + ), sortBy(testfiles, (x) => x) ); }); @@ -1372,7 +1375,10 @@ describe('CompletionProviderImpl', function () { document, Position.create(4, 14) ); - assert.deepStrictEqual(completions?.items.map((item) => item.label), ['s', 'm', 'l']); + assert.deepStrictEqual( + completions?.items.map((item) => item.label), + ['s', 'm', 'l'] + ); }); it('can auto import in workspace without tsconfig/jsconfig', async () => { diff --git a/packages/svelte-check/package.json b/packages/svelte-check/package.json index ac5594b8b..f2659fd53 100644 --- a/packages/svelte-check/package.json +++ b/packages/svelte-check/package.json @@ -29,7 +29,7 @@ "import-fresh": "^3.2.1", "picocolors": "^1.0.0", "sade": "^1.7.4", - "svelte-preprocess": "^5.1.0", + "svelte-preprocess": "^5.1.3", "typescript": "^5.0.3" }, "peerDependencies": { diff --git a/packages/typescript-plugin/src/language-service/sveltekit.ts b/packages/typescript-plugin/src/language-service/sveltekit.ts index 0724ddef2..c4fc800f0 100644 --- a/packages/typescript-plugin/src/language-service/sveltekit.ts +++ b/packages/typescript-plugin/src/language-service/sveltekit.ts @@ -649,11 +649,8 @@ function getProxiedLanguageService(info: ts.server.PluginCreateInfo, ts: _ts, lo } upsertKitFile(fileName: string) { - const result = internalHelpers.upsertKitFile( - ts, - fileName, - kitFilesSettings, - () => info.languageService.getProgram()?.getSourceFile(fileName) + const result = internalHelpers.upsertKitFile(ts, fileName, kitFilesSettings, () => + info.languageService.getProgram()?.getSourceFile(fileName) ); if (!result) { return; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 828565e96..612bda377 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: specifier: ^7.0.2 version: 7.0.3 prettier: - specifier: ~3.1.0 - version: 3.1.0 + specifier: ~3.2.5 + version: 3.2.5 ts-node: specifier: ^10.0.0 version: 10.9.1(@types/node@16.18.32)(typescript@5.3.2) @@ -43,17 +43,17 @@ importers: specifier: ^4.17.21 version: 4.17.21 prettier: - specifier: ~3.1.0 - version: 3.1.0 + specifier: ~3.2.5 + version: 3.2.5 prettier-plugin-svelte: - specifier: ~3.1.1 - version: 3.1.1(prettier@3.1.0)(svelte@3.57.0) + specifier: ^3.2.2 + version: 3.2.2(prettier@3.2.5)(svelte@3.57.0) svelte: specifier: ^3.57.0 version: 3.57.0 svelte-preprocess: - specifier: ~5.1.0 - version: 5.1.0(svelte@3.57.0)(typescript@5.3.2) + specifier: ^5.1.3 + version: 5.1.3(svelte@3.57.0)(typescript@5.3.2) svelte2tsx: specifier: workspace:~ version: link:../svelte2tsx @@ -137,8 +137,8 @@ importers: specifier: ^3.55.0 || ^4.0.0-next.0 || ^4.0.0 || ^5.0.0-next.0 version: 3.57.0 svelte-preprocess: - specifier: ^5.1.0 - version: 5.1.0(svelte@3.57.0)(typescript@5.3.2) + specifier: ^5.1.3 + version: 5.1.3(svelte@3.57.0)(typescript@5.3.2) typescript: specifier: ^5.0.3 version: 5.3.2 @@ -1347,6 +1347,14 @@ packages: engines: {node: '>=12'} dependencies: '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + + /magic-string@0.30.7: + resolution: {integrity: sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: false /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} @@ -1557,18 +1565,18 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - /prettier-plugin-svelte@3.1.1(prettier@3.1.0)(svelte@3.57.0): - resolution: {integrity: sha512-jLzaHfToav527/I5h2BMQfN3G5gylrJm54zFFyoXvUtfscI47877ftacUb+Eyse/3bXrhY+MtkyiuvruiHc+kg==} + /prettier-plugin-svelte@3.2.2(prettier@3.2.5)(svelte@3.57.0): + resolution: {integrity: sha512-ZzzE/wMuf48/1+Lf2Ffko0uDa6pyCfgHV6+uAhtg2U0AAXGrhCSW88vEJNAkAxW5qyrFY1y1zZ4J8TgHrjW++Q==} peerDependencies: prettier: ^3.0.0 svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 dependencies: - prettier: 3.1.0 + prettier: 3.2.5 svelte: 3.57.0 dev: false - /prettier@3.1.0: - resolution: {integrity: sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==} + /prettier@3.2.5: + resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} hasBin: true @@ -1824,16 +1832,16 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-preprocess@5.1.0(svelte@3.57.0)(typescript@5.3.2): - resolution: {integrity: sha512-EkErPiDzHAc0k2MF5m6vBNmRUh338h2myhinUw/xaqsLs7/ZvsgREiLGj03VrSzbY/TB5ZXgBOsKraFee5yceA==} - engines: {node: '>= 14.10.0'} + /svelte-preprocess@5.1.3(svelte@3.57.0)(typescript@5.3.2): + resolution: {integrity: sha512-xxAkmxGHT+J/GourS5mVJeOXZzne1FR5ljeOUAMXUkfEhkLEllRreXpbl3dIYJlcJRfL1LO1uIAPpBpBfiqGPw==} + engines: {node: '>= 16.0.0', pnpm: ^8.0.0} requiresBuild: true peerDependencies: '@babel/core': ^7.10.2 coffeescript: ^2.5.1 less: ^3.11.3 || ^4.0.0 postcss: ^7 || ^8 - postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 + postcss-load-config: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 pug: ^3.0.0 sass: ^1.26.8 stylus: ^0.55.0 @@ -1864,7 +1872,7 @@ packages: dependencies: '@types/pug': 2.0.6 detect-indent: 6.1.0 - magic-string: 0.27.0 + magic-string: 0.30.7 sorcery: 0.11.0 strip-indent: 3.0.0 svelte: 3.57.0