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: consolidate ESM Loader methods by JakobJingleheimer · Pull Request #37468 · nodejs/node

Conversation

@JakobJingleheimer

@JakobJingleheimer JakobJingleheimer commented Feb 21, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

closes #35524

Implements step 1 of #36396

  • Consolidate loader hooks:
    • resolve = resolve [+getFormat]
    • load = getFormat + getSource + transformSource
    • globalPreload = getGlobalPreload
  • Consolidate node's internal default hooks:
    • new load (wrap existing get_format & get_source; delete transform_source)
    • resolve
  • Update when unknown format type (ERR_UNKNOWN_MODULE_FORMAT) is checked / thrown from after resolve to after load

For code changes:

  • Include tests for any bug fixes or new features.
  • Update documentation if relevant.
  • Ensure that make -j4 test (UNIX), or vcbuild test (Windows) passes.
Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Sorry, something went wrong.

Uh oh!

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

DerekNonGeneric, lin7sh, bl-ue, shrujalshah28, octet-stream, TheFanatr, mytecor, and ffolituu reacted with thumbs up emoji lin7sh, TheFanatr, and bl-ue reacted with hooray emoji josh-hemphill, bl-ue, octet-stream, TheFanatr, metcoder95, and BigD1CKC reacted with eyes emoji
All reactions
  • 👍 8 reactions
  • 🎉 3 reactions
  • 👀 6 reactions
@JakobJingleheimer

JakobJingleheimer commented Feb 21, 2021

Copy link
Copy Markdown
Member Author

I ordinarily try to avoid touching lines that don't otherwise have changes, but I had to tidy up code that was otherwise untouched because it was very difficult to read & follow (it looked like it had been through an uglifier—perhaps some kind of lint autofixer?).

All reactions

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Feb 21, 2021

Copy link
Copy Markdown
Member Author

@GeoffreyBooth I have a few questions:

There're very few code comments (at least in the ESM section), and it's very difficult to figure out what anything is doing / supposed to do. I haven't come across any docs that seem to cover this aside from "try to avoid unnecessary breaking changes".

I know this particular piece is intended to merely consolidate some methods, but as far as I've managed to glean, a lot of the ESM code needs ground-up change (ex how the Loader class is designed and used is…very strange). How much change there might you/y'all be open to?

Happy to jump on a call to discuss. I'm EST (Mondays and Fridays after ~17:30 would be good for me).

All reactions

Sorry, something went wrong.

Uh oh!

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

@GeoffreyBooth

GeoffreyBooth commented Feb 21, 2021

Copy link
Copy Markdown
Member

I know this particular piece is intended to merely consolidate some methods, but as far as I’ve managed to glean, a lot of the ESM code needs ground-up change (ex how the Loader class is designed and used is…very strange). How much change there might you/y’all be open to?

@guybedford is the expert on this part of the codebase, I think. Perhaps he can answer that. I would be happy to join a call but my schedule is difficult and I don’t know that part of the codebase too well either (just the hooks, for the most part).

I assume you’ve reviewed #35524? I was thinking that the first PR would just be completing what was started on that branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@GeoffreyBooth GeoffreyBooth added the esm Issues and PRs related to the ECMAScript Modules implementation. label Feb 21, 2021
@JakobJingleheimer

JakobJingleheimer commented Feb 22, 2021

Copy link
Copy Markdown
Member Author

Yes, I reviewed it to help figure out what the code is doing. I'm still not 100% (probably closer to 70%). I'd like to run an approach by someone more familiar.

All reactions

Sorry, something went wrong.

Uh oh!

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

@devsnek

devsnek commented Feb 22, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

@JakobJingleheimer the code is split into explicit phases (resolve, getformat, getsource, transform). In terms of the system model of the loader, I'm not sure this is clearer. Additionally, you should run a lint pass on this code (make lint-js) locally, as it looks like it has a few issues.

This is also going to need a review for primordials. For example, array.push(v) should be ArrayPrototypePush(array, v).

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

Sorry, something went wrong.

Uh oh!

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

@devsnek

devsnek commented Feb 22, 2021

Copy link
Copy Markdown
Member

Actually I'm now realizing this is changing the public loader API. I will remove myself from the discussion.

All reactions

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Feb 22, 2021

Copy link
Copy Markdown
Member Author

@devsnek i gathered about the phases ;)

It's a WIP commit; I didn't bother with the non-IDE-integrating linter yet.

On a related note, why 80 columns? Are we devving on iPads?

All reactions

Sorry, something went wrong.

Uh oh!

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

@devsnek devsnek added the experimental Issues and PRs related to experimental features. label Feb 22, 2021
@GeoffreyBooth

GeoffreyBooth commented Feb 22, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

On a related note, why 80 columns? Are we devving on iPads?

The Node codebase is over ten years old, so some things you just have to live with at this point 😄 My biggest pet peeve is that its test suite is written in Python.

@devsnek is also a good resource for this part of the codebase, he knows it better than I do.

JakobJingleheimer and GaryGSC reacted with heart emoji
All reactions
  • ❤️ 2 reactions

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

This comment has been minimized.

Sign in to view
@JakobJingleheimer

This comment has been minimized.

Sign in to view
@GeoffreyBooth

GeoffreyBooth commented Feb 22, 2021

Copy link
Copy Markdown
Member

(Huge) issue for another time: would it be feasible and desirable to port the test suite to something JavaScript-based like Mocha? I’m pretty savvy at unit tests (but I dunno if I’m up for a Sisyphean labour on my own).

The tests themselves are mostly in JavaScript. The runner is Python. Remember, the test runner for Node was written before any Node-based test runner existed 😉 You won’t need to know any Python to write tests.

I wouldn’t spend time on things like trying to change Node’s linting rules. The project is very mature at this point and seemingly little things like that are big efforts now because of the number of open branches and collaborators and release lines that things need to be backported to, etc. Also changes like that would need sign-off by a huge number of people, and it’s just not worth the effort if it’s not blocking you from the immediate task you’re trying to accomplish.

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

Sorry, something went wrong.

Uh oh!

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

@GeoffreyBooth

GeoffreyBooth commented Feb 22, 2021

Copy link
Copy Markdown
Member

Actually I’m now realizing this is changing the public loader API. I will remove myself from the discussion.

@devsnek The goal is to change both the public and private loader. See #35524. The goal is to complete that PR.

You’re right about primordials, but we can fix all those at the end once we have a working PR.

All reactions

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Feb 22, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

@devsnek Thanks for the tip about array.push → primordial!

Where do primordials come from? They appear to be magically available (no import/require). This morning I tried to find them via a file search on the repo, but didn't find where they're defined.

All reactions

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Mar 6, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Okay, so since @devsnek and @guybedford aren't available for that call to discuss, I'll try to summarise here:

esm_loader.js instantiates ESMLoader¹ twice: first to use esmLoader.import(), then immediately instantiate a new instance (overwriting the previous) to pass the output from esmLoader1.import to esmLoader2.hooks (abbreviated / pseudo code):

hooks = (new ESMLoader()).import(userLoaderSpecifier)
(new ESMLoader()).hooks(hooks)
// esmLoader2.runGlobalPreloader()

ESMLoader.import uses:

  • ESMLoader.resolve()
  • ESMLoader.getFormat()
  • ESMLoader.moduleMap

For esmLoader1, resolve and getFormat are node's built-ins.

I think instead:

  • rename the Loader class to ESMLoader
  • ESMLoader's constructor should accept/receive user loader specifier(s)
    • update esm_loader to instantiate ESMLoader only once
  • ESMLoader's constructor should handle importing & caching the user loaders
  • ESMLoader's constructor should automatically call runGlobalPreloadCode() at the very end of its execution
  • update ESMLoader's hook properties (now globalPreloaders, resolvers, and loaders) to lists, pre-populated with node's default hook handlers

¹ the class itself is actually named Loader but imported as ESMLoader, so for clarity I'm referring to it as ESMLoader everywhere

All reactions

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

This comment has been minimized.

Sign in to view
@GeoffreyBooth

GeoffreyBooth commented Mar 8, 2021

Copy link
Copy Markdown
Member

I'm not too familiar with that section of the codebase, but in general this approach seems fine to me.

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

Sorry, something went wrong.

Uh oh!

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

@guybedford

guybedford commented Mar 8, 2021

Copy link
Copy Markdown
Contributor

@JakobJingleheimer happy to answer questions and review, two things would help to do that:

  1. Seeing the docs diff is the most useful thing to tell what part of the public API is actually changing here.
  2. If you have specific refactoring questions, just listing them in a question that won't get lost in the thread would help to not miss answering anything.

update esm_loader to instantiate ESMLoader only once

We have an outer and inner loader to ensure that the hooks do not affect the loader modules themselves.

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

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Mar 8, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

@guybedford sure! I'll update the docs over lunch today. Would you be available to chat about them this evening? (If so, mind DMing me on Twitter or emailing me?)

My questions are mostly around internal approach (I think the changes to the public API are pretty simple and agreed).

All reactions

Sorry, something went wrong.

Uh oh!

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

@GeoffreyBooth

GeoffreyBooth commented Mar 13, 2021

Copy link
Copy Markdown
Member

@DerekNonGeneric You should chat with @JakobJingleheimer here about this PR, I think this could be a good effort to collaborate on.

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

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Mar 13, 2021

Copy link
Copy Markdown
Member Author

Yes please! I didn't expect this to drag on so long 😓

@guybedford did you see my previous message here? (I didn't receive any follow-up from you—did I miss it somewhere?)


When I try to build, I get the following error, which I don't know how to properly fix. I presume it's because I deleted the obsolete transform_source.js (which was pretty much empty anyway):

make[1]: *** No rule to make target `../lib/internal/modules/esm/transform_source.js', needed by `[…]/node/out/Release/obj/gen/node_javascript.cc'.  Stop.

I see in #37468 that file was replaced with a comment (presumably to circumvent this error). I can do that, but I think that's not the ideal thing to do.

All reactions

Sorry, something went wrong.

Uh oh!

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

@guybedford

guybedford commented Mar 13, 2021

Copy link
Copy Markdown
Contributor

@JakobJingleheimer feel free to DM me further to arrange a discusson, although written questions would always be preferable for context.

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

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Mar 26, 2021

Copy link
Copy Markdown
Member Author

I'm trying to get the tests updated so I can verify the updates, but I don't recognise what it uses—seems to be something homebrewed?

I tried compiling, but I think it got stuck in a loop (make ran for like 20–30 minutes, and the output seemed to repeat after about 5). Possibly related: I have an M1 mac (and I know that's experimental).

I have tomorrow afternoon I can work on this. It would be a lot more productive not having to discover the context around the ESM subsystem (and test framework).

I didn't hear back from @guybedford, and I noticed @DerekNonGeneric has a note in his profile that he's taking a break from Node work.

All reactions

Sorry, something went wrong.

Uh oh!

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

@GeoffreyBooth

GeoffreyBooth commented Mar 26, 2021

Copy link
Copy Markdown
Member

@DerekNonGeneric has a note in his profile that he's taking a break from Node work.

I think he's back now.

All reactions

Sorry, something went wrong.

Uh oh!

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

@DerekNonGeneric

DerekNonGeneric commented Mar 26, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Yeah, thanks for reaching out. I was planning to get around to doing this a bit later next month. We can continue work on your branch, but I am not 100% on the naming you have here. We can bikeshed in the #node-dev Freenode IRC channel if you're up for it (ping me on there tomorrow if you can).

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

Sorry, something went wrong.

Uh oh!

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

@JakobJingleheimer

JakobJingleheimer commented Mar 29, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

Chatted with Derek, and he wants to revisit the consolidation discussion (to potentially reduce the hooks down to just 1). He's planning to return from his break in late April. Conceptually, I'm not sure if the One Hook to Rule Them All is logically possible (aside from that, I am a fan of simplicity).

I didn't get any answers to my questions so far, so I'm still groping around in the dark.

And now with the potential discussion revisit, I'm not sure what the status of this PR is and whether I should still try to figure out the unit tests.

All reactions

Sorry, something went wrong.

Uh oh!

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

@DerekNonGeneric

DerekNonGeneric commented Mar 29, 2021

Copy link
Copy Markdown
Contributor

@JakobJingleheimer, please keep this as a draft for now. I will address your questions momentarily too.

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

Sorry, something went wrong.

Uh oh!

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

@guybedford
guybedford force-pushed the master branch from dc5a5da to 8e46568 Compare March 29, 2021 21:33
DerekNonGeneric
DerekNonGeneric previously requested changes Mar 29, 2021
View reviewed changes

@DerekNonGeneric DerekNonGeneric left a comment

Copy link
Copy Markdown
Contributor

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 going to leave a red cross here until we settle a few things regarding the public API of the hooks. Some of it has to do with naming, the other is whether or not we can do without some of them. I would like to set up a meeting with a few folks with opinions on the matter (I will reach out directly to check availability).

Sorry, something went wrong.

Uh oh!

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

JakobJingleheimer reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
richardlau added a commit that referenced this pull request Oct 20, 2021
@richardlau
2021-10-20, Version 16.12.0 (Current)
7ed303b
Notable Changes:

Experimental ESM Loader Hooks API:

Node.js ESM Loader hooks have been consolidated to represent the steps involved needed to facilitate future loader chaining:
1. `resolve`: `resolve` [+ `getFormat`]
2. `load`: `getFormat` + `getSource` + `transformSource`

For consistency, `getGlobalPreloadCode` has been renamed to `globalPreload`.

A loader exporting obsolete hook(s) will trigger a single deprecation warning (per loader) listing the errant hooks.

Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias - #37468

Other Notable Changes:

deps:
  * upgrade npm to 8.1.0 (npm team) #40463
doc:
  * deprecate (doc-only) http abort related (dr-js) #36670
vm:
  * (SEMVER-MINOR) add support for import assertions in dynamic imports (Antoine du Hamel) #40249

PR-URL: #40504
@merceyz merceyz mentioned this pull request Oct 20, 2021
feat(pnp): support consolidated ESM loader hooks yarnpkg/berry#3603
Merged
3 tasks done
@github-actions github-actions Bot mentioned this pull request Oct 21, 2021
Version Packages PabloSzx/bob-esbuild#147
Merged
This was referenced Oct 21, 2021
feat: add support for node >=16.12.0 antfu/esbuild-node-loader#19
Merged
chore: bump esbuild-node-loader teknologi-umum/graphene#68
Closed
codebytere added a commit to electron/electron that referenced this pull request Oct 25, 2021
@codebytere
esm: consolidate ESM Loader methods
cc6b2e1
nodejs/node#37468
jkleinsc pushed a commit to electron/electron that referenced this pull request Oct 25, 2021
@electron-roller @patchup @codebytere
chore: bump node to v16.12.0 (main) (#31518)
b936f5e
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
@gary-kim-bot gary-kim-bot mentioned this pull request Oct 26, 2021
chore(deps): update node.js to v16 gary-kim/nc-build-script#73
Closed
1 task
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
@electron-roller @patchup
@codebytere @t57ser
chore: bump node to v16.12.0 (main) (electron#31518)
aa33e25
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 27, 2021
@electron-roller @patchup
@codebytere @t57ser
chore: bump node to v16.12.0 (main) (electron#31518)
476b829
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
@electron-roller @patchup
@codebytere @t57ser
chore: bump node to v16.12.0 (main) (electron#31518)
721e4dc
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
@electron-roller @patchup
@codebytere @t57ser
chore: bump node to v16.12.0 (main) (electron#31518)
e3c8abb
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
@electron-roller @patchup
@codebytere @t57ser
chore: bump node to v16.12.0 (main) (electron#31518)
4afc902
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
t57ser pushed a commit to t57ser/electron that referenced this pull request Oct 29, 2021
@electron-roller @patchup
@codebytere @t57ser
chore: bump node to v16.12.0 (main) (electron#31518)
3d66477
* chore: bump node in DEPS to v16.12.0

* chore: update patches

* esm: consolidate ESM Loader methods

nodejs/node#37468

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
@aloerina01 aloerina01 mentioned this pull request Nov 1, 2021
Update Node.js to v16 aloerina01/aloerina01.github.io#57
Merged
1 task
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Nov 20, 2021
adamm @bmwiedemann
Update nodejs16 to version 16.13.0 / rev 12 via SR 930406
e643880
https://build.opensuse.org/request/show/930406
by user adamm + dimstar_suse
- BR python 3.6+

- Update to 16.13.0:
  * Experimental ESM Loader Hooks API
    nodejs/node#37468
  * deps: upgrade npm to 8.1.0 (npm team)
  * vm: add support for import assertions in dynamic imports
- Changes in 16.11.1:
  * deps: update llhttp to 6.0.4
    - HTTP Request Smuggling due to spaced in headers
     (bsc#1191601, CVE-2021-22959)
    - HTTP Request Smuggling when parsing the body
     (bsc#1191602, CVE-2021-22960)
- Changes in 16.11.0:
  * deps: update nghttp2 to v1.45.1
- Changes in 16.10.0:
  * crypto: add rsa-pss keygen parameters
  * fs: make open and close stream override optional when unused
  * http: limit requests per connection
    The maximum number of requests a socket can handle before closing
    keep alive connection can be set with server
@Ayase-252 Ayase-252 mentioned this pull request Dec 16, 2021
lib: fix checking syntax of esm module #41198
Merged
nodejs-github-bot pushed a commit that referenced this pull request Dec 19, 2021
@Ayase-252
lib: fix checking syntax of esm module
3f7dabd
Fixes: #41189

PR-URL: #41198
Refs: #37468
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@JakobJingleheimer JakobJingleheimer mentioned this pull request Dec 22, 2021
loader: fix package resolution for edge case #41218
Merged
@frandiox frandiox mentioned this pull request Dec 26, 2021
Invalid module - code ERR_INVALID_MODULE_SPECIFIER frandiox/vitedge#74
Closed
D-Pow added a commit to D-Pow/react-app-boilerplate that referenced this pull request Jan 12, 2022
@D-Pow
Add the ability to run TypeScript files from CLI
b0525ee
This allows `ts-node` to be used to run TypeScript files without having to compile them with `tsc` first. It also adds the necessary configs, including `tsconfig-paths` for `paths` import-alias resolution. Unfortunately, this means we have to remove the `--experimental-module-resolution=node` since `ts-node` uses its own loader and thus form of resolving modules.

See:

Setup
* https://medium.com/@jimcraft123hd/setting-up-path-alias-in-typescript-and-tsc-build-without-error-9f1dbc0bccd2

Issues with `ts-node`, ESM, and aliases
* TypeStrong/ts-node#1007
    - TypeStrong/ts-node#476
    - jonaskello/tsconfig-paths#122 (comment)
    - TypeStrong/ts-node#1450 (comment)
* TypeStrong/ts-node#1414
* TypeStrong/ts-node#995
    - TypeStrong/ts-node#639

Node issues with ESM
* https://nodejs.org/api/packages.html#determining-module-system
* nodejs/node#37468
D-Pow added a commit to D-Pow/react-app-boilerplate that referenced this pull request Jan 12, 2022
@D-Pow
Add the ability to run TypeScript files from CLI
9d300e5
This allows `ts-node` to be used to run TypeScript files without having to compile them with `tsc` first. It also adds the necessary configs, including `tsconfig-paths` for `paths` import-alias resolution. Unfortunately, this means we have to remove the `--experimental-module-resolution=node` since `ts-node` uses its own loader and thus form of resolving modules.

See:

Setup
* https://medium.com/@jimcraft123hd/setting-up-path-alias-in-typescript-and-tsc-build-without-error-9f1dbc0bccd2

Issues with `ts-node`, ESM, and aliases
* TypeStrong/ts-node#1007
    - TypeStrong/ts-node#476
    - jonaskello/tsconfig-paths#122 (comment)
    - TypeStrong/ts-node#1450 (comment)
* TypeStrong/ts-node#1414
* TypeStrong/ts-node#995
    - TypeStrong/ts-node#639

Node issues with ESM
* https://nodejs.org/api/packages.html#determining-module-system
* nodejs/node#37468
D-Pow added a commit to D-Pow/react-app-boilerplate that referenced this pull request Jan 12, 2022
@D-Pow
Add the ability to run TypeScript files from CLI
d8f5677
This allows `ts-node` to be used to run TypeScript files without having to compile them with `tsc` first. It also adds the necessary configs, including `tsconfig-paths` for `paths` import-alias resolution. Unfortunately, this means we have to remove the `--experimental-module-resolution=node` since `ts-node` uses its own loader and thus form of resolving modules.

See:

Setup
* https://medium.com/@jimcraft123hd/setting-up-path-alias-in-typescript-and-tsc-build-without-error-9f1dbc0bccd2

Issues with `ts-node`, ESM, and aliases
* TypeStrong/ts-node#1007
    - TypeStrong/ts-node#476
    - jonaskello/tsconfig-paths#122 (comment)
    - TypeStrong/ts-node#1450 (comment)
* TypeStrong/ts-node#1414
* TypeStrong/ts-node#995
    - TypeStrong/ts-node#639

Node issues with ESM
* https://nodejs.org/api/packages.html#determining-module-system
* nodejs/node#37468
targos pushed a commit that referenced this pull request Jan 14, 2022
@Ayase-252 @targos
lib: fix checking syntax of esm module
e457ec0
Fixes: #41189

PR-URL: #41198
Refs: #37468
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 31, 2022
@Ayase-252 @danielleadams
lib: fix checking syntax of esm module
1122bd5
Fixes: #41189

PR-URL: #41198
Refs: #37468
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
danielleadams pushed a commit that referenced this pull request Feb 1, 2022
@Ayase-252 @danielleadams
lib: fix checking syntax of esm module
a47fc90
Fixes: #41189

PR-URL: #41198
Refs: #37468
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
@aduh95 aduh95 mentioned this pull request Apr 18, 2022
doc: fix version history for Loaders API #42778
Merged
@JakobJingleheimer JakobJingleheimer mentioned this pull request Jul 18, 2022
esm: add chaining to loaders #42623
Merged
10 tasks done
@JakobJingleheimer JakobJingleheimer mentioned this pull request Mar 8, 2023
Move ESM loaders off-thread #44710
Merged
7 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aduh95 aduh95 aduh95 approved these changes
@GeoffreyBooth GeoffreyBooth GeoffreyBooth approved these changes
@guybedford guybedford guybedford approved these changes
@DerekNonGeneric DerekNonGeneric Awaiting requested review from DerekNonGeneric
+3 more reviewers
@bmeck bmeck bmeck approved these changes
@targos targos targos left review comments
@bl-ue bl-ue bl-ue left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@GeoffreyBooth GeoffreyBooth

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. loaders Issues and PRs related to ES module loaders. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

14 participants

@JakobJingleheimer @GeoffreyBooth @devsnek @guybedford @DerekNonGeneric @aduh95 @targos @dnlup @cspotcode @nodejs-github-bot @TomerAberbach @danielleadams @bmeck @bl-ue
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.