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

babel-register run default register with global module cache #12674

Merged

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Jan 22, 2021

Q                       A
Fixed Issues? n/a
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link n/a
Any Dependency Changes? No
License MIT

Small follow-up to PR #12665.

This moves the default call to register() from node.js into nodeWrapper.js, so register() executes with global module cache.

In my original implementation, the default call to register() executes with internal module cache, whereas the user calling register( /* options */ ) executes with global module cache.

Right now, it makes no difference either way, as register function contains no code which could call require(). But if this changed in future, this amendment would ensure behaviour is consistent.

Sorry, I should have included this in the previous PR.

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/38114/

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 8674e1d:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@nicolo-ribaudo nicolo-ribaudo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Jan 23, 2021
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick follow-up 👍

@nicolo-ribaudo nicolo-ribaudo merged commit b727e67 into babel:main Jan 25, 2021
@overlookmotel overlookmotel deleted the register-transform-internal2 branch January 26, 2021 18:53
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Apr 28, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants