diff --git a/.changeset/friendly-queens-melt.md b/.changeset/friendly-queens-melt.md new file mode 100644 index 0000000000..bbfce12bfb --- /dev/null +++ b/.changeset/friendly-queens-melt.md @@ -0,0 +1,5 @@ +--- +"svelte": patch +--- + +chore: bump some devDependencies diff --git a/package.json b/package.json index 971bd020d1..df882141ac 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@sveltejs/eslint-config": "^8.3.3", "@svitejs/changesets-changelog-github-compact": "^1.1.0", "@types/node": "^20.11.5", + "@types/picomatch": "^4.0.2", "@vitest/coverage-v8": "^2.1.9", "eslint": "^9.9.1", "eslint-plugin-lube": "^0.4.3", diff --git a/packages/svelte/src/compiler/types/index.d.ts b/packages/svelte/src/compiler/types/index.d.ts index e13c9a9e22..9bd4b91d58 100644 --- a/packages/svelte/src/compiler/types/index.d.ts +++ b/packages/svelte/src/compiler/types/index.d.ts @@ -283,11 +283,16 @@ export type DeclarationKind = | 'var' | 'let' | 'const' + | 'using' + | 'await using' | 'function' | 'import' | 'param' | 'rest_param' - | 'synthetic'; + | 'synthetic' + // TODO not yet implemented, but needed for TypeScript reasons + | 'using' + | 'await using'; export interface ExpressionMetadata { /** All the bindings that are referenced eagerly (not inside functions) in this expression */ diff --git a/packages/svelte/src/compiler/utils/builders.js b/packages/svelte/src/compiler/utils/builders.js index f69beed509..99306ce4d9 100644 --- a/packages/svelte/src/compiler/utils/builders.js +++ b/packages/svelte/src/compiler/utils/builders.js @@ -364,7 +364,14 @@ export function prop(kind, key, value, computed = false) { * @returns {ESTree.PropertyDefinition} */ export function prop_def(key, value, computed = false, is_static = false) { - return { type: 'PropertyDefinition', key, value, computed, static: is_static }; + return { + type: 'PropertyDefinition', + decorators: [], + key, + value, + computed, + static: is_static + }; } /** @@ -565,6 +572,7 @@ function for_builder(init, test, update, body) { export function method(kind, key, params, body, computed = false, is_static = false) { return { type: 'MethodDefinition', + decorators: [], key, kind, value: function_builder(null, params, block(body)), @@ -610,6 +618,7 @@ function if_builder(test, consequent, alternate) { export function import_all(as, source) { return { type: 'ImportDeclaration', + attributes: [], source: literal(source), specifiers: [import_namespace(as)] }; @@ -623,6 +632,7 @@ export function import_all(as, source) { export function imports(parts, source) { return { type: 'ImportDeclaration', + attributes: [], source: literal(source), specifiers: parts.map((p) => ({ type: 'ImportSpecifier', diff --git a/packages/svelte/tests/parser-legacy/samples/each-block-destructured/output.json b/packages/svelte/tests/parser-legacy/samples/each-block-destructured/output.json index d19f5cbbfd..637da24aea 100644 --- a/packages/svelte/tests/parser-legacy/samples/each-block-destructured/output.json +++ b/packages/svelte/tests/parser-legacy/samples/each-block-destructured/output.json @@ -259,7 +259,8 @@ "kind": "let" }, "specifiers": [], - "source": null + "source": null, + "attributes": [] } ], "sourceType": "module" diff --git a/packages/svelte/tests/parser-legacy/samples/script-context-module-unquoted/output.json b/packages/svelte/tests/parser-legacy/samples/script-context-module-unquoted/output.json index 03a526f04e..64250cb302 100644 --- a/packages/svelte/tests/parser-legacy/samples/script-context-module-unquoted/output.json +++ b/packages/svelte/tests/parser-legacy/samples/script-context-module-unquoted/output.json @@ -169,7 +169,8 @@ "kind": "const" }, "specifiers": [], - "source": null + "source": null, + "attributes": [] } ], "sourceType": "module" diff --git a/playgrounds/sandbox/Wrapper.svelte b/playgrounds/sandbox/Wrapper.svelte deleted file mode 100644 index 1fe82c1716..0000000000 --- a/playgrounds/sandbox/Wrapper.svelte +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - {#snippet pending()}{/snippet} - diff --git a/playgrounds/sandbox/index.html b/playgrounds/sandbox/index.html index 639409b877..d70409ffb6 100644 --- a/playgrounds/sandbox/index.html +++ b/playgrounds/sandbox/index.html @@ -12,7 +12,7 @@