-
-
Couldn't load subscription status.
- Fork 6.6k
feat(jest-config): correctly resolve Jest test deps in monorepo that usespnpm
#15877
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
base: main
Are you sure you want to change the base?
feat(jest-config): correctly resolve Jest test deps in monorepo that usespnpm
#15877
Conversation
…use `pnpm` Signed-off-by: hainenber <dotronghai96@gmail.com>
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: hainenber <dotronghai96@gmail.com>
babel-jest
babel-plugin-jest-hoist
babel-preset-jest
create-jest
@jest/diff-sequences
expect
@jest/expect-utils
jest
jest-changed-files
jest-circus
jest-cli
jest-config
@jest/console
@jest/core
@jest/create-cache-key-function
jest-diff
jest-docblock
jest-each
@jest/environment
jest-environment-jsdom
@jest/environment-jsdom-abstract
jest-environment-node
@jest/expect
@jest/fake-timers
@jest/get-type
@jest/globals
jest-haste-map
jest-jasmine2
jest-leak-detector
jest-matcher-utils
jest-message-util
jest-mock
@jest/pattern
jest-phabricator
jest-regex-util
@jest/reporters
jest-resolve
jest-resolve-dependencies
jest-runner
jest-runtime
@jest/schemas
jest-snapshot
@jest/snapshot-utils
@jest/source-map
@jest/test-result
@jest/test-sequencer
@jest/transform
@jest/types
jest-util
jest-validate
jest-watcher
jest-worker
pretty-format
commit: |
Signed-off-by: hainenber <dotronghai96@gmail.com>
I don't agree with this as any difference in resolution is a bug. If a dep is not resolved correctly in the config, there might be other discrepancies when running tests as well. So I'd rather fix the resolution bug within Jest |
Summary
Fixes #15876
For
pnpmprojects, it's better to use native JS runtime (bun, node or deno) to perform module resolution for default Jest test deps like@jest/test-sequencerandjest-environment-node. We should rely on third-party mechanisms like Rust-based resolvers when it comes to custom test deps.IMO, this should be enabled for all package managers, not just
pnpmbut to prevent potential incidents, let's limit the blast radius to one packman only.Test plan