Skip to content

Commit

Permalink
Bump svelte version, add support for updated Runes
Browse files Browse the repository at this point in the history
  • Loading branch information
SeppahBaws committed Jul 5, 2024
1 parent fc4abff commit 2271b46
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/houdini-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"houdini": "workspace:^",
"recast": "^0.23.1",
"rollup": "^3.7.4",
"svelte": "5.0.0-next.138",
"svelte": "5.0.0-next.165",
"vite": "^5.2.12"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/houdini-svelte/src/plugin/extract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ describe('parser svelte 5 runes detection', () => {
</script>`,
},
{
runeName: '$effect.active',
runeName: '$effect.tracking',
document: `<script>
const isActive = $effect.active();
const isActive = $effect.tracking();
</script>`,
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/houdini-svelte/src/plugin/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type EmbeddedScript = {
useRunes: boolean
}

// Source: https://github.com/sveltejs/svelte/blob/d4718e0755eac1e505292d0fb7cfd8682eca3048/packages/svelte/src/compiler/phases/constants.js#L31
// Source: https://github.com/sveltejs/svelte/blob/879b0119d53e93c118c9c8519f0f7f54138c34d2/packages/svelte/src/compiler/phases/constants.js#L31
// Be sure to update this when this list changes.
const svelteRunes: string[] = [
'$state',
Expand All @@ -52,7 +52,7 @@ const svelteRunes: string[] = [
'$derived.by',
'$effect',
'$effect.pre',
'$effect.active',
'$effect.tracking',
'$effect.root',
'$inspect',
'$inspect().with',
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-svelte-global-stores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"houdini": "workspace:^",
"houdini-svelte": "workspace:^",
"recast": "^0.23.1",
"svelte": "5.0.0-next.138"
"svelte": "5.0.0-next.165"
},
"files": [
"build"
Expand Down
113 changes: 90 additions & 23 deletions pnpm-lock.yaml

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

0 comments on commit 2271b46

Please sign in to comment.