Skip to content

Conversation

@sbc100
Copy link
Member

@sbc100 sbc100 commented Oct 22, 2025

Turns out you can import a .js just fine under node. It doesn't need to be called .mjs, despite the comment.

@sbc100 sbc100 requested a review from kripken October 22, 2025 23:44
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

Which version are you testing with? IIUC node changed the behavior at some point.

@sbc100
Copy link
Member Author

sbc100 commented Oct 22, 2025

I tested with my locally installed version:

$ which node
/usr/bin/node
$ node --version
v20.19.2

@sbc100
Copy link
Member Author

sbc100 commented Oct 22, 2025

You are right it looks like this fails on node older than v20... do we care about testing on such old versions?

@kripken
Copy link
Member

kripken commented Oct 22, 2025

Maybe not, yeah. Is 20 the default in most distros etc? I seem to recall we checked that...

@sbc100
Copy link
Member Author

sbc100 commented Oct 22, 2025

I guess we will see if the emscripten tests fail.. if the CI machine has < v20 than I guess we need to keep this hack.

Turns out you can import a `.js` just fine under node.  It doesn't
need to be called `.mjs`, despite the comment.
@sbc100
Copy link
Member Author

sbc100 commented Oct 23, 2025

OK, it looks like at least the CI machines have v20 and above.

@sbc100 sbc100 force-pushed the avoid_copying_binaryen_js branch from b4a2d79 to 52d06bf Compare October 23, 2025 00:40
@sbc100 sbc100 enabled auto-merge (squash) October 23, 2025 00:44
@sbc100 sbc100 merged commit 84795e3 into main Oct 23, 2025
16 checks passed
@sbc100 sbc100 deleted the avoid_copying_binaryen_js branch October 23, 2025 15:39
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.

3 participants