From 00aaad16b2601ce3c94735dc4c3633107268b163 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 30 Nov 2024 10:17:04 -0500 Subject: [PATCH] fix: generate correct code when encountering object expression statement (#14480) * bump esrap * changeset --- .changeset/sixty-kings-learn.md | 5 +++++ packages/svelte/package.json | 2 +- pnpm-lock.yaml | 14 +++++++------- sites/svelte-5-preview/package.json | 2 +- 4 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 .changeset/sixty-kings-learn.md diff --git a/.changeset/sixty-kings-learn.md b/.changeset/sixty-kings-learn.md new file mode 100644 index 000000000000..927e21fa78c8 --- /dev/null +++ b/.changeset/sixty-kings-learn.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: generate correct code when encountering object expression statement diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 4a0747041abb..6b3970c7f9e8 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -143,7 +143,7 @@ "aria-query": "^5.3.1", "axobject-query": "^4.1.0", "esm-env": "^1.2.0", - "esrap": "^1.2.2", + "esrap": "^1.2.3", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2556f0c10022..9609d3e5750a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -84,8 +84,8 @@ importers: specifier: ^1.2.0 version: 1.2.0 esrap: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^1.2.3 + version: 1.2.3 is-reference: specifier: ^3.0.3 version: 3.0.3 @@ -260,8 +260,8 @@ importers: specifier: ^1.0.0 version: 1.0.11(@sveltejs/kit@2.8.3(@sveltejs/vite-plugin-svelte@4.0.0-next.6(svelte@packages+svelte)(vite@5.4.6(@types/node@20.12.7)(lightningcss@1.23.0)(sass@1.70.0)(terser@5.27.0)))(svelte@packages+svelte)(vite@5.4.6(@types/node@20.12.7)(lightningcss@1.23.0)(sass@1.70.0)(terser@5.27.0)))(svelte@packages+svelte) esrap: - specifier: ^1.2.2 - version: 1.2.2 + specifier: ^1.2.3 + version: 1.2.3 publint: specifier: ^0.2.7 version: 0.2.7 @@ -1462,8 +1462,8 @@ packages: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} - esrap@1.2.2: - resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==} + esrap@1.2.3: + resolution: {integrity: sha512-ZlQmCCK+n7SGoqo7DnfKaP1sJZa49P01/dXzmjCASSo04p72w8EksT2NMK8CEX8DhKsfJXANioIw8VyHNsBfvQ==} esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} @@ -4214,7 +4214,7 @@ snapshots: dependencies: estraverse: 5.3.0 - esrap@1.2.2: + esrap@1.2.3: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 '@types/estree': 1.0.6 diff --git a/sites/svelte-5-preview/package.json b/sites/svelte-5-preview/package.json index db4dd6d417cd..356a57c3f607 100644 --- a/sites/svelte-5-preview/package.json +++ b/sites/svelte-5-preview/package.json @@ -19,7 +19,7 @@ "@sveltejs/site-kit": "6.0.0-next.64", "@sveltejs/vite-plugin-svelte": "^4.0.0-next.6", "@vercel/speed-insights": "^1.0.0", - "esrap": "^1.2.2", + "esrap": "^1.2.3", "marked": "^9.0.0", "publint": "^0.2.7", "shiki": "^0.14.7",