Skip to content

Conversation

@petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Nov 28, 2025

The current implementation throws "not implemented" errors on createContext and new Script.
This is a breaking change from how unenv and Node.js work.
Now they return instances that are safe since they don't have any implementation, or actually also throw "not implemented" errors for their methods.

This change will allow us to safely remove the node:vm polyfill from the Cloudflare unenv preset.

For reference:

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

LGTM.

I think you can simplify the validation of the timeout by destructuring with a default value of 1

@petebacondarwin
Copy link
Contributor Author

From what I can tell the internal build job failures are due to unrelated tests failing. It is not clear whether I can do something to fix these. I tried re-running them in case they were just flakes...

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.

4 participants