Skip to content

feat: support concurrent browser async context#39

Draft
kasperpeulen wants to merge 7 commits into
mainfrom
kasper/cced79ec
Draft

feat: support concurrent browser async context#39
kasperpeulen wants to merge 7 commits into
mainfrom
kasper/cced79ec

Conversation

@kasperpeulen

@kasperpeulen kasperpeulen commented May 14, 2026

Copy link
Copy Markdown
Member

Summary

  • adds an unctx-powered compile-time async context transform for browser awaits
  • routes Next app-render request/action/render async storage through the browser ALS shim using nested .run() calls instead of enterWith
  • keeps ReadableStream lifecycles and nested async helper awaits inside the correct request frame
  • adds concurrent ALS coverage, Next request-context coverage, and non-default browser API ports for playground suites
  • pre-optimizes unctx in the Next playgrounds so browser-mode CI does not reload tests mid-import

Validation

  • pnpm --dir packages/vitest-plugin-rsc exec vitest run src/async-local-storage.test.ts src/async-local-storage-transform.test.ts
  • pnpm --dir packages/vitest-plugin-rsc run build
  • pnpm tsgo --build
  • pnpm format:check
  • pnpm lint
  • VITEST_BROWSER_API_PORT=64123 pnpm --dir playground/rsc-vitest-demo exec vitest run
  • VITEST_BROWSER_API_PORT=64124 pnpm --dir playground/nextjs-notes-demo exec vitest run
  • VITEST_BROWSER_API_PORT=64125 pnpm --dir playground/nextjs-no-msw-demo exec vitest run

@pkg-pr-new

pkg-pr-new Bot commented May 14, 2026

Copy link
Copy Markdown
pnpm add https://pkg.pr.new/vitest-plugin-rsc@39 -D

commit: b97f472

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.

1 participant