Skip to content

[vitest-pool-workers] Bump RTTI compat date#13091

Merged
penalosa merged 2 commits intomainfrom
penalosa/vitest-5605
Mar 27, 2026
Merged

[vitest-pool-workers] Bump RTTI compat date#13091
penalosa merged 2 commits intomainfrom
penalosa/vitest-5605

Conversation

@penalosa
Copy link
Copy Markdown
Contributor

@penalosa penalosa commented Mar 27, 2026

The RTTI query used to build workerdBuiltinModules was hardcoded to compat date "2023-12-01", meaning any Node.js modules added to workerd in the last 2+ years weren't recognized as builtins. This caused the module fallback service to reject them with "Not found" instead of routing to workerd's native implementation.

This PR replaces the hardcoded date with today's date at build time, so workerdBuiltinModules automatically stays in sync with the bundled workerd version on each rebuild.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: this only affects the build-time RTTI query — the set of builtin modules recognized by the fallback service and module runner interceptor now matches what workerd actually provides
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: internal build plumbing change

Open with Devin

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 27, 2026

🦋 Changeset detected

Latest commit: 3632bc6

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

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

@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk bot commented Mar 27, 2026

I've reviewed the full PR thoroughly. Here's my analysis:

  1. query.mjs change (RTTI compat date): The script property is a JS template literal (backtick string), so ${supportedCompatibilityDate} is interpolated at the Node.js level when the Miniflare options are constructed. This is correct - the compat date string will be embedded into the worker script that gets passed to workerd. The supportedCompatibilityDate is properly exported from miniflare via export * from "./runtime" in miniflare's index.ts.

  2. pool/index.ts change (ensureFeature for child_process): The nodejs_child_process_module flag follows the exact same pattern as the other flags (nodejs_tty_module, nodejs_fs_module, etc.). The ensureFeature function at line 778 constructs enable_nodejs_child_process_module / disable_nodejs_child_process_module flag names, both of which are confirmed to exist in the codebase (used in unenv-preset and wrangler e2e tests).

  3. This is a build-time script: getBuiltinModules() is called during the tsdown build (line 61 of tsdown.config.ts) and the result is embedded as a define constant. The compat date interpolation happens at build time, which is the right time to capture it.

Both changes are straightforward, correct, and well-scoped. No logic bugs, no security concerns, no backward compatibility issues.

LGTM

github run

@penalosa penalosa changed the title [vitest-pool-workers] Bump RTTI compat date and enable child_process module [vitest-pool-workers] Bump RTTI compat date Mar 27, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 27, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13091

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13091

miniflare

npm i https://pkg.pr.new/miniflare@13091

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13091

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13091

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13091

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13091

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13091

wrangler

npm i https://pkg.pr.new/wrangler@13091

commit: 3632bc6

@penalosa penalosa force-pushed the penalosa/vitest-5605 branch from 9eabcd1 to cceedd1 Compare March 27, 2026 14:58
@penalosa penalosa marked this pull request as ready for review March 27, 2026 14:59
@penalosa penalosa requested a review from a team as a code owner March 27, 2026 14:59
@penalosa penalosa requested a review from edmundhung March 27, 2026 14:59
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented Mar 27, 2026

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@github-actions
Copy link
Copy Markdown
Contributor

✅ All changesets look good

@penalosa penalosa merged commit 6d58f0f into main Mar 27, 2026
48 checks passed
@penalosa penalosa deleted the penalosa/vitest-5605 branch March 27, 2026 16:08
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Mar 27, 2026
This was referenced Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants