Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1 (#7314)
This commit is contained in:
parent
8a029d9889
commit
e47e53dc0c
4 changed files with 42 additions and 17 deletions
5
.changeset/sour-turtles-tap.md
Normal file
5
.changeset/sour-turtles-tap.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1
|
|
@ -38,18 +38,18 @@
|
||||||
"dev": "astro-scripts dev \"src/**/*.ts\""
|
"dev": "astro-scripts dev \"src/**/*.ts\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sveltejs/vite-plugin-svelte": "^2.1.1",
|
"@sveltejs/vite-plugin-svelte": "^2.4.1",
|
||||||
"svelte2tsx": "^0.5.11"
|
"svelte2tsx": "^0.6.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"astro": "workspace:*",
|
"astro": "workspace:*",
|
||||||
"astro-scripts": "workspace:*",
|
"astro-scripts": "workspace:*",
|
||||||
"svelte": "^3.54.0",
|
"svelte": "^3.55.0",
|
||||||
"vite": "^4.3.1"
|
"vite": "^4.3.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"astro": "workspace:^2.6.1",
|
"astro": "workspace:^2.6.1",
|
||||||
"svelte": "^3.54.0"
|
"svelte": "^3.55.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.12.0"
|
"node": ">=16.12.0"
|
||||||
|
|
|
@ -10,7 +10,7 @@ export function toTSX(code: string, className: string): string {
|
||||||
let tsx = svelte2tsx(code, { mode: 'ts' }).code;
|
let tsx = svelte2tsx(code, { mode: 'ts' }).code;
|
||||||
tsx = '/// <reference types="svelte2tsx/svelte-shims" />\n' + tsx;
|
tsx = '/// <reference types="svelte2tsx/svelte-shims" />\n' + tsx;
|
||||||
result = tsx.replace(
|
result = tsx.replace(
|
||||||
'export default class extends __sveltets_1_createSvelte2TsxComponent(',
|
'export default class extends __sveltets_2_createSvelte2TsxComponent(',
|
||||||
`export default function ${className}__AstroComponent_(_props: typeof Component.props): any {}\nlet Component = `
|
`export default function ${className}__AstroComponent_(_props: typeof Component.props): any {}\nlet Component = `
|
||||||
);
|
);
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
|
|
|
@ -4752,11 +4752,11 @@ importers:
|
||||||
packages/integrations/svelte:
|
packages/integrations/svelte:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@sveltejs/vite-plugin-svelte':
|
'@sveltejs/vite-plugin-svelte':
|
||||||
specifier: ^2.1.1
|
specifier: ^2.4.1
|
||||||
version: 2.1.1(svelte@3.58.0)(vite@4.3.1)
|
version: 2.4.1(svelte@3.58.0)(vite@4.3.1)
|
||||||
svelte2tsx:
|
svelte2tsx:
|
||||||
specifier: ^0.5.11
|
specifier: ^0.6.15
|
||||||
version: 0.5.11(svelte@3.58.0)(typescript@5.0.2)
|
version: 0.6.15(svelte@3.58.0)(typescript@5.0.2)
|
||||||
devDependencies:
|
devDependencies:
|
||||||
astro:
|
astro:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
|
@ -4765,7 +4765,7 @@ importers:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../../scripts
|
version: link:../../../scripts
|
||||||
svelte:
|
svelte:
|
||||||
specifier: ^3.54.0
|
specifier: ^3.55.0
|
||||||
version: 3.58.0
|
version: 3.58.0
|
||||||
vite:
|
vite:
|
||||||
specifier: ^4.3.1
|
specifier: ^4.3.1
|
||||||
|
@ -8582,16 +8582,36 @@ packages:
|
||||||
string.prototype.matchall: 4.0.8
|
string.prototype.matchall: 4.0.8
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@sveltejs/vite-plugin-svelte@2.1.1(svelte@3.58.0)(vite@4.3.1):
|
/@sveltejs/vite-plugin-svelte-inspector@1.0.2(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@3.58.0)(vite@4.3.1):
|
||||||
resolution: {integrity: sha512-7YeBDt4us0FiIMNsVXxyaP4Hwyn2/v9x3oqStkHU3ZdIc5O22pGwUwH33wUqYo+7Itdmo8zxJ45Qvfm3H7UUjQ==}
|
resolution: {integrity: sha512-Cy1dUMcYCnDVV/hPLXa43YZJ2jGKVW5rA0xuNL9dlmYhT0yoS1g7+FOFSRlgk0BXKk/Oc7grs+8BVA5Iz2fr8A==}
|
||||||
engines: {node: ^14.18.0 || >= 16}
|
engines: {node: ^14.18.0 || >= 16}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: ^3.54.0
|
'@sveltejs/vite-plugin-svelte': ^2.2.0
|
||||||
|
svelte: ^3.54.0 || ^4.0.0-next.0
|
||||||
vite: ^4.0.0
|
vite: ^4.0.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
vite:
|
vite:
|
||||||
optional: true
|
optional: true
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@sveltejs/vite-plugin-svelte': 2.4.1(svelte@3.58.0)(vite@4.3.1)
|
||||||
|
debug: 4.3.4
|
||||||
|
svelte: 3.58.0
|
||||||
|
vite: 4.3.1(@types/node@18.16.3)(sass@1.52.2)
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- supports-color
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@sveltejs/vite-plugin-svelte@2.4.1(svelte@3.58.0)(vite@4.3.1):
|
||||||
|
resolution: {integrity: sha512-bNNKvoRY89ptY7udeBSCmTdCVwkjmMcZ0j/z9J5MuedT8jPjq0zrknAo/jF1sToAza4NVaAgR9AkZoD9oJJmnA==}
|
||||||
|
engines: {node: ^14.18.0 || >= 16}
|
||||||
|
peerDependencies:
|
||||||
|
svelte: ^3.54.0 || ^4.0.0-next.0
|
||||||
|
vite: ^4.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
vite:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@sveltejs/vite-plugin-svelte-inspector': 1.0.2(@sveltejs/vite-plugin-svelte@2.4.1)(svelte@3.58.0)(vite@4.3.1)
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
deepmerge: 4.3.1
|
deepmerge: 4.3.1
|
||||||
kleur: 4.1.5
|
kleur: 4.1.5
|
||||||
|
@ -16764,11 +16784,11 @@ packages:
|
||||||
svelte: 3.58.0
|
svelte: 3.58.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/svelte2tsx@0.5.11(svelte@3.58.0)(typescript@5.0.2):
|
/svelte2tsx@0.6.15(svelte@3.58.0)(typescript@5.0.2):
|
||||||
resolution: {integrity: sha512-Is95G1wqNvEUJZ9DITRS2zfMwVJRZztMduPs1vJJ0cm65WUg/avBl5vBXjHycQL/qmFpaqa3NG4qWnf7bCHPag==}
|
resolution: {integrity: sha512-+j6RmA3g5pPs1DHa/rdzJjjhZuCfWx0IbNPaR99A2bvOSPPY6BlVkBGU0urI+DGcWHhYEG28Flo942KqlAkpEQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
svelte: ^3.24
|
svelte: ^3.55 || ^4.0
|
||||||
typescript: ^4.1.2
|
typescript: ^4.9.4 || ^5.0.0
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
typescript:
|
typescript:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
Loading…
Reference in a new issue