Skip to content
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

[v18.x] Backport most ESM and customization hook changes #50669

Closed
wants to merge 75 commits into from

Commits on Nov 10, 2023

  1. esm: move hook execution to separate thread

    PR-URL: nodejs#44710
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>
    Co-authored-by: Michaël Zasso <targos@protonmail.com>
    4 people committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    5a0ae4d View commit details
    Browse the repository at this point in the history
  2. esm: avoid try/catch when validating urls

    PR-URL: nodejs#47541
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
    anonrig authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    7c878ef View commit details
    Browse the repository at this point in the history
  3. esm: propagate process.exit from the loader thread to the main thread

    PR-URL: nodejs#47548
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    4990269 View commit details
    Browse the repository at this point in the history
  4. esm: initialize import.meta on eval

    PR-URL: nodejs#47551
    Reviewed-By: Guy Bedford <guybedford@gmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    40fa6e4 View commit details
    Browse the repository at this point in the history
  5. esm: remove support for deprecated hooks

    Those have been deprecated for a while, it's time.
    
    PR-URL: nodejs#47580
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    d8687c4 View commit details
    Browse the repository at this point in the history
  6. loader: use default loader as cascaded loader in the in loader worker

    Use the default loader as the cascaded loader in the loader worker.
    Otherwise we spawn loader workers in the loader workers indefinitely.
    
    PR-URL: nodejs#47620
    Fixes: nodejs#47566
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    joyeecheung authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    ee9cef2 View commit details
    Browse the repository at this point in the history
  7. esm: rename URLCanParse to be consistent

    PR-URL: nodejs#47668
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    d63f4c4 View commit details
    Browse the repository at this point in the history
  8. esm: do not use 'beforeExit' on the main thread

    PR-URL: nodejs#47964
    Fixes: nodejs#47929
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    a31ca4e View commit details
    Browse the repository at this point in the history
  9. esm: handle more error types thrown from the loader thread

    PR-URL: nodejs#48247
    Refs: nodejs#48240
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    2bb6dfb View commit details
    Browse the repository at this point in the history
  10. esm: handle globalPreload hook returning a nullish value

    PR-URL: nodejs#48249
    Fixes: nodejs#48240
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    09c986e View commit details
    Browse the repository at this point in the history
  11. esm: remove support for arrays in import internal method

    This avoids initializing arrays that we never use, and simplifies the
    implementation overall.
    
    PR-URL: nodejs#48296
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    96edd85 View commit details
    Browse the repository at this point in the history
  12. typings: fix JSDoc in ESM loader modules

    PR-URL: nodejs#48424
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Mestery <mestery@protonmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    a0c10aa View commit details
    Browse the repository at this point in the history
  13. module: implement register utility

    PR-URL: nodejs#46826
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    jlenon7 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    1964e25 View commit details
    Browse the repository at this point in the history
  14. esm: add back globalPreload tests and fix failing ones

    PR-URL: nodejs#48779
    Fixes: nodejs#48778
    Fixes: nodejs#48516
    Refs: nodejs#46402
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    002a084 View commit details
    Browse the repository at this point in the history
  15. esm: unflag Module.register and allow nested loader import()

    Major functional changes:
    
    - Allow `import()` to work within loaders that require other loaders,
    - Unflag the use of `Module.register`.
    
    A new interface `Customizations` has been created in order to unify
    `ModuleLoader` (previously `DefaultModuleLoader`), `Hooks` and
    `CustomizedModuleLoader` all of which now implement it:
    
    ```ts
    interface LoadResult {
      format: ModuleFormat;
      source: ModuleSource;
    }
    
    interface ResolveResult {
      format: string;
      url: URL['href'];
    }
    
    interface Customizations {
      allowImportMetaResolve: boolean;
      load(url: string, context: object): Promise<LoadResult>
      resolve(
        originalSpecifier:
        string, parentURL: string,
        importAssertions: Record<string, string>
      ): Promise<ResolveResult>
      resolveSync(
        originalSpecifier:
        string, parentURL: string,
        importAssertions: Record<string, string>
      ) ResolveResult;
      register(specifier: string, parentUrl: string): any;
      forceLoadHooks(): void;
      importMetaInitialize(meta, context, loader): void;
    }
    ```
    
    The `ModuleLoader` class now has `setCustomizations` which takes an
    object of this shape and delegates its responsibilities to this object
    if present.
    
    Note that two properties `allowImportMetaResolve` and `resolveSync`
    exist now as a mechanism for `import.meta.resolve` – since `Hooks`
    does not implement `resolveSync` other loaders cannot use
    `import.meta.resolve`; `allowImportMetaResolve` is a way of checking
    for that case instead of invoking `resolveSync` and erroring.
    
    Fixes nodejs#48515
    Closes nodejs#48439
    
    PR-URL: nodejs#48559
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    izaakschroeder authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    afa2562 View commit details
    Browse the repository at this point in the history
  16. module: ensure successful import returns the same result

    PR-URL: nodejs#46662
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    5de6683 View commit details
    Browse the repository at this point in the history
  17. test: fix es-module/test-esm-initialization

    PR-URL: nodejs#48880
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    0a9e81e View commit details
    Browse the repository at this point in the history
  18. fs: make mkdtemp accept buffers and URL

    PR-URL: nodejs#48828
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    LiviaMedeiros authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    4ffa98f View commit details
    Browse the repository at this point in the history
  19. test: fix some assumptions in tests

    Some tests are assuming they will be run from a directory that do not
    contain any quote or special character in its path. That assumption is
    not necessary, using `JSON.stringify` or `pathToFileURL` ensures the
    test can be run whatever the path looks like.
    
    PR-URL: nodejs#48958
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    17ba928 View commit details
    Browse the repository at this point in the history
  20. test: order common.mjs in ASCII order

    PR-URL: nodejs#48960
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    9d44275 View commit details
    Browse the repository at this point in the history
  21. test: fix snapshot tests when cwd contains spaces or backslashes

    Both are valid characters for file names on non-Windows systems.
    
    PR-URL: nodejs#48959
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    ce1d396 View commit details
    Browse the repository at this point in the history
  22. esm: fix typo parentUrl -> parentURL

    PR-URL: nodejs#48999
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    f5661b0 View commit details
    Browse the repository at this point in the history
  23. esm: add initialize hook, integrate with register

    Follows @giltayar's proposed API:
    
    > `register` can pass any data it wants to the loader, which will be
    passed to the exported `initialize` function of the loader.
    Additionally, if the user of `register` wants to communicate with the
    loader, it can just create a `MessageChannel` and pass the port to the
    loader as data.
    
    The `register` API is now:
    
    ```ts
    interface Options {
      parentUrl?: string;
      data?: any;
      transferList?: any[];
    }
    
    function register(loader: string, parentUrl?: string): any;
    function register(loader: string, options?: Options): any;
    ```
    
    This API is backwards compatible with the old one (new arguments are
    optional and at the end) and allows for passing data into the new
    `initialize` hook. If this hook returns data it is passed back to
    `register`:
    
    ```ts
    function initialize(data: any): Promise<any>;
    ```
    
    **NOTE**: Currently there is no mechanism for a loader to exchange
    ownership of something back to the caller.
    
    Refs: nodejs/loaders#147
    PR-URL: nodejs#48842
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    izaakschroeder authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    c34870e View commit details
    Browse the repository at this point in the history
  24. test: use fixtures.fileURL when appropriate

    PR-URL: nodejs#48990
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    3d58e49 View commit details
    Browse the repository at this point in the history
  25. esm: protect ERR_UNSUPPORTED_DIR_IMPORT against prototype pollution

    PR-URL: nodejs#49060
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    61aa405 View commit details
    Browse the repository at this point in the history
  26. test: reduce flakiness of test-esm-loader-hooks

    PR-URL: nodejs#49105
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    0bfcddc View commit details
    Browse the repository at this point in the history
  27. esm: import.meta.resolve exact module not found errors should return

    PR-URL: nodejs#49038
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jan Krems <jan.krems@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    guybedford authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    a256f11 View commit details
    Browse the repository at this point in the history
  28. esm: unflag import.meta.resolve

    PR-URL: nodejs#49028
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    guybedford authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    73809e2 View commit details
    Browse the repository at this point in the history
  29. esm: fix globalPreload warning

    PR-URL: nodejs#49069
    Fixes: nodejs#49026
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    8ec3953 View commit details
    Browse the repository at this point in the history
  30. doc: fix name of the flag in initialize() docs

    PR-URL: nodejs#49158
    Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    586bb8f View commit details
    Browse the repository at this point in the history
  31. test: refactor test-esm-loader-hooks for easier debugging

    - Always check stderr before stdout as the former would contain error
      information.
    - Always match the full stdout to avoid surprises.
    - Use `deepStrictEqual` when appropriate to get more informative test
      failures.
    - Remove leading slashes from relative paths/URLs to not confuse them
      with absolute paths.
    - Remove unnecessary `--no-warnings` flag.
    
    PR-URL: nodejs#49131
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    1c020cc View commit details
    Browse the repository at this point in the history
  32. doc: caveat unavailability of import.meta.resolve in custom loaders

    PR-URL: nodejs#49242
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    JakobJingleheimer authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    222a378 View commit details
    Browse the repository at this point in the history
  33. test: reduce flakiness of test-esm-loader-hooks

    PR-URL: nodejs#49248
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    aduh95 authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    cf02160 View commit details
    Browse the repository at this point in the history
  34. doc: add signature for module.register

    PR-URL: nodejs#49251
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    0b72534 View commit details
    Browse the repository at this point in the history
  35. esm: refactor mocking test

    PR-URL: nodejs#49465
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    3c9111e View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2023

  1. doc: move and rename loaders section

    PR-URL: nodejs#49261
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    f86933b View commit details
    Browse the repository at this point in the history
  2. doc: update module hooks docs

    PR-URL: nodejs#49265
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    dcf909c View commit details
    Browse the repository at this point in the history
  3. doc: edit import.meta.resolve documentation

    PR-URL: nodejs#49247
    Refs: nodejs#49028
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Guy Bedford <guybedford@gmail.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    16580a4 View commit details
    Browse the repository at this point in the history
  4. test: add tmpdir.fileURL()

    PR-URL: nodejs#49040
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
    LiviaMedeiros authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    abedad7 View commit details
    Browse the repository at this point in the history
  5. esm: refactor test-esm-named-exports

    PR-URL: nodejs#49493
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    d785f83 View commit details
    Browse the repository at this point in the history
  6. esm: refactor test-esm-loader-resolve-type

    PR-URL: nodejs#49493
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    9a7a8c5 View commit details
    Browse the repository at this point in the history
  7. esm: remove return value for Module.register

    The current API shape si not great because it's too limited and
    redundant with the use of `MessagePort`.
    
    PR-URL: nodejs#49529
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    fbc7c3e View commit details
    Browse the repository at this point in the history
  8. typings: fix missing property in ExportedHooks

    PR-URL: nodejs#49567
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    71c4ae3 View commit details
    Browse the repository at this point in the history
  9. test: isolate globalPreload tests

    PR-URL: nodejs#49545
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    a23a4c9 View commit details
    Browse the repository at this point in the history
  10. test: increase coverage of Module.register and initialize hook

    PR-URL: nodejs#49532
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    89dce06 View commit details
    Browse the repository at this point in the history
  11. esm: clarify ERR_REQUIRE_ESM errors

    In nodejs#39175, better ESM errors were introduced. This commit tweaks the
    language in the error slightly to make it clear that there are three
    different options to resolve the error.
    
    Refs: nodejs#39175
    PR-URL: nodejs#49521
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
    danielcompton authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    40ffd28 View commit details
    Browse the repository at this point in the history
  12. esm: fix support for URL instances in register

    PR-URL: nodejs#49655
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    1a2443a View commit details
    Browse the repository at this point in the history
  13. esm: update loaders warning

    PR-URL: nodejs#49633
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Guy Bedford <guybedford@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    a29ddb3 View commit details
    Browse the repository at this point in the history
  14. esm: fix return type of import.meta.resolve

    PR-URL: nodejs#49698
    Fixes: nodejs#49695
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Guy Bedford <guybedford@gmail.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    44b345c View commit details
    Browse the repository at this point in the history
  15. doc: add missing history info for import.meta.resolve

    PR-URL: nodejs#49700
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    aadc39f View commit details
    Browse the repository at this point in the history
  16. esm: identify parent importing a url with invalid host

    PR-URL: nodejs#49736
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    JakobJingleheimer authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    efd4e8c View commit details
    Browse the repository at this point in the history
  17. esm: fix cache collision on JSON files using file: URL

    PR-URL: nodejs#49887
    Fixes: nodejs#49724
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: LiviaMedeiros <livia@cirno.name>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    f85e62f View commit details
    Browse the repository at this point in the history
  18. lib: merge cjs and esm package json reader caches

    PR-URL: nodejs#48477
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    anonrig authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    a600822 View commit details
    Browse the repository at this point in the history
  19. esm: require braces for modules code

    PR-URL: nodejs#49657
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    c262d3b View commit details
    Browse the repository at this point in the history
  20. module, esm: jsdoc for modules files

    PR-URL: nodejs#49523
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    bd4eda0 View commit details
    Browse the repository at this point in the history
  21. module: move helpers out of cjs loader

    PR-URL: nodejs#49912
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    7c5b7f3 View commit details
    Browse the repository at this point in the history
  22. esm: improve JSDoc annotation of internal functions

    Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com>
    PR-URL: nodejs#49959
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    2 people authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    2f26771 View commit details
    Browse the repository at this point in the history
  23. esm: --experimental-default-type flag to flip module defaults

    PR-URL: nodejs#49869
    Reviewed-By: Guy Bedford <guybedford@gmail.com>
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    ce76ac2 View commit details
    Browse the repository at this point in the history
  24. esm: unflag extensionless javascript and wasm in module scope

    PR-URL: nodejs#49974
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    Reviewed-By: Guy Bedford <guybedford@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    823adc8 View commit details
    Browse the repository at this point in the history
  25. util: add getCwdSafe internal util fn

    This function was first implemented in nodejs#46826, but at some point
    of the PR implementation this fn was no longer related to the PR.
    
    Refs: nodejs#46826 (comment)
    PR-URL: nodejs#48434
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    jlenon7 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    08201aa View commit details
    Browse the repository at this point in the history
  26. esm: bypass CommonJS loader under --default-type

    PR-URL: nodejs#49986
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    151e812 View commit details
    Browse the repository at this point in the history
  27. tools: update eslint to 8.45.0

    PR-URL: nodejs#48793
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    9ed022b View commit details
    Browse the repository at this point in the history
  28. tools: update eslint to 8.46.0

    PR-URL: nodejs#48966
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Rich Trott <rtrott@gmail.com>
    Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    5c4057a View commit details
    Browse the repository at this point in the history
  29. tools: update eslint to 8.47.0

    PR-URL: nodejs#49124
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    9509884 View commit details
    Browse the repository at this point in the history
  30. tools: update eslint to 8.48.0

    PR-URL: nodejs#49343
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    2208832 View commit details
    Browse the repository at this point in the history
  31. tools: update eslint to 8.49.0

    PR-URL: nodejs#49586
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    96dea39 View commit details
    Browse the repository at this point in the history
  32. tools: update eslint to 8.50.0

    PR-URL: nodejs#49989
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Tobias Nießen <tniessen@tnie.de>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    669e3d7 View commit details
    Browse the repository at this point in the history
  33. tools: update eslint to 8.51.0

    PR-URL: nodejs#50084
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
    nodejs-github-bot authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    83f680f View commit details
    Browse the repository at this point in the history
  34. esm: use import attributes instead of import assertions

    The old import assertions proposal has been
    renamed to "import attributes" with the follwing major changes:
    
    1. The keyword is now `with` instead of `assert`.
    2. Unknown assertions cause an error rather than being ignored,
    
    This commit updates the documentation to encourage folks to use the new
    syntax, and add aliases for module customization hooks.
    
    PR-URL: nodejs#50140
    Fixes: nodejs#50134
    Refs: v8/v8@159c82c
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Jacob Smith <jacob@frende.me>
    Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    5699370 View commit details
    Browse the repository at this point in the history
  35. test: deflake test-esm-loader-resolve-type

    PR-URL: nodejs#50273
    Fixes: nodejs#50040
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    Reviewed-By: Michael Dawson <midawson@redhat.com>
    Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
    Reviewed-By: Richard Lau <rlau@redhat.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    52901a7 View commit details
    Browse the repository at this point in the history
  36. test: deflake test-loaders-workers-spawned

    PR-URL: nodejs#50251
    Fixes: nodejs#50247
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    bd6512e View commit details
    Browse the repository at this point in the history
  37. vm: use import attributes instead of import assertions

    The old import assertions proposal has been
    renamed to "import attributes" with the following major changes:
    
    1. The keyword is now `with` instead of `assert`.
    2. Unknown assertions cause an error rather than being ignored.
    
    This PR updates the documentation to encourage folks to use the new
    syntax, and add aliases to preserve backward compatibility.
    
    PR-URL: nodejs#50141
    Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
    Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    b0829b7 View commit details
    Browse the repository at this point in the history
  38. test: refactor test-node-output-errors

    The main reason is to not have the test fail if the CWD contains some
    special URL chars.
    
    PR-URL: nodejs#48992
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
    aduh95 authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    8f9645d View commit details
    Browse the repository at this point in the history
  39. test: fix edge snapshot stack traces

    PR-URL: nodejs#49659
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
    Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
    GeoffreyBooth authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    85b21a8 View commit details
    Browse the repository at this point in the history
  40. tools: skip ruff on tools/node_modules

    PR-URL: nodejs#49838
    Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
    Reviewed-By: Michaël Zasso <targos@protonmail.com>
    MoLow authored and targos committed Nov 11, 2023
    Configuration menu
    Copy the full SHA
    3bf8c02 View commit details
    Browse the repository at this point in the history