Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ playground/*/.node-version
.playwright-mcp
playground-local
.worktrees
.svelte-kit/
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"devDependencies": {
"@iconify/vue": "5.0.1",
"@voidzero-dev/vitepress-theme": "^4.8.4",
"oxc-minify": "^0.129.0",
"reka-ui": "2.9.7",
"oxc-minify": "^0.138.0",
"reka-ui": "2.10.1",
"vitepress": "2.0.0-alpha.16",
"vitepress-plugin-group-icons": "^1.7.5",
"void": "workspace:*"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"@typescript/native-preview": "catalog:",
"cross-spawn": "^7.0.6",
"eslint-plugin-react-hooks": "^7.1.1",
"playwright": "^1.59.1",
"playwright": "^1.61.1",
"rolldown": "^1.1.4",
"vite-plus": "catalog:",
"vitest": "catalog:"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/md/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@shikijs/engine-javascript": "^4.0.2",
"@shikijs/transformers": "^4.0.2",
"@shikijs/engine-javascript": "^4.3.1",
"@shikijs/transformers": "^4.3.1",
"gray-matter": "^4.0.3",
"markdown-exit": "1.0.0-beta.9",
"markdown-exit": "1.1.0-beta.2",
"markdown-it-anchor": "^9.2.0",
"markdown-it-attrs": "^4.3.1",
"markdown-it-attrs": "^5.0.0",
"markdown-it-container": "^4.0.0",
"markdown-it-emoji": "^3.0.0",
"markdown-it-footnote": "^4.0.0",
"pathe": "catalog:",
"shiki": "^4.0.2",
"tinyglobby": "^0.2.16"
"shiki": "^4.3.1",
"tinyglobby": "^0.2.17"
},
"devDependencies": {
"@types/node": "catalog:",
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*",
"vue": "^3.5.34"
"vue": "^3.5.39"
},
"peerDependencies": {
"vite": "^8.0.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@vitejs/plugin-react": "^6.0.1"
"@vitejs/plugin-react": "^6.0.3"
},
"devDependencies": {
"@types/node": "catalog:",
"@types/react": "^19.2.14",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"pathe": "catalog:",
"react": "^19.2.6",
"react-dom": "^19.2.6",
"react": "^19.2.7",
"react-dom": "^19.2.7",
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"devDependencies": {
"@types/node": "catalog:",
"pathe": "catalog:",
"solid-js": "^1.9.12",
"solid-js": "^1.9.14",
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"devDependencies": {
"@types/node": "catalog:",
"pathe": "catalog:",
"svelte": "^5.55.5",
"svelte": "^5.56.4",
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*"
Expand Down
22 changes: 11 additions & 11 deletions packages/void/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,42 +313,42 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@cloudflare/sandbox": "^0.10.0",
"@cloudflare/vite-plugin": "^1.36.3",
"@cloudflare/sandbox": "^0.12.3",
"@cloudflare/vite-plugin": "^1.43.0",
"@cloudflare/workers-types": "catalog:",
"@hono/oauth-providers": "^0.8.5",
"@napi-rs/keyring": "1.3.0",
"better-auth": "^1.6.9",
"better-sqlite3": "^12.9.0",
"better-auth": "^1.6.23",
"better-sqlite3": "^12.11.1",
"blake3-jit": "^1.1.0",
"drizzle-arktype": "^0.1.3",
"drizzle-kit": "^0.31.10",
"drizzle-orm": "^0.45.2",
"drizzle-valibot": "^0.4.2",
"drizzle-zod": "^0.8.3",
"es-module-lexer": "^2.1.0",
"hono": "^4.12.18",
"es-module-lexer": "^2.3.0",
"hono": "^4.12.27",
"ignore": "^7.0.5",
"jsonc-parser": "3.3.1",
"pg": "^8.20.0",
"pg": "8.22.0",
"wrangler": "catalog:"
},
"devDependencies": {
"@clack/prompts": "catalog:",
"@electric-sql/pglite": "0.4.5",
"@electric-sql/pglite": "0.5.4",
"@types/better-sqlite3": "^7.6.13",
"@types/node": "catalog:",
"@types/pg": "^8.20.0",
"@typescript/native-preview": "catalog:",
"arktype": "^2.2.0",
"arktype": "^2.2.2",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21",
"ofetch": "2.0.0-alpha.3",
"pathe": "catalog:",
"pglite-server": "0.1.5",
"picocolors": "^1.1.1",
"tinyglobby": "^0.2.16",
"valibot": "^1.4.0",
"tinyglobby": "^0.2.17",
"valibot": "^1.4.2",
"vite": "catalog:",
"vite-plus": "catalog:",
"zod": "^4.4.3"
Expand Down
4 changes: 4 additions & 0 deletions packages/void/src/cli/wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ function patchPgWorkerBundle(outDir: string): void {
.replace(
'var __require = /* @__PURE__ */ createRequire(import.meta.url);',
pgWorkerRequireShim(),
)
.replace(
'var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();',
pgWorkerRequireShim(),
);
code =
`const __voidPgpassNoop = Object.assign(function pgpass(_connectionInfo, callback) { callback(undefined); }, { warnTo() {} });\n` +
Expand Down
36 changes: 36 additions & 0 deletions packages/void/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,41 @@ export function voidPlugin(options?: {
},
};

// Nuxt's SSR Vite server can inherit the client HTTP server while also
// receiving its own HMR port. That attaches two upgrade handlers to the
// same socket under current Vite, so keep the SSR transport on its
// dedicated port. Update both keys for Vite 7 and Vite 8 compatibility.
const nuxtVite8WebSocketCompatPlugin: Plugin | undefined =
detected.name === 'nuxt'
? {
name: 'void:nuxt-vite8-websocket-compat',
enforce: 'post',
configResolved(resolvedConfig) {
if (!resolvedConfig.build.ssr) {
return;
}
if (
typeof resolvedConfig.server.hmr === 'object' &&
resolvedConfig.server.hmr.port !== undefined
) {
resolvedConfig.server.hmr = {
...resolvedConfig.server.hmr,
server: undefined,
};
}
if (
typeof resolvedConfig.server.ws === 'object' &&
resolvedConfig.server.ws.port !== undefined
) {
resolvedConfig.server.ws = {
...resolvedConfig.server.ws,
server: undefined,
};
}
},
}
: undefined;

// SvelteKit hooks injection: transform get_hooks() to wrap `handle` with
// withRuntimeEnv(event.platform.env, ...). This stores the env in
// AsyncLocalStorage so void/db resolves it via envContext.getStore(), and
Expand Down Expand Up @@ -830,6 +865,7 @@ export function voidPlugin(options?: {
createCloudflareBuiltinsExternalPlugin(),
wranglerCompatPlugin,
wranglerSyncPlugin,
...(nuxtVite8WebSocketCompatPlugin ? [nuxtVite8WebSocketCompatPlugin] : []),
svelteKitHooksInjectPlugin,
clientStubsPlugin,
bindingRuntimePlugin(bindingNames),
Expand Down
2 changes: 1 addition & 1 deletion packages/void/src/runtime/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ export class VoidPlatformSandbox<Env = unknown> extends Sandbox<Env> {
await this.ctx.storage.setAlarm(startedAt + HEARTBEAT_MS);
}

override async alarm(alarmProps?: { isRetry: boolean; retryCount: number }): Promise<void> {
override async alarm(alarmProps?: AlarmInvocationInfo): Promise<void> {
// Container's alarm() dispatches any scheduled() tasks. Run it first so
// upstream behaviour (idle timeouts, user-scheduled work) is preserved
// before we layer our metering heartbeat on top.
Expand Down
1 change: 1 addition & 0 deletions packages/void/test/integration/astro.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe('playground/astro dev', () => {
stdio: ['ignore', 'pipe', 'pipe'],
env: {
...process.env,
ASTRO_DEV_BACKGROUND: 'false',
VOID_INSPECTOR_PORT: 'false',
},
},
Expand Down
34 changes: 34 additions & 0 deletions packages/void/test/unit/plugin-inference.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,40 @@ describe('detectFramework', () => {
}
});

it('keeps Nuxt SSR WebSockets on their dedicated port', () => {
const root = createTempRoot();
writeFileSync(
join(root, 'package.json'),
JSON.stringify({ type: 'module', dependencies: { nuxt: '^4.0.0' } }),
);
const cwd = vi.spyOn(process, 'cwd').mockReturnValue(root);

try {
const plugins = voidPlugin();
const compatPlugin = plugins.find(
(plugin) => plugin.name === 'void:nuxt-vite8-websocket-compat',
);
const configResolved = getHookHandler(compatPlugin?.configResolved) as (
config: import('vite').ResolvedConfig,
) => void;
const sharedServer = {};
const config = {
build: { ssr: true },
server: {
hmr: { port: 24678, server: sharedServer },
ws: { port: 24678, server: sharedServer },
},
} as unknown as import('vite').ResolvedConfig;

configResolved(config);

expect(config.server.hmr).toMatchObject({ port: 24678, server: undefined });
expect(config.server.ws).toMatchObject({ port: 24678, server: undefined });
} finally {
cwd.mockRestore();
}
});

it('persists default void.json compatibility during build startup', () => {
const root = createTempRoot();
writeFileSync(join(root, 'package.json'), JSON.stringify({ type: 'module' }));
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@vitejs/plugin-vue": "^6.0.6"
"@vitejs/plugin-vue": "^6.0.7"
},
"devDependencies": {
"@types/node": "catalog:",
"pathe": "catalog:",
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*",
"vue": "^3.5.34"
"vue": "^3.5.39"
},
"peerDependencies": {
"vite": "^8.0.0",
Expand Down
23 changes: 12 additions & 11 deletions playground/analog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@
"dev": "vp dev"
},
"dependencies": {
"@analogjs/router": "^2.5.0",
"@angular/common": "^21.2.12",
"@angular/compiler": "^21.2.12",
"@angular/core": "^21.2.12",
"@angular/platform-browser": "^21.2.12",
"@angular/platform-server": "^21.2.12",
"@angular/router": "^21.2.12",
"@analogjs/content": "^2.6.2",
"@analogjs/router": "^2.6.2",
"@angular/common": "^22.0.5",
"@angular/compiler": "^22.0.5",
"@angular/core": "^22.0.5",
"@angular/platform-browser": "^22.0.5",
"@angular/platform-server": "^22.0.5",
"@angular/router": "^22.0.5",
"rxjs": "~7.8.2",
"tslib": "^2.8.1"
},
"devDependencies": {
"@analogjs/platform": "^2.5.0",
"@analogjs/vite-plugin-angular": "^2.5.0",
"@angular/build": "^21.2.10",
"@angular/compiler-cli": "^21.2.12",
"@analogjs/platform": "^2.6.2",
"@analogjs/vite-plugin-angular": "^2.6.2",
"@angular/build": "^22.0.5",
"@angular/compiler-cli": "^22.0.5",
"nitro-cloudflare-dev": "^0.2.2",
"pathe": "catalog:",
"typescript": "~6.0.3",
Expand Down
4 changes: 2 additions & 2 deletions playground/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"dev": "astro dev"
},
"dependencies": {
"@astrojs/cloudflare": "^13.5.0",
"astro": "^6.3.1"
"@astrojs/cloudflare": "^14.1.1",
"astro": "^7.0.6"
},
"devDependencies": {
"@typescript/native-preview": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions playground/kitchen-sink/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"hono": "^4.12.18",
"valibot": "^1.4.0",
"vue": "^3.5.34"
"hono": "^4.12.27",
"valibot": "^1.4.2",
"vue": "^3.5.39"
},
"devDependencies": {
"@void/vue": "workspace:*",
"typescript": "~6.0.3",
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*",
"vue-tsc": "^3.2.8"
"vue-tsc": "^3.3.6"
}
}
4 changes: 2 additions & 2 deletions playground/markdown-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"vue": "^3.5.34"
"vue": "^3.5.39"
},
"devDependencies": {
"@void/md": "workspace:*",
Expand All @@ -18,6 +18,6 @@
"vite": "catalog:",
"vite-plus": "catalog:",
"void": "workspace:*",
"vue-tsc": "^3.2.8"
"vue-tsc": "^3.3.6"
}
}
8 changes: 4 additions & 4 deletions playground/named-layouts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"preview": "vp preview"
},
"dependencies": {
"hono": "^4.12.18",
"react": "^19.2.6",
"react-dom": "^19.2.6"
"hono": "^4.12.27",
"react": "^19.2.7",
"react-dom": "^19.2.7"
},
"devDependencies": {
"@types/react": "^19.2.14",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "catalog:",
"@void/md": "workspace:*",
Expand Down
Loading