Skip to content

Commit 9d3644e

Browse files
yangshunclaude
andcommitted
chore(playground): turn on typedRoutes in the Pages playgrounds
The React, Vue, Svelte and Solid Pages playgrounds now check Link and router URL strings against their routes. Also drop the packed-consumer assertion on the scaffolded config; the init tests already cover it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e7a744b commit 9d3644e

5 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎.github/scripts/packed-consumer.mjs‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,6 @@ try {
306306
JSON.parse(readFileSync(join(fixture, 'node_modules/void/package.json'), 'utf8')).version,
307307
version,
308308
);
309-
// New apps check Link and router URL strings; the typecheck below runs with it on.
310-
assert.match(
311-
readFileSync(join(fixture, 'void.config.ts'), 'utf8'),
312-
/"typedRoutes": true/,
313-
'init must turn on routing.typedRoutes for new apps',
314-
);
315309
await run(process.execPath, [cli, 'prepare'], fixture);
316310
await run(manager, manager === 'npm' ? ['ci'] : ['install', '--frozen-lockfile'], fixture);
317311
const extension = framework === 'vue' ? 'vue' : framework === 'svelte' ? 'svelte' : 'tsx';

‎playground/react-pages/void.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { defineConfig } from 'void/config';
33

44
export default defineConfig({
5+
routing: {
6+
typedRoutes: true,
7+
},
58
worker: {
69
compatibility_date: '2026-02-24',
710
},

‎playground/solid-pages/void.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { defineConfig } from 'void/config';
33

44
export default defineConfig({
5+
routing: {
6+
typedRoutes: true,
7+
},
58
worker: {
69
compatibility_date: '2026-02-24',
710
},

‎playground/svelte-pages/void.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { defineConfig } from 'void/config';
33

44
export default defineConfig({
5+
routing: {
6+
typedRoutes: true,
7+
},
58
worker: {
69
compatibility_date: '2026-02-24',
710
},

‎playground/vue-pages/void.config.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
import { defineConfig } from 'void/config';
33

44
export default defineConfig({
5+
routing: {
6+
typedRoutes: true,
7+
},
58
worker: {
69
compatibility_date: '2026-02-24',
710
},

0 commit comments

Comments
 (0)