Skip to content

fix: stop adapter-vercel tracing from globbing the whole drive on Windows - #16972

Merged
Rich-Harris merged 1 commit into
version-3from
vercel-trace-root-glob
Aug 28, 2026
Merged

fix: stop adapter-vercel tracing from globbing the whole drive on Windows#16972
Rich-Harris merged 1 commit into
version-3from
vercel-trace-root-glob

Conversation

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor

create_function_bundle traces with base set to the filesystem root. nft treats any absolute-looking string with a dynamic segment as an asset glob, and the server output has URL strings like

`/${app_dir}/routes${route_id}`   // runtime/pathname.js

On Linux this resolves to /<*>/routes, the parent directory is '', the stat fails and nothing happens. On Windows it resolves to D:\<*>\routes, the parent D: stats fine, and nft runs glob('D:/**/*/routes') over the whole drive, which never finishes once it hits pagefile.sys.

nft also evaluates process.cwd() as base unless told otherwise, so path.join(process.cwd(), 'asset.txt') was traced from / and never bundled.

nft calls ignore with the glob relative to base before walking, and a base-rooted glob is **\*\routes. The cwd case has a regression test; the root-glob case can't fire on Linux for the reason above.

Fixes #16963. Supersedes #16964. Related: vercel/nft#609.

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from 1f04ce6:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/1f04ce6ab7a0ed5d2fa7c777217cc60089358c13

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16972

@changeset-bot

changeset-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1f04ce6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-vercel Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

@Rich-Harris
Rich-Harris merged commit 2eed638 into version-3 Aug 28, 2026
40 checks passed
@Rich-Harris
Rich-Harris deleted the vercel-trace-root-glob branch August 28, 2026 02:23
@manvankaliber

Copy link
Copy Markdown

I am weirdly very happy to know I wasn't doing anything wrong. Thank you very much for getting this patch in this fast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@sveltejs/adapter-vercel 7.0.0-next.8 build hangs endlessly due to faulty directory scan

3 participants