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

module: prevent format from being set to null internaly #53015

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
Update module.md
  • Loading branch information
RedYetiDev committed May 15, 2024
commit fcc5d012357fd756a8ee6f5430b429da069930de
14 changes: 12 additions & 2 deletions doc/api/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ register('./path-to-my-hooks.js', {

<!-- YAML
changes:
- version:
- REPLACEME
pr-url: https://github.com/nodejs/node/pull/53015
description: The property `context.format` will no longer return `null`
in place of `undefined`.
- version:
- v21.0.0
- v20.10.0
Expand Down Expand Up @@ -509,7 +514,7 @@ changes:
* `specifier` {string}
* `context` {Object}
* Returns: {Object|Promise}
* `format` {string|null|undefined} A hint to the load hook (it might be
* `format` {string|undefined} A hint to the load hook (it might be
RedYetiDev marked this conversation as resolved.
Show resolved Hide resolved
ignored)
`'builtin' | 'commonjs' | 'json' | 'module' | 'wasm'`
* `importAttributes` {Object|undefined} The import attributes to use when
Expand Down Expand Up @@ -579,6 +584,11 @@ export async function resolve(specifier, context, nextResolve) {

<!-- YAML
changes:
- version:
- REPLACEME
pr-url: https://github.com/nodejs/node/pull/53015
description: The property `context.format` will no longer return `null`
in place of `undefined`.
- version: v20.6.0
pr-url: https://github.com/nodejs/node/pull/47999
description: Add support for `source` with format `commonjs`.
Expand All @@ -596,7 +606,7 @@ changes:
* `url` {string} The URL returned by the `resolve` chain
* `context` {Object}
* `conditions` {string\[]} Export conditions of the relevant `package.json`
* `format` {string|null|undefined} The format optionally supplied by the
* `format` {string|undefined} The format optionally supplied by the
RedYetiDev marked this conversation as resolved.
Show resolved Hide resolved
`resolve` hook chain
* `importAttributes` {Object}
* `nextLoad` {Function} The subsequent `load` hook in the chain, or the
Expand Down