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

27.0.0-next.5 ESM loading regression #11214

Closed
ai opened this issue Mar 19, 2021 · 3 comments Β· Fixed by #11220
Closed

27.0.0-next.5 ESM loading regression #11214

ai opened this issue Mar 19, 2021 · 3 comments Β· Fixed by #11220

Comments

@ai
Copy link
Contributor

ai commented Mar 19, 2021

πŸ› Bug Report

After updating 27.0.0-next.4 β†’ 27.0.0-next.5 ESM import start to have cache problem.

I have a file with Symbol. But after the update, this file initializes twice and Symbol starts to have a different value in different files.

To Reproduce

[Repo](https://github.com/logux/state/tree/jest-esm-bug

git clone git@github.com:logux/state.git
git checkout jest-esm-bug
node --experimental-vm-modules node_modules/.bin/jest

Expected behavior

The test should be passed.

Link to repl or repo (highly encouraged)

Was not able to find how to reproduce cache problem

envinfo

  System:
    OS: Linux 5.10 Fedora 33 (Workstation Edition) 33 (Workstation Edition)
    CPU: (8) x64 Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  Binaries:
    Node: 15.12.0 - ~/.asdf/installs/nodejs/15.12.0/bin/node
    Yarn: 1.22.10 - ~/.asdf/shims/yarn
    npm: 7.6.3 - ~/.asdf/installs/nodejs/15.12.0/bin/npm
  npmPackages:
    jest: ^27.0.0-next.2 => 27.0.0-next.4
@SimenB
Copy link
Member

SimenB commented Mar 20, 2021

Thanks for the report! This regressed in #11191 - forcing the transform to be sync fixes the issue. I assume we actually create multiple entries in the cache of the same key. A mutex should help here. Would be nice to reproduce this issue in a test, tho... I'll try πŸ˜€

@SimenB
Copy link
Member

SimenB commented Mar 26, 2021

@ai fix released in next.6

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants