Skip to content

Conversation

joyeecheung
Copy link
Member

Explicitly initialize the CJS loader with module._initPaths()
instead of making it a side-effect of requiring
internal/modules/cjs/loader - that makes it harder to reason about
when it's safe to load internal/modules/cjs/loader.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Explicitly initialize the CJS loader with `module._initPaths()`
instead of making it a side-effect of requiring
`internal/modules/cjs/loader` - that makes it harder to reason about
when it's safe to load `internal/modules/cjs/loader`.
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@joyeecheung
Copy link
Member Author

Landed in 7c816b7

joyeecheung added a commit that referenced this pull request Apr 22, 2019
Explicitly initialize the CJS loader with `module._initPaths()`
instead of making it a side-effect of requiring
`internal/modules/cjs/loader` - that makes it harder to reason about
when it's safe to load `internal/modules/cjs/loader`.

PR-URL: #27313
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants