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

fix: add ESM exports of all modules manually #14661

Merged
merged 12 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

### Performance

- `[*]` [**BREAKING**] Bundle all of Jest's modules into `index.js` ([#12348](https://github.com/jestjs/jest/pull/12348) & [#14550](https://github.com/jestjs/jest/pull/14550))
- `[*]` [**BREAKING**] Bundle all of Jest's modules into `index.js` ([#12348](https://github.com/jestjs/jest/pull/12348), [#14550](https://github.com/jestjs/jest/pull/14550) & [#14661](https://github.com/jestjs/jest/pull/14661))

### Chore & Maintenance

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
"rimraf": "^5.0.0",
"semver": "^7.5.3",
"slash": "^3.0.0",
"string-length": "^4.0.1",
"strip-ansi": "^6.0.0",
"strip-json-comments": "^3.1.1",
"tempy": "^1.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
Copy link
Member Author

Choose a reason for hiding this comment

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

I've included require here so that bundlers/runtimes who understand both can go straight to it - no need to use the ESM wrapper

"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/babel-plugin-jest-hoist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/create-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json",
Expand Down
2 changes: 2 additions & 0 deletions packages/diff-sequences/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/expect-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/expect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json",
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-changed-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-circus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json",
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json",
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-create-cache-key-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-docblock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-each/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-environment-jsdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-environment-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-expect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-fake-timers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-get-type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-haste-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-jasmine2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-leak-detector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-matcher-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-message-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-phabricator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-regex-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json",
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-reporters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-resolve-dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-resolve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-source-map/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-test-result/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-test-sequencer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"exports": {
".": {
"types": "./build/index.d.ts",
"require": "./build/index.js",
"import": "./build/index.mjs",
"default": "./build/index.js"
},
"./package.json": "./package.json"
Expand Down
Loading
Loading