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.isPreloading doc doesn't match implementation #36775

Closed
Flarna opened this issue Jan 4, 2021 · 0 comments
Closed

module.isPreloading doc doesn't match implementation #36775

Flarna opened this issue Jan 4, 2021 · 0 comments
Labels
module Issues and PRs related to the module subsystem.

Comments

@Flarna
Copy link
Member

Flarna commented Jan 4, 2021

  • Version: 15.5.0
  • Platform: all
  • Subsystem: module

What steps will reproduce the bug?

isPreloading is documented in the Modules API section similar as e.g. createRequire but actually it's not implemented as static API of module. It is implemented as prototype method:

const { isPreloading, createRequire } = require("module")
console.log(isPreloading, module.isPreloading) // prints undefined, false
console.log(createRequire, module.createRequire) // prints [Function: createRequire] undefined

How often does it reproduce? Is there a required condition?

always

What is the expected behavior?

docs and implementation should match

What do you see instead?

docs/impl doesn't match

Additional information

Refs: #36263

fyi @jasnell

@targos targos added the module Issues and PRs related to the module subsystem. label Jan 4, 2021
aduh95 added a commit to aduh95/node that referenced this issue Jan 15, 2021
aduh95 added a commit to aduh95/node that referenced this issue Jan 18, 2021
Fixes: nodejs#36775

PR-URL: nodejs#36944
Refs: nodejs#36263
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
ruyadorno pushed a commit that referenced this issue Jan 22, 2021
Fixes: #36775

PR-URL: #36944
Refs: #36263
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
ruyadorno pushed a commit that referenced this issue Jan 25, 2021
Fixes: #36775

PR-URL: #36944
Refs: #36263
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this issue Apr 25, 2021
Fixes: #36775

PR-URL: #36944
Backport-PR-URL: #36988
Refs: #36263
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module Issues and PRs related to the module subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants