GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — esm: add experimental support for addon modules by legendecas · Pull Request #55844 · nodejs/node

Conversation

@legendecas

@legendecas legendecas commented Nov 14, 2024

Copy link
Copy Markdown
Member

Add experimental support to loading .node extension modules in ESM.

An addon exports two names default and module.exports, as same as import(cjs) where
its export names can not be preparsed. Addon export names can not be inferred until it is evaluated.

Fixes: #40541
Fixes: #55821

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

GeoffreyBooth, avivkeller, and biw reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
@nodejs-github-bot

nodejs-github-bot commented Nov 14, 2024

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/loaders
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Nov 14, 2024
@legendecas
legendecas force-pushed the esm/addon branch from d4b9a9a to b384e80 Compare November 14, 2024 01:21
guybedford
guybedford approved these changes Nov 14, 2024
View reviewed changes
@legendecas
legendecas force-pushed the esm/addon branch 3 times, most recently from c6ce9fd to 0c724cd Compare November 14, 2024 10:07
@aduh95

aduh95 commented Nov 14, 2024

Copy link
Copy Markdown
Contributor

The commit message does not meet our guidelines, the word after the subsystem should be an infinitive verb. I suggest esm: add experimental support for addon modules

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Nov 14, 2024
View reviewed changes
Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Nov 14, 2024
View reviewed changes
Comment thread test/addons/esm/test.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@legendecas legendecas changed the title esm: experimental addon modules esm: add experimental addon modules Nov 14, 2024
@legendecas legendecas changed the title esm: add experimental addon modules esm: add experimental support for addon modules Nov 14, 2024
GeoffreyBooth
GeoffreyBooth reviewed Nov 14, 2024
View reviewed changes
Comment thread doc/api/cli.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/internal/validators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread src/node_options.cc Resolved

Uh oh!

There was an error while loading. Please reload this page.

@legendecas
legendecas force-pushed the esm/addon branch 2 times, most recently from 9841645 to 829cfc6 Compare November 27, 2024 14:42
@legendecas
legendecas marked this pull request as ready for review November 27, 2024 14:43
@legendecas
legendecas marked this pull request as draft November 27, 2024 14:54
@legendecas
legendecas force-pushed the esm/addon branch from 829cfc6 to 2ea455d Compare November 27, 2024 15:00
@legendecas
legendecas marked this pull request as ready for review November 27, 2024 15:03
@codecov

codecov Bot commented Nov 27, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.73469% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.54%. Comparing base (990497c) to head (0169b9c).
⚠️ Report is 1968 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/modules/esm/translators.js 85.22% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55844      +/-   ##
==========================================
- Coverage   88.55%   88.54%   -0.02%     
==========================================
  Files         657      657              
  Lines      190295   190377      +82     
  Branches    36542    36552      +10     
==========================================
+ Hits       168511   168564      +53     
- Misses      14969    14991      +22     
- Partials     6815     6822       +7     
Files with missing lines Coverage Δ
lib/internal/modules/esm/formats.js 98.64% <100.00%> (+0.09%) ⬆️
lib/internal/modules/esm/load.js 91.94% <100.00%> (+0.10%) ⬆️
src/node_options.cc 88.00% <100.00%> (+0.01%) ⬆️
src/node_options.h 98.30% <100.00%> (+<0.01%) ⬆️
lib/internal/modules/esm/translators.js 91.50% <85.22%> (-1.44%) ⬇️

... and 23 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

GeoffreyBooth
GeoffreyBooth approved these changes Nov 27, 2024
View reviewed changes
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 28, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 28, 2024
@nodejs-github-bot

nodejs-github-bot commented Nov 28, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/63746/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JakobJingleheimer
JakobJingleheimer reviewed Nov 30, 2024
View reviewed changes

@JakobJingleheimer JakobJingleheimer left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for this 🙂

for the tests, describe etc provide significantly better DX when tests fail

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/addons/esm/test-esm.mjs Outdated

@JakobJingleheimer JakobJingleheimer Nov 30, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Please use describe + it

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@joyeecheung joyeecheung Dec 2, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I personally find describe + it to be worse UX due to the reasons stated in #56027 (comment), unless there is a way to silence the passing tests and make the console logs from the failed test cases appear at the end together with the errors..

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
joyeecheung
joyeecheung approved these changes Dec 2, 2024
View reviewed changes

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Some suggestions, but non-blocking.

Addon export names can not be inferred until it is evaluated.

I wonder if there's anything we can do about it...potentially, defining some macro in node.h that the addons can use to export names with a specific pattern, which we can scan for by parsing the dynamic library (ideally through some new API in libuv, though we are already parsing binaries using postject for SEA which implements the parsing by itself...). Can be done as a follow-up, of course..

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

realityking reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread lib/internal/modules/esm/formats.js Outdated

@joyeecheung joyeecheung Dec 2, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I am somewhat surprised to find that there is not a test for the node-addons exports condition...it seems the the files pointed to by node-addons won't get interpreted as addons unless they have the .node extension, though this issue predates this PR and also happens to require().

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@legendecas legendecas Dec 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Taking a step back, I'm wondering if the format name could be renamed as node-addon/node-addons for alignment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@joyeecheung joyeecheung Dec 5, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sure, also I am not even sure if anyone is actually using it, it seems only useful to distinguish "if the current run times can load Node.js style addons" as it currently stands, so may not really be that big of a deal anyway....

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JakobJingleheimer JakobJingleheimer Dec 7, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I prefer the more concise addon

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@joyeecheung joyeecheung Dec 12, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Actually I think I misread #55844 (comment) - I think for the format name, addon or node-addon would make more sense. node-addons would be a bit weird in the hooks since it's plural.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas reacted with thumbs up emoji JakobJingleheimer reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

@legendecas legendecas Dec 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This loader format enum is specific for Node.js so I'll stick with the concise addon.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JakobJingleheimer reacted with heart emoji
All reactions
  • ❤️ 1 reaction

@joyeecheung joyeecheung Dec 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

In any case, the exports condition question is separate - it's more about when a module that doesn't end with .node is pointed to by node-addons, should it be interpreted(translated) into an addon or should it be interpreted based on whatever extension it has - and if it has a different extension (e.g. dylib or dll), what should happen then. As I said in the first comment, it's fine to keep it as is since CJS also only considers .node, but it is a bit strange for the exports condition.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@legendecas legendecas Dec 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The reality is that the conditional exported entries are been loaded based on their extensions, not their entry types. With require(esm), it is possible to do the following already 👀:

{
  "exports": {
    "import": "./index-require.cjs",
    "require": "./index-module.mjs"
  }
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/internal/modules/esm/translators.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/addons/esm/test-esm.mjs Outdated

@joyeecheung joyeecheung Dec 2, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I personally find describe + it to be worse UX due to the reasons stated in #56027 (comment), unless there is a way to silence the passing tests and make the console logs from the failed test cases appear at the end together with the errors..

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/addons/esm/test-esm.mjs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/addons/esm/test-import.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@legendecas
legendecas force-pushed the esm/addon branch from 389b5c5 to 7375fa0 Compare December 6, 2024 14:50
@joyeecheung

joyeecheung commented Dec 12, 2024

Copy link
Copy Markdown
Member

This needs a rebase.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas
legendecas force-pushed the esm/addon branch from 7375fa0 to 16777e3 Compare December 16, 2024 14:23
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 19, 2024
@legendecas

legendecas commented Dec 19, 2024

Copy link
Copy Markdown
Member Author

Rebased to address conflicts.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 19, 2024
@nodejs-github-bot

nodejs-github-bot commented Dec 19, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/64132/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Dec 20, 2024

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/64134/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas

legendecas commented Dec 20, 2024

Copy link
Copy Markdown
Member Author

CI is green now, would you mind taking another look at this PR? @nodejs/loaders thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JakobJingleheimer

JakobJingleheimer commented Dec 20, 2024

Copy link
Copy Markdown
Member

CI is green now, would you mind taking another look at this PR? @nodejs/loaders thanks

I will do this evening

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 approved these changes Dec 20, 2024
View reviewed changes
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 20, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 20, 2024
@nodejs-github-bot
nodejs-github-bot merged commit b6df128 into nodejs:main Dec 20, 2024
@nodejs-github-bot

nodejs-github-bot commented Dec 20, 2024

Copy link
Copy Markdown
Collaborator

Landed in b6df128

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas
legendecas deleted the esm/addon branch December 20, 2024 14:08
aduh95 pushed a commit that referenced this pull request Jan 2, 2025
@legendecas @aduh95
esm: add experimental support for addon modules
cdb631e
PR-URL: #55844
Fixes: #40541
Fixes: #55821
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jan 3, 2025
2025-01-07, Version 23.6.0 (Current) #56450
Merged
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 8, 2025
ECG Bot @tmeijn
build(deps): update node to v23.6.0
8163ed9
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [node](https://nodejs.org) ([source](https://github.com/nodejs/node)) | minor | `23.5.0` -> `23.6.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>nodejs/node (node)</summary>

### [`v23.6.0`](https://github.com/nodejs/node/releases/tag/v23.6.0): 2025-01-07, Version 23.6.0 (Current), @&#8203;marco-ippolito

[Compare Source](nodejs/node@v23.5.0...v23.6.0)

##### Notable Changes

##### Unflagging --experimental-strip-types

This release enables the flag `--experimental-strip-types` by default.
Node.js will be able to execute TypeScript files without additional configuration:

```bash
node file.ts
```

There are some limitations in the supported syntax documented at <https://nodejs.org/api/typescript.html#type-stripping>
This feature is experimental and is subject to change.

Contributed by Marco Ippolito in [#&#8203;56350](nodejs/node#56350)

##### Other Notable Changes

-   \[[`c1023284c3`](nodejs/node@c1023284c3)] - **(SEMVER-MINOR)** **lib**: add typescript support to STDIN eval (Marco Ippolito) [#&#8203;56359](nodejs/node#56359)
-   \[[`8dc39e5e2e`](nodejs/node@8dc39e5e2e)] - **(SEMVER-MINOR)** **process**: add process.ref() and process.unref() methods (James M Snell) [#&#8203;56400](nodejs/node#56400)
-   \[[`8b20cc212b`](nodejs/node@8b20cc212b)] - **(SEMVER-MINOR)** **worker**: add eval ts input (Marco Ippolito) [#&#8203;56394](nodejs/node#56394)

##### Commits

-   \[[`7b4d288116`](nodejs/node@7b4d288116)] - **assert**: make partialDeepStrictEqual throw when comparing \[0] with \[-0] (Giovanni) [#&#8203;56237](nodejs/node#56237)
-   \[[`0ec2ed0a0b`](nodejs/node@0ec2ed0a0b)] - **build**: fix GN build for ngtcp2 (Cheng) [#&#8203;56300](nodejs/node#56300)
-   \[[`ab3e64630b`](nodejs/node@ab3e64630b)] - **build**: test macos-13 on GitHub actions (Michaël Zasso) [#&#8203;56307](nodejs/node#56307)
-   \[[`46fb69daca`](nodejs/node@46fb69daca)] - **build**: build v8 with -fvisibility=hidden on macOS (Joyee Cheung) [#&#8203;56275](nodejs/node#56275)
-   \[[`9d4930b993`](nodejs/node@9d4930b993)] - **deps**: update simdutf to 5.7.2 (Node.js GitHub Bot) [#&#8203;56388](nodejs/node#56388)
-   \[[`6afe36397e`](nodejs/node@6afe36397e)] - **deps**: update amaro to 0.2.1 (Node.js GitHub Bot) [#&#8203;56390](nodejs/node#56390)
-   \[[`195990a0ee`](nodejs/node@195990a0ee)] - **deps**: update googletest to [`7d76a23`](nodejs/node@7d76a23) (Node.js GitHub Bot) [#&#8203;56387](nodejs/node#56387)
-   \[[`b9c0852fc6`](nodejs/node@b9c0852fc6)] - **deps**: update googletest to [`e54519b`](nodejs/node@e54519b) (Node.js GitHub Bot) [#&#8203;56370](nodejs/node#56370)
-   \[[`eaefd90128`](nodejs/node@eaefd90128)] - **deps**: update ngtcp2 to 1.10.0 (Node.js GitHub Bot) [#&#8203;56334](nodejs/node#56334)
-   \[[`06de0c65cf`](nodejs/node@06de0c65cf)] - **deps**: update simdutf to 5.7.0 (Node.js GitHub Bot) [#&#8203;56332](nodejs/node#56332)
-   \[[`03df76cdec`](nodejs/node@03df76cdec)] - **doc**: add example for piping ReadableStream (Gabriel Schulhof) [#&#8203;56415](nodejs/node#56415)
-   \[[`38ce249b07`](nodejs/node@38ce249b07)] - **doc**: expand description of `parseArg`'s `default` (Kevin Gibbons) [#&#8203;54431](nodejs/node#54431)
-   \[[`ecc718cef2`](nodejs/node@ecc718cef2)] - **doc**: use `<ul>` instead of `<ol>` in `SECURITY.md` (Antoine du Hamel) [#&#8203;56346](nodejs/node#56346)
-   \[[`3db4809130`](nodejs/node@3db4809130)] - **doc**: clarify that WASM is trusted (Matteo Collina) [#&#8203;56345](nodejs/node#56345)
-   \[[`384ccbacd5`](nodejs/node@384ccbacd5)] - **doc**: update macOS and Xcode versions for releases (Michaël Zasso) [#&#8203;56337](nodejs/node#56337)
-   \[[`3943986e88`](nodejs/node@3943986e88)] - **doc**: fix the `crc32` documentation (Kevin Toshihiro Uehara) [#&#8203;55898](nodejs/node#55898)
-   \[[`710b8fc6ed`](nodejs/node@710b8fc6ed)] - **doc**: add entry to changelog about SQLite Session Extension (Bart Louwers) [#&#8203;56318](nodejs/node#56318)
-   \[[`4c978b4d77`](nodejs/node@4c978b4d77)] - **doc**: fix links in `module.md` (Antoine du Hamel) [#&#8203;56283](nodejs/node#56283)
-   \[[`cdb631efe7`](nodejs/node@cdb631efe7)] - **esm**: add experimental support for addon modules (Chengzhong Wu) [#&#8203;55844](nodejs/node#55844)
-   \[[`db83d2f0ee`](nodejs/node@db83d2f0ee)] - ***Revert*** "**events**: add hasEventListener util for validate" (origranot) [#&#8203;56282](nodejs/node#56282)
-   \[[`c2baae84ce`](nodejs/node@c2baae84ce)] - **lib**: refactor execution.js (Marco Ippolito) [#&#8203;56358](nodejs/node#56358)
-   \[[`c1023284c3`](nodejs/node@c1023284c3)] - **(SEMVER-MINOR)** **lib**: add typescript support to STDIN eval (Marco Ippolito) [#&#8203;56359](nodejs/node#56359)
-   \[[`e4b795ec4a`](nodejs/node@e4b795ec4a)] - **lib**: optimize `prepareStackTrace` on builtin frames (Chengzhong Wu) [#&#8203;56299](nodejs/node#56299)
-   \[[`d1b009b623`](nodejs/node@d1b009b623)] - **lib**: suppress source map lookup exceptions (Chengzhong Wu) [#&#8203;56299](nodejs/node#56299)
-   \[[`c2837f0805`](nodejs/node@c2837f0805)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#&#8203;56342](nodejs/node#56342)
-   \[[`72336233f2`](nodejs/node@72336233f2)] - **meta**: move MoLow to TSC regular member (Moshe Atlow) [#&#8203;56276](nodejs/node#56276)
-   \[[`4f77920a9d`](nodejs/node@4f77920a9d)] - **module**: fix async resolution error within the sync `findPackageJSON` (Jacob Smith) [#&#8203;56382](nodejs/node#56382)
-   \[[`e5ba216501`](nodejs/node@e5ba216501)] - **(SEMVER-MINOR)** **module**: unflag --experimental-strip-types (Marco Ippolito) [#&#8203;56350](nodejs/node#56350)
-   \[[`959f133a22`](nodejs/node@959f133a22)] - **module**: support eval with ts syntax detection (Marco Ippolito) [#&#8203;56285](nodejs/node#56285)
-   \[[`717cfa4fac`](nodejs/node@717cfa4fac)] - **module**: use buffer.toString base64 (Chengzhong Wu) [#&#8203;56315](nodejs/node#56315)
-   \[[`c2f4d8d688`](nodejs/node@c2f4d8d688)] - **node-api**: define version 10 (Gabriel Schulhof) [#&#8203;55676](nodejs/node#55676)
-   \[[`417a8ebdec`](nodejs/node@417a8ebdec)] - **node-api**: remove deprecated attribute from napi_module_register (Vladimir Morozov) [#&#8203;56162](nodejs/node#56162)
-   \[[`8dc39e5e2e`](nodejs/node@8dc39e5e2e)] - **(SEMVER-MINOR)** **process**: add process.ref() and process.unref() methods (James M Snell) [#&#8203;56400](nodejs/node#56400)
-   \[[`d194f1ab5f`](nodejs/node@d194f1ab5f)] - **sqlite**: pass conflict type to conflict resolution handler (Bart Louwers) [#&#8203;56352](nodejs/node#56352)
-   \[[`29f5d70452`](nodejs/node@29f5d70452)] - **src**: use v8::LocalVector consistently with other minor cleanups (James M Snell) [#&#8203;56417](nodejs/node#56417)
-   \[[`2a5543b78e`](nodejs/node@2a5543b78e)] - **src**: use starts_with in fs_permission.cc (ishabi) [#&#8203;55811](nodejs/node#55811)
-   \[[`3a3f5c9a64`](nodejs/node@3a3f5c9a64)] - **stream**: validate undefined sizeAlgorithm in WritableStream (Jason Zhang) [#&#8203;56067](nodejs/node#56067)
-   \[[`6e6f6b071a`](nodejs/node@6e6f6b071a)] - **test**: add ts eval snapshots (Marco Ippolito) [#&#8203;56358](nodejs/node#56358)
-   \[[`8a87e39052`](nodejs/node@8a87e39052)] - **test**: remove empty lines from snapshots (Marco Ippolito) [#&#8203;56358](nodejs/node#56358)
-   \[[`510649f617`](nodejs/node@510649f617)] - **test**: use unusual chars in the path to ensure our tests are robust (Antoine du Hamel) [#&#8203;48409](nodejs/node#48409)
-   \[[`54f6d681a0`](nodejs/node@54f6d681a0)] - **test**: remove flaky designation (Luigi Pinca) [#&#8203;56369](nodejs/node#56369)
-   \[[`20ace0bb01`](nodejs/node@20ace0bb01)] - **test**: remove test-worker-arraybuffer-zerofill flaky designation (Luigi Pinca) [#&#8203;56364](nodejs/node#56364)
-   \[[`b757e40525`](nodejs/node@b757e40525)] - **test**: remove test-net-write-fully-async-hex-string flaky designation (Luigi Pinca) [#&#8203;56365](nodejs/node#56365)
-   \[[`64556baddc`](nodejs/node@64556baddc)] - **test**: improve abort signal dropping test (Edy Silva) [#&#8203;56339](nodejs/node#56339)
-   \[[`accbdad329`](nodejs/node@accbdad329)] - **test**: enable ts test on win arm64 (Marco Ippolito) [#&#8203;56349](nodejs/node#56349)
-   \[[`4188ee00d1`](nodejs/node@4188ee00d1)] - **test**: deflake test-watch-file-shared-dependency (Luigi Pinca) [#&#8203;56344](nodejs/node#56344)
-   \[[`079cee0609`](nodejs/node@079cee0609)] - **test**: skip `test-sqlite-extensions` when SQLite is not built by us (Antoine du Hamel) [#&#8203;56341](nodejs/node#56341)
-   \[[`96a38044ee`](nodejs/node@96a38044ee)] - **test**: increase spin for eventloop test on s390 (Michael Dawson) [#&#8203;56228](nodejs/node#56228)
-   \[[`c062ffc242`](nodejs/node@c062ffc242)] - **test**: add coverage for pipeline (jakecastelli) [#&#8203;56278](nodejs/node#56278)
-   \[[`d4404f0d0e`](nodejs/node@d4404f0d0e)] - **test**: migrate message eval tests from Python to JS (Yiyun Lei) [#&#8203;50482](nodejs/node#50482)
-   \[[`9369942745`](nodejs/node@9369942745)] - **test**: check typescript loader (Marco Ippolito) [#&#8203;54657](nodejs/node#54657)
-   \[[`4930244484`](nodejs/node@4930244484)] - **test**: remove async-hooks/test-writewrap flaky designation (Luigi Pinca) [#&#8203;56048](nodejs/node#56048)
-   \[[`7819bfec69`](nodejs/node@7819bfec69)] - **test**: deflake test-esm-loader-hooks-inspect-brk (Luigi Pinca) [#&#8203;56050](nodejs/node#56050)
-   \[[`e9762bf005`](nodejs/node@e9762bf005)] - **test**: add test case for listeners (origranot) [#&#8203;56282](nodejs/node#56282)
-   \[[`c1627e9d19`](nodejs/node@c1627e9d19)] - **test**: make `test-permission-sqlite-load-extension` more robust (Antoine du Hamel) [#&#8203;56295](nodejs/node#56295)
-   \[[`97d854e1d5`](nodejs/node@97d854e1d5)] - **test_runner,cli**: mark test isolation as stable (Colin Ihrig) [#&#8203;56298](nodejs/node#56298)
-   \[[`a4f336fdd4`](nodejs/node@a4f336fdd4)] - **tools**: fix `require-common-first` lint rule from subfolder (Antoine du Hamel) [#&#8203;56325](nodejs/node#56325)
-   \[[`dc3dafcb50`](nodejs/node@dc3dafcb50)] - **tools**: add release line label when opening release proposal (Antoine du Hamel) [#&#8203;56317](nodejs/node#56317)
-   \[[`2a5ac932ac`](nodejs/node@2a5ac932ac)] - **url**: use resolved path to convert UNC paths to URL (Antoine du Hamel) [#&#8203;56302](nodejs/node#56302)
-   \[[`8b20cc212b`](nodejs/node@8b20cc212b)] - **(SEMVER-MINOR)** **worker**: add eval ts input (Marco Ippolito) [#&#8203;56394](nodejs/node#56394)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45MS40IiwidXBkYXRlZEluVmVyIjoiMzkuOTEuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
@aduh95 aduh95 added the backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. label Feb 3, 2025
@aduh95

aduh95 commented Feb 3, 2025

Copy link
Copy Markdown
Contributor

Can you please send a backport PR for v22.x-staging? There a number of outstanding conflicts in translators.js to resolve

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 mentioned this pull request May 19, 2025
fix: module.exports on CJS modules #57366
Closed
@legendecas legendecas mentioned this pull request Sep 21, 2025
[v22.x] esm: add experimental support for addon modules #59961
Closed
@legendecas legendecas added backport-open-v22.x Indicate that the PR has an open backport and removed backport-requested-v22.x PRs awaiting manual backport to the v22.x-staging branch. labels Sep 21, 2025
legendecas added a commit to legendecas/node that referenced this pull request Sep 21, 2025
@legendecas
esm: add experimental support for addon modules
ad649aa
PR-URL: nodejs#55844
Fixes: nodejs#40541
Fixes: nodejs#55821
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
richardlau pushed a commit that referenced this pull request Sep 22, 2025
@legendecas @richardlau
esm: add experimental support for addon modules
d302cb3
PR-URL: #55844
Backport-PR-URL: #59961
Fixes: #40541
Fixes: #55821
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@github-actions github-actions Bot mentioned this pull request Sep 22, 2025
2025-09-24, Version 22.20.0 'Jod' (LTS) #59973
Merged
@richardlau richardlau added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed backport-open-v22.x Indicate that the PR has an open backport labels Sep 24, 2025
@anthumchris

anthumchris commented Dec 30, 2025

Copy link
Copy Markdown

related: --experimental-addon-modules stability

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@GeoffreyBooth GeoffreyBooth GeoffreyBooth approved these changes
@guybedford guybedford guybedford approved these changes
@JakobJingleheimer JakobJingleheimer JakobJingleheimer approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes
@aduh95 aduh95 aduh95 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. backported-to-v22.x PRs backported to the v22.x-staging branch. commit-queue-squash PRs the Commit Queue should land as one squashed commit. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support for import('./native.node') Can not import .node file in esm

Uh oh!

There was an error while loading. Please reload this page.

9 participants

@legendecas @nodejs-github-bot @aduh95 @joyeecheung @JakobJingleheimer @anthumchris @GeoffreyBooth @guybedford @richardlau
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.