Installs patch-package (^8.0.0) and a postinstall script, then applies the diff from vitest PR #10267 against @vitest/browser-playwright@4.1.0. What the patch changes (in dist/index.js): - createPredicate(sessionId, url) → createPredicate(url): factory becomes pure, returns { url, predicate } instead of mutating sessionIds / idPreficates as a side-effect. - sessionIds value type: array → Set (deduplicates resolved URLs). - register handler now looks up any existing predicate for the (sessionId, resolvedUrl) pair and unroutes it BEFORE installing the new route. This is the actual race fix: without it, the second vi.mock for a duplicate-id leaks an orphan Playwright route that fires after birpc closes. - clear handler iterates the Set via spread. Why this matters even though Layer 1 normalised the only known duplicate in our suite: every future vi.mock call is a class of race we shouldn't have to think about. The patch closes the upstream gap at the route-handler level, so a contributor reintroducing the duplicate-id pattern can't reopen the race. When to remove: when @vitest/browser-playwright ships a release containing PR #10267. Delete patches/@vitest+browser-playwright+4.1.0.patch and the postinstall hook (or keep the hook if other patches accumulate). Refs: #553 · vitest-dev/vitest#9957 · vitest-dev/vitest#10267 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sv
Everything you need to build a Svelte project, powered by sv.
Creating a project
If you're seeing this, you've probably already done this step. Congrats!
# create a new project in the current directory
npx sv create
# create a new project in my-app
npx sv create my-app
Developing
Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Building
To create a production version of your app:
npm run build
You can preview the production build with npm run preview.
To deploy your app, you may need to install an adapter for your target environment.