Skip to content

27.0.0-next.5 ESM loading regressionΒ #11214

@ai

Description

@ai

πŸ› 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions