Skip to content

fix: node-20-safe browser-host simulation in the Cache API test - #53

Merged
ronaldtse merged 1 commit into
mainfrom
feat/imf-cache-api
Aug 28, 2026
Merged

fix: node-20-safe browser-host simulation in the Cache API test#53
ronaldtse merged 1 commit into
mainfrom
feat/imf-cache-api

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Follow-up to #52: the Cache API test simulated a browser by deleting
process.versions.node - node 20's bundled undici does
versions.node.split() inside fetch(), so the test host itself crashed
(TypeError with no stack, passed on node 24). The simulation now swaps
the globalThis.process reference (only the registry's Node detection
reads globalThis; undici holds the real binding). Verified green on
node 20 and 24.

undici on node 20 splits process.versions.node inside fetch();
deleting it crashed the test host. Swap the globalThis.process
reference instead - only the registry's detection reads globalThis.
@ronaldtse
ronaldtse merged commit 0e5844f into main Aug 28, 2026
8 checks passed
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