Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@astrojs/svelte: Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1 #7314

Merged
merged 1 commit into from
Jun 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1
wackbyte committed Jun 6, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d0890c76ba958b069f9b9b2084eb7d7e23b53556
5 changes: 5 additions & 0 deletions .changeset/sour-turtles-tap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': patch
---

Update to svelte2tsx 0.6.15 and vite-plugin-svelte 2.4.1
8 changes: 4 additions & 4 deletions packages/integrations/svelte/package.json
Original file line number Diff line number Diff line change
@@ -38,18 +38,18 @@
"dev": "astro-scripts dev \"src/**/*.ts\""
},
"dependencies": {
"@sveltejs/vite-plugin-svelte": "^2.1.1",
"svelte2tsx": "^0.5.11"
"@sveltejs/vite-plugin-svelte": "^2.4.1",
"svelte2tsx": "^0.6.15"
},
"devDependencies": {
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"svelte": "^3.54.0",
"svelte": "^3.55.0",
"vite": "^4.3.1"
},
"peerDependencies": {
"astro": "workspace:^2.6.1",
"svelte": "^3.54.0"
"svelte": "^3.55.0"
},
"engines": {
"node": ">=16.12.0"
2 changes: 1 addition & 1 deletion packages/integrations/svelte/src/editor.cts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export function toTSX(code: string, className: string): string {
let tsx = svelte2tsx(code, { mode: 'ts' }).code;
tsx = '/// <reference types="svelte2tsx/svelte-shims" />\n' + tsx;
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 = `
);
} catch (e: any) {
44 changes: 32 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.