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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Co-authored-by: Antoine du Hamel <[email protected]>
    Co-authored-by: Geoffrey Booth <[email protected]>
    Co-authored-by: Michaël Zasso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Stephen Belanger <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    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 <[email protected]>
    Reviewed-By: Benjamin Gruenbaum <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Matthew Aitken <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    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 <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    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 <[email protected]>
    Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
    Reviewed-By: Mestery <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Chemi Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Matteo Collina <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    Reviewed-By: Chemi Atlow <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Benjamin Gruenbaum <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jan Krems <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Rafael Gonzaga <[email protected]>
    Reviewed-By: Benjamin Gruenbaum <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Guy Bedford <[email protected]>
    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 <[email protected]>
    Reviewed-By: Joyee Cheung <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Stephen Belanger <[email protected]>
    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 <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    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 <[email protected]>
    Reviewed-By: Benjamin Gruenbaum <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Guy Bedford <[email protected]>
    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 <[email protected]>
    Reviewed-By: Guy Bedford <[email protected]>
    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 <[email protected]>
    Reviewed-By: Chemi Atlow <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    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 <[email protected]>
    Reviewed-By: LiviaMedeiros <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Chemi Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    Reviewed-By: Matteo Collina <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    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 <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    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 <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    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 <[email protected]>
    PR-URL: nodejs#49959
    Reviewed-By: Geoffrey Booth <[email protected]>
    Reviewed-By: Chemi Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Matteo Collina <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Guy Bedford <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    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 <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    Reviewed-By: Rich Trott <[email protected]>
    Reviewed-By: Trivikram Kamat <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    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 <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    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 <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    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 <[email protected]>
    Reviewed-By: Antoine du Hamel <[email protected]>
    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 <[email protected]>
    Reviewed-By: Jacob Smith <[email protected]>
    Reviewed-By: Benjamin Gruenbaum <[email protected]>
    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 <[email protected]>
    Reviewed-By: Michael Dawson <[email protected]>
    Reviewed-By: Marco Ippolito <[email protected]>
    Reviewed-By: Richard Lau <[email protected]>
    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 <[email protected]>
    Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    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 <[email protected]>
    Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
    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 <[email protected]>
    Reviewed-By: Chemi Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Yagiz Nizipli <[email protected]>
    Reviewed-By: Moshe Atlow <[email protected]>
    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 <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    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