Skip to content

Upgrade Vitest to v4 and improve Windows path handling - #2

Open
czenzel wants to merge 1 commit into
solcreek:mainfrom
czenzel:feature/package-updates-20260808
Open

Upgrade Vitest to v4 and improve Windows path handling#2
czenzel wants to merge 1 commit into
solcreek:mainfrom
czenzel:feature/package-updates-20260808

Conversation

@czenzel

@czenzel czenzel commented Aug 8, 2026

Copy link
Copy Markdown

This pull request includes several dependency updates, cross-platform path handling improvements, and enhancements to the spawn-workerd integration test utility to better support Windows environments. The most important changes are summarized below:

Dependency Updates:

  • Updated vitest and @vitest/coverage-v8 to version 4.1.10 in multiple package.json files for improved testing features and compatibility. [1] [2]
  • Updated @cloudflare/workers-types to ^5.20260801.1 in template and app packages. [1] [2]
  • Updated autocannon to ^2.0.1 in groundflare package.

Cross-Platform Path Handling:

  • Replaced Node's path.join with path/posix.join and normalized path separators to / in BootstrapStateStore and FileSecretStore to ensure consistent behavior on Windows and Unix systems. Added a helper normalizePortablePath for this purpose. [1] [2] [3] [4] [5]

Integration Test Improvements (Windows Support):

  • Enhanced spawn-workerd.ts to select the correct native workerd binary for the current platform and architecture, including direct execution of the .exe on Windows to avoid orphaned child processes and locked temp directories. [1] [2]
  • Added a robust removeWorkdir function with retry logic to handle Windows file handle delays during test cleanup. Updated all relevant cleanup calls to use this function. [1] [2] [3] [4] [5]

Test Configuration Simplification:

  • Simplified vitest configuration files by removing unnecessary poolOptions nesting and clarifying comments. [1] [2]

Bumps Vitest/tooling across the workspace (including coverage config) and updates package templates/dependencies to newer Cloudflare and test-stack versions. Adjusts Vitest config for v4 option changes, normalizes secret/bootstrap config paths to portable POSIX-style locations, and fixes integration workerd spawning/cleanup on Windows to avoid orphaned processes and locked temp directories.
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