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

Update Jest to 27.2.0 #13776

Merged
merged 2 commits into from Sep 17, 2021
Merged

Update Jest to 27.2.0 #13776

merged 2 commits into from Sep 17, 2021

Conversation

nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Sep 17, 2021

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

Jest 27.2.0 includes jestjs/jest#11859. It's better than the current resolution we had, because we always assumed that importer files where using require(). This PR aligns better Jest's behavior with the native Node.js resolution.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Sep 17, 2021

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 b6e6671:

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

@babel-bot
Copy link
Collaborator

babel-bot commented Sep 17, 2021

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


const resolvers = new Map();
function getResolver(conditionNames) {
const key = conditionNames.join(":::");
Copy link
Contributor

@JLHwung JLHwung Sep 17, 2021

Choose a reason for hiding this comment

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

Q: Is ":::" a hardcoded separator used by enhanced-resolve? Can we link to where it comes from?

Ah I see, it is only used in this resolver, maybe better name it actually.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's just to build a cache key, to avoid reinstantiating the resolver for every request. Should I rename the map to resolversCache?

Copy link
Contributor

Choose a reason for hiding this comment

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

Either looks good to me, I would prefer name the ":::" actually, to signal that it is only used by us internally.

@nicolo-ribaudo nicolo-ribaudo merged commit a815d7d into babel:main Sep 17, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the up-jest branch September 17, 2021 17:02
@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 Dec 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 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: Dependency ⬆️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants