diff --git a/package.json b/package.json index 391cd4f3..059e4299 100644 --- a/package.json +++ b/package.json @@ -46,4 +46,4 @@ "esbuild" ] } -} +} \ No newline at end of file diff --git a/packages/addons/common.ts b/packages/addons/common.ts index b03d9d5e..2e068420 100644 --- a/packages/addons/common.ts +++ b/packages/addons/common.ts @@ -1,4 +1,5 @@ import { imports, exports, common } from '@sveltejs/cli-core/js'; +import { toSvelteFragment, type SvelteAst } from '@sveltejs/cli-core/html'; import { parseScript, parseSvelte } from '@sveltejs/cli-core/parsers'; import process from 'node:process'; @@ -64,17 +65,29 @@ export function addEslintConfigPrettier(content: string): string { } export function addToDemoPage(content: string, path: string): string { - const { template, generateCode } = parseSvelte(content); - - for (const node of template.ast.childNodes) { - if (node.type === 'tag' && node.attribs['href'] === `/demo/${path}`) { - return content; + const { ast, generateCode } = parseSvelte(content); + + for (const node of ast.fragment.nodes) { + if (node.type === 'RegularElement') { + const hrefAttribute = node.attributes.find( + (x) => x.type === 'Attribute' && x.name === 'href' + ) as SvelteAst.Attribute; + if (!hrefAttribute || !hrefAttribute.value) continue; + + if (!Array.isArray(hrefAttribute.value)) continue; + + const hasDemo = hrefAttribute.value.find( + (x) => x.type === 'Text' && x.data === `/demo/${path}` + ); + if (hasDemo) { + return content; + } } } - const newLine = template.source ? '\n' : ''; - const src = template.source + `${newLine}${path}`; - return generateCode({ template: src }); + ast.fragment.nodes.push(...toSvelteFragment(`${path}`)); + + return generateCode(); } /** diff --git a/packages/addons/paraglide/index.ts b/packages/addons/paraglide/index.ts index 455ee24b..644b7bd4 100644 --- a/packages/addons/paraglide/index.ts +++ b/packages/addons/paraglide/index.ts @@ -1,4 +1,3 @@ -import MagicString from 'magic-string'; import { colors, defineAddon, defineAddonOptions, log } from '@sveltejs/cli-core'; import { array, @@ -187,38 +186,44 @@ export default defineAddon({ // add usage example sv.file(`${kit.routesDirectory}/demo/paraglide/+page.svelte`, (content) => { - const { script, template, generateCode } = parseSvelte(content, { typescript }); + console.log(content); + const { ast, generateCode } = parseSvelte(content); + + let scriptAst = ast.instance?.content; + if (!scriptAst) { + scriptAst = parseScript('').ast; + ast.instance = { + type: 'Script', + start: 0, + end: 0, + context: 'default', + attributes: [], + content: scriptAst + }; + } - imports.addNamed(script.ast, '$lib/paraglide/messages.js', { m: 'm' }); - imports.addNamed(script.ast, '$app/navigation', { goto: 'goto' }); - imports.addNamed(script.ast, '$app/state', { page: 'page' }); - imports.addNamed(script.ast, '$lib/paraglide/runtime', { + imports.addNamed(scriptAst, '$lib/paraglide/messages.js', { m: 'm' }); + imports.addNamed(scriptAst, '$lib/paraglide/runtime', { setLocale: 'setLocale' }); - const scriptCode = new MagicString(script.generateCode()); - - const templateCode = new MagicString(template.source); - // add localized message - templateCode.append("\n\n

{m.hello_world({ name: 'SvelteKit User' })}

\n"); + let templateCode = "

{m.hello_world({ name: 'SvelteKit User' })}

"; // add links to other localized pages, the first one is the default // language, thus it does not require any localized route const { validLanguageTags } = parseLanguageTagInput(options.languageTags); const links = validLanguageTags - .map( - (x) => - `${templateCode.getIndentString()}` - ) - .join('\n'); - templateCode.append(`
\n${links}\n
`); - - templateCode.append( - '

\nIf you use VSCode, install the Sherlock i18n extension for a better i18n experience.\n

' - ); + .map((x) => ``) + .join(''); + templateCode += `
${links}
`; - return generateCode({ script: scriptCode.toString(), template: templateCode.toString() }); + templateCode += + '

If you use VSCode, install the Sherlock i18n extension for a better i18n experience.

'; + + ast.fragment.nodes.push(...html.toSvelteFragment(templateCode)); + + return generateCode(); }); } diff --git a/packages/core/package.json b/packages/core/package.json index 41232984..d4a0bab3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -57,7 +57,9 @@ "picocolors": "^1.1.1", "postcss": "^8.4.49", "silver-fleece": "^1.2.1", - "zimmerframe": "^1.1.2" + "zimmerframe": "^1.1.2", + "svelte": "^5.30.2", + "svelte-ast-print": "^1.0.1" }, "keywords": [ "create", diff --git a/packages/core/tooling/html/index.ts b/packages/core/tooling/html/index.ts index 94dcd881..7339f840 100644 --- a/packages/core/tooling/html/index.ts +++ b/packages/core/tooling/html/index.ts @@ -1,3 +1,4 @@ +import type { AST as SvelteAst } from 'svelte/compiler'; import { type AstTypes, type HtmlChildNode, @@ -7,9 +8,10 @@ import { parseHtml } from '../index.ts'; import { addFromString } from '../js/common.ts'; +import { parseSvelte } from '../parsers.ts'; export { HtmlElement, HtmlElementType }; -export type { HtmlDocument }; +export type { HtmlDocument, SvelteAst }; export function div(attributes: Record = {}): HtmlElement { return element('div', attributes); @@ -53,3 +55,9 @@ export function addSlot( addFromString(jsAst, 'let { children } = $props();'); addFromRawHtml(htmlAst.childNodes, '{@render children()}'); } + +export function toSvelteFragment(content: string): SvelteAst.Fragment['nodes'] { + // TODO write test + const { ast } = parseSvelte(content); + return ast.fragment.nodes; +} diff --git a/packages/core/tooling/index.ts b/packages/core/tooling/index.ts index 27e41cbe..fe5be511 100644 --- a/packages/core/tooling/index.ts +++ b/packages/core/tooling/index.ts @@ -16,6 +16,8 @@ import * as fleece from 'silver-fleece'; import { print as esrapPrint } from 'esrap'; import * as acorn from 'acorn'; import { tsPlugin } from '@sveltejs/acorn-typescript'; +import { parse as svelteParse, type AST as SvelteAst } from 'svelte/compiler'; +import { print as sveltePrint } from 'svelte-ast-print'; export { // html @@ -37,11 +39,12 @@ export { export type { // html ChildNode as HtmlChildNode, + SvelteAst, // js TsEstree as AstTypes, - //css + // css CssChildNode }; @@ -240,3 +243,11 @@ export function guessQuoteStyle(ast: TsEstree.Node): 'single' | 'double' | undef return singleCount > doubleCount ? 'single' : 'double'; } + +export function parseSvelte(content: string): SvelteAst.Root { + return svelteParse(content, { modern: true }); +} + +export function serializeSvelte(ast: SvelteAst.Root): string { + return sveltePrint(ast).code; +} diff --git a/packages/core/tooling/parsers.ts b/packages/core/tooling/parsers.ts index f7764d34..ceee301c 100644 --- a/packages/core/tooling/parsers.ts +++ b/packages/core/tooling/parsers.ts @@ -1,5 +1,4 @@ import * as utils from './index.ts'; -import MagicString from 'magic-string'; type ParseBase = { source: string; @@ -35,136 +34,13 @@ export function parseJson(source: string): { data: any } & ParseBase { return { data, source, generateCode }; } -type SvelteGenerator = (code: { - script?: string; - module?: string; - css?: string; - template?: string; -}) => string; -export function parseSvelte( - source: string, - options?: { typescript?: boolean } -): { - script: ReturnType; - module: ReturnType; - css: ReturnType; - template: ReturnType; - generateCode: SvelteGenerator; -} { - // `xTag` captures the whole tag block (ex: ) - // `xSource` is the contents within the tags - const scripts = extractScripts(source); - // instance block - const { tag: scriptTag = '', src: scriptSource = '' } = - scripts.find(({ attrs }) => !attrs.includes('module')) ?? {}; - // module block - const { tag: moduleScriptTag = '', src: moduleSource = '' } = - scripts.find(({ attrs }) => attrs.includes('module')) ?? {}; - // style block - const { styleTag, cssSource } = extractStyle(source); - // rest of the template - // TODO: needs more testing - const templateSource = source - .replace(moduleScriptTag, '') - .replace(scriptTag, '') - .replace(styleTag, '') - .trim(); - - const script = parseScript(scriptSource); - const module = parseScript(moduleSource); - const css = parseCss(cssSource); - const template = parseHtml(templateSource); - - const generateCode: SvelteGenerator = (code) => { - const ms = new MagicString(source); - // TODO: this is imperfect and needs adjustments - if (code.script !== undefined) { - if (scriptSource.length === 0) { - const ts = options?.typescript ? ' lang="ts"' : ''; - const indented = code.script.split('\n').join('\n\t'); - const script = `\n\t${indented}\n\n\n`; - ms.prepend(script); - } else { - const { start, end } = locations(source, scriptSource); - const formatted = indent(code.script, ms.getIndentString()); - ms.update(start, end, formatted); - } - } - if (code.module !== undefined) { - if (moduleSource.length === 0) { - const ts = options?.typescript ? ' lang="ts"' : ''; - const indented = code.module.split('\n').join('\n\t'); - // TODO: make a svelte 5 variant - const module = `\n\t${indented}\n\n\n`; - ms.prepend(module); - } else { - const { start, end } = locations(source, moduleSource); - const formatted = indent(code.module, ms.getIndentString()); - ms.update(start, end, formatted); - } - } - if (code.css !== undefined) { - if (cssSource.length === 0) { - const indented = code.css.split('\n').join('\n\t'); - const style = `\n\n`; - ms.append(style); - } else { - const { start, end } = locations(source, cssSource); - const formatted = indent(code.css, ms.getIndentString()); - ms.update(start, end, formatted); - } - } - if (code.template !== undefined) { - if (templateSource.length === 0) { - ms.appendLeft(0, code.template); - } else { - const { start, end } = locations(source, templateSource); - ms.update(start, end, code.template); - } - } - return ms.toString(); - }; +export function parseSvelte(source: string): { ast: utils.SvelteAst.Root } & ParseBase { + const ast = utils.parseSvelte(source); + const generateCode = () => utils.serializeSvelte(ast); return { - script: { ...script, source: scriptSource }, - module: { ...module, source: moduleSource }, - css: { ...css, source: cssSource }, - template: { ...template, source: templateSource }, + ast, + source, generateCode }; } - -function locations(source: string, search: string): { start: number; end: number } { - const start = source.indexOf(search); - const end = start + search.length; - return { start, end }; -} - -function indent(content: string, indent: string): string { - const indented = indent + content.split('\n').join(`\n${indent}`); - return `\n${indented}\n`; -} - -// sourced from Svelte: https://github.com/sveltejs/svelte/blob/0d3d5a2a85c0f9eccb2c8dbbecc0532ec918b157/packages/svelte/src/compiler/preprocess/index.js#L253-L256 -const regexScriptTags = - /|'"/\s]+=(?:"[^"]*"|'[^']*'|[^>\s]+)|\s+[^=>'"/\s]+)*\s*)(?:\/>|>([\S\s]*?)<\/script>)/; -const regexStyleTags = - /|'"/\s]+=(?:"[^"]*"|'[^']*'|[^>\s]+)|\s+[^=>'"/\s]+)*\s*)(?:\/>|>([\S\s]*?)<\/style>)/; - -type Script = { tag: string; attrs: string; src: string }; -function extractScripts(source: string): Script[] { - const scripts = []; - const [tag = '', attrs = '', src = ''] = regexScriptTags.exec(source) ?? []; - if (tag) { - const stripped = source.replace(tag, ''); - scripts.push({ tag, attrs, src }, ...extractScripts(stripped)); - return scripts; - } - - return []; -} - -function extractStyle(source: string) { - const [styleTag = '', attributes = '', cssSource = ''] = regexStyleTags.exec(source) ?? []; - return { styleTag, attributes, cssSource }; -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7ad25f51..aec48be0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,7 +19,7 @@ importers: version: link:packages/create '@sveltejs/eslint-config': specifier: ^8.2.0 - version: 8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.24.0))(eslint-config-prettier@9.1.0(eslint@9.24.0))(eslint-plugin-n@17.13.1(eslint@9.24.0))(eslint-plugin-svelte@3.5.1(eslint@9.24.0)(svelte@5.25.7))(eslint@9.24.0)(typescript-eslint@8.29.0(eslint@9.24.0)(typescript@5.8.3))(typescript@5.8.3) + version: 8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.24.0))(eslint-config-prettier@9.1.0(eslint@9.24.0))(eslint-plugin-n@17.13.1(eslint@9.24.0))(eslint-plugin-svelte@3.5.1(eslint@9.24.0)(svelte@5.30.2))(eslint@9.24.0)(typescript-eslint@8.29.0(eslint@9.24.0)(typescript@5.8.3))(typescript@5.8.3) '@svitejs/changesets-changelog-github-compact': specifier: ^1.2.0 version: 1.2.0 @@ -34,7 +34,7 @@ importers: version: 9.24.0 eslint-plugin-svelte: specifier: ^3.5.1 - version: 3.5.1(eslint@9.24.0)(svelte@5.25.7) + version: 3.5.1(eslint@9.24.0)(svelte@5.30.2) magic-string: specifier: ^0.30.17 version: 0.30.17 @@ -46,7 +46,7 @@ importers: version: 2.5.10(prettier@3.5.3) prettier-plugin-svelte: specifier: ^3.3.3 - version: 3.3.3(prettier@3.5.3)(svelte@5.25.7) + version: 3.3.3(prettier@3.5.3)(svelte@5.30.2) rolldown: specifier: 1.0.0-beta.1 version: 1.0.0-beta.1(@babel/runtime@7.27.0) @@ -55,7 +55,7 @@ importers: version: link:packages/cli svelte: specifier: ^5.25.7 - version: 5.25.7 + version: 5.30.2 typescript: specifier: ^5.8.3 version: 5.8.3 @@ -216,6 +216,12 @@ importers: silver-fleece: specifier: ^1.2.1 version: 1.2.1 + svelte: + specifier: ^5.30.2 + version: 5.30.2 + svelte-ast-print: + specifier: ^1.0.1 + version: 1.0.1(svelte@5.30.2) zimmerframe: specifier: ^1.1.2 version: 1.1.2 @@ -254,7 +260,7 @@ importers: version: 1.1.1 semver: specifier: ^7.7.1 - version: 7.7.1 + version: 7.7.2 tiny-glob: specifier: ^0.2.9 version: 0.2.9 @@ -514,8 +520,8 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.5.1': - resolution: {integrity: sha512-soEIOALTfTK6EjmKMMoLugwaP0rzkad90iIWd1hMO9ARkSAyjfMfkRRhLvD5qH7vvM0Cg72pieUfR6yh6XxC4w==} + '@eslint-community/eslint-utils@4.7.0': + resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 @@ -1956,8 +1962,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + semver@7.7.2: + resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} hasBin: true @@ -2055,6 +2061,12 @@ packages: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} + svelte-ast-print@1.0.1: + resolution: {integrity: sha512-RJiwV6E9I2pmz4RtLt6yVtIZc15sAqxsZ8Ai8lfDC2b+Kze69rJNLQ9OJr8NU1dUThZx56FY0TyfiqAuIAZoqA==} + engines: {node: '>=20'} + peerDependencies: + svelte: ^5.20.0 + svelte-eslint-parser@1.1.2: resolution: {integrity: sha512-vqFBRamDKo1l70KMfxxXj1/0Cco5TfMDnqaAjgz6D8PyoMhfMcDOLRkAwPg8WkMyZjMtQL3wW66TZ0x59iqO2w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2068,8 +2080,8 @@ packages: resolution: {integrity: sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==} engines: {node: '>=16'} - svelte@5.25.7: - resolution: {integrity: sha512-0fzXbXaKfSvFUs6Wxev2h4CoEhexZotbTF9EJ4+Cg7MHW64ZnZ9+xUedZyEpgj0Tt9HrYGv9aASHkqjn9b/cPw==} + svelte@5.30.2: + resolution: {integrity: sha512-zfGFEwwPeILToOxOqQyFq/vc8euXrX2XyoffkBNgn/k8D1nxbLt5+mNaqQBmZF/vVhBGmkY6VmNK18p9Gf0auQ==} engines: {node: '>=18'} synckit@0.9.2: @@ -2363,7 +2375,7 @@ snapshots: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.7.1 + semver: 7.7.2 '@changesets/assemble-release-plan@6.0.6': dependencies: @@ -2372,7 +2384,7 @@ snapshots: '@changesets/should-skip-package': 0.1.2 '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 - semver: 7.7.1 + semver: 7.7.2 '@changesets/changelog-git@0.2.1': dependencies: @@ -2405,7 +2417,7 @@ snapshots: package-manager-detector: 0.2.11 picocolors: 1.1.1 resolve-from: 5.0.0 - semver: 7.7.1 + semver: 7.7.2 spawndamnit: 3.0.1 term-size: 2.2.1 @@ -2428,7 +2440,7 @@ snapshots: '@changesets/types': 6.1.0 '@manypkg/get-packages': 1.1.3 picocolors: 1.1.1 - semver: 7.7.1 + semver: 7.7.2 '@changesets/get-github-info@0.6.0': dependencies: @@ -2600,7 +2612,7 @@ snapshots: '@esbuild/win32-x64@0.25.2': optional: true - '@eslint-community/eslint-utils@4.5.1(eslint@9.24.0)': + '@eslint-community/eslint-utils@4.7.0(eslint@9.24.0)': dependencies: eslint: 9.24.0 eslint-visitor-keys: 3.4.3 @@ -2875,13 +2887,13 @@ snapshots: dependencies: acorn: 8.14.1 - '@sveltejs/eslint-config@8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.24.0))(eslint-config-prettier@9.1.0(eslint@9.24.0))(eslint-plugin-n@17.13.1(eslint@9.24.0))(eslint-plugin-svelte@3.5.1(eslint@9.24.0)(svelte@5.25.7))(eslint@9.24.0)(typescript-eslint@8.29.0(eslint@9.24.0)(typescript@5.8.3))(typescript@5.8.3)': + '@sveltejs/eslint-config@8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.24.0))(eslint-config-prettier@9.1.0(eslint@9.24.0))(eslint-plugin-n@17.13.1(eslint@9.24.0))(eslint-plugin-svelte@3.5.1(eslint@9.24.0)(svelte@5.30.2))(eslint@9.24.0)(typescript-eslint@8.29.0(eslint@9.24.0)(typescript@5.8.3))(typescript@5.8.3)': dependencies: '@stylistic/eslint-plugin-js': 2.10.1(eslint@9.24.0) eslint: 9.24.0 eslint-config-prettier: 9.1.0(eslint@9.24.0) eslint-plugin-n: 17.13.1(eslint@9.24.0) - eslint-plugin-svelte: 3.5.1(eslint@9.24.0)(svelte@5.25.7) + eslint-plugin-svelte: 3.5.1(eslint@9.24.0)(svelte@5.30.2) globals: 15.15.0 typescript: 5.8.3 typescript-eslint: 8.29.0(eslint@9.24.0)(typescript@5.8.3) @@ -2995,7 +3007,7 @@ snapshots: fast-glob: 3.3.3 is-glob: 4.0.3 minimatch: 9.0.5 - semver: 7.7.1 + semver: 7.7.2 ts-api-utils: 2.1.0(typescript@5.8.3) typescript: 5.8.3 transitivePeerDependencies: @@ -3003,7 +3015,7 @@ snapshots: '@typescript-eslint/utils@8.29.0(eslint@9.24.0)(typescript@5.8.3)': dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.24.0) '@typescript-eslint/scope-manager': 8.29.0 '@typescript-eslint/types': 8.29.0 '@typescript-eslint/typescript-estree': 8.29.0(typescript@5.8.3) @@ -3326,7 +3338,7 @@ snapshots: eslint-compat-utils@0.5.1(eslint@9.24.0): dependencies: eslint: 9.24.0 - semver: 7.7.1 + semver: 7.7.2 eslint-config-prettier@9.1.0(eslint@9.24.0): dependencies: @@ -3334,14 +3346,14 @@ snapshots: eslint-plugin-es-x@7.8.0(eslint@9.24.0): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.24.0) '@eslint-community/regexpp': 4.12.1 eslint: 9.24.0 eslint-compat-utils: 0.5.1(eslint@9.24.0) eslint-plugin-n@17.13.1(eslint@9.24.0): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.24.0) enhanced-resolve: 5.18.1 eslint: 9.24.0 eslint-plugin-es-x: 7.8.0(eslint@9.24.0) @@ -3349,11 +3361,11 @@ snapshots: globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 - semver: 7.7.1 + semver: 7.7.2 - eslint-plugin-svelte@3.5.1(eslint@9.24.0)(svelte@5.25.7): + eslint-plugin-svelte@3.5.1(eslint@9.24.0)(svelte@5.30.2): dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.24.0) '@jridgewell/sourcemap-codec': 1.5.0 eslint: 9.24.0 esutils: 2.0.3 @@ -3361,10 +3373,10 @@ snapshots: postcss: 8.5.3 postcss-load-config: 3.1.4(postcss@8.5.3) postcss-safe-parser: 7.0.1(postcss@8.5.3) - semver: 7.7.1 - svelte-eslint-parser: 1.1.2(svelte@5.25.7) + semver: 7.7.2 + svelte-eslint-parser: 1.1.2(svelte@5.30.2) optionalDependencies: - svelte: 5.25.7 + svelte: 5.30.2 transitivePeerDependencies: - ts-node @@ -3379,7 +3391,7 @@ snapshots: eslint@9.24.0: dependencies: - '@eslint-community/eslint-utils': 4.5.1(eslint@9.24.0) + '@eslint-community/eslint-utils': 4.7.0(eslint@9.24.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.20.0 '@eslint/config-helpers': 0.2.1 @@ -3896,10 +3908,10 @@ snapshots: optionalDependencies: prettier: 3.5.3 - prettier-plugin-svelte@3.3.3(prettier@3.5.3)(svelte@5.25.7): + prettier-plugin-svelte@3.3.3(prettier@3.5.3)(svelte@5.30.2): dependencies: prettier: 3.5.3 - svelte: 5.25.7 + svelte: 5.30.2 prettier@2.8.8: {} @@ -3987,7 +3999,7 @@ snapshots: safer-buffer@2.1.2: {} - semver@7.7.1: {} + semver@7.7.2: {} shebang-command@2.0.0: dependencies: @@ -4020,7 +4032,7 @@ snapshots: get-stdin: 9.0.0 git-hooks-list: 3.2.0 is-plain-obj: 4.1.0 - semver: 7.7.1 + semver: 7.7.2 sort-object-keys: 1.1.3 tinyglobby: 0.2.12 @@ -4090,7 +4102,12 @@ snapshots: dependencies: has-flag: 4.0.0 - svelte-eslint-parser@1.1.2(svelte@5.25.7): + svelte-ast-print@1.0.1(svelte@5.30.2): + dependencies: + esrap: 1.4.6 + svelte: 5.30.2 + + svelte-eslint-parser@1.1.2(svelte@5.30.2): dependencies: eslint-scope: 8.3.0 eslint-visitor-keys: 4.2.0 @@ -4099,7 +4116,7 @@ snapshots: postcss-scss: 4.0.9(postcss@8.5.3) postcss-selector-parser: 7.1.0 optionalDependencies: - svelte: 5.25.7 + svelte: 5.30.2 svelte@4.2.19: dependencies: @@ -4118,7 +4135,7 @@ snapshots: magic-string: 0.30.17 periscopic: 3.1.0 - svelte@5.25.7: + svelte@5.30.2: dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0