Skip to content

Add support for node:vm.SyntheticModule #19878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 114 commits into
base: main
Choose a base branch
from
Open

Conversation

heimskr
Copy link
Member

@heimskr heimskr commented May 24, 2025

What does this PR do?

Adds support for node:vm's SyntheticModule class. Also adds some other improvements to node:vm.

  • Documentation or TypeScript types
  • Code changes

How did you verify your code works?

Added tests from Node.js

@robobun
Copy link

robobun commented May 24, 2025

Updated 3:00 PM PT - May 28th, 2025

@heimskr, your commit c6330fc has 3 failures in Build #17504:


🧪   To try this PR locally:

bunx bun-pr 19878

That installs a local version of the PR into your bun-19878 executable, so you can run:

bun-19878 --bun

@heimskr heimskr marked this pull request as ready for review May 28, 2025 03:57
@heimskr heimskr requested review from a team and pfgithub and removed request for a team May 28, 2025 03:57

if (JSObject* object = argument.getObject()) {
JSValue result = object->get(globalObject, JSC::Identifier::fromString(vm, "namespace"_s));
if (result && !result.isUndefinedOrNull()) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

missing exception check

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