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 dependency issues #11465

Merged
merged 6 commits into from
May 28, 2021
Merged

fix dependency issues #11465

merged 6 commits into from
May 28, 2021

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented May 27, 2021

Summary

Fixes #11452.

The slash one fools the eslint plugin as it uses import slash = require('slash') syntax.

The other change is because jest-util cannot access unresolved modules passed to it. normalize in jest-config should ideally just pass absolute strings through in config. I've also added the dependency, so it can resolve it.

Test plan

The changed check in requireOrImportModule threw without the require.resolve.

@@ -1056,6 +1056,10 @@ export default async function normalize(
rootDir: options.rootDir,
});

if (newOptions.runner === DEFAULT_CONFIG.runner) {
Copy link
Member Author

Choose a reason for hiding this comment

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

if it's not the default, it'll be resolved in the switch above

@SimenB SimenB force-pushed the dependency-fixes branch from 40b1160 to c4ea5bf Compare May 28, 2021 12:21
@codecov-commenter
Copy link

Codecov Report

Merging #11465 (c4ea5bf) into master (5f4dd18) will increase coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11465   +/-   ##
=======================================
  Coverage   69.17%   69.17%           
=======================================
  Files         312      312           
  Lines       16301    16305    +4     
  Branches     4717     4720    +3     
=======================================
+ Hits        11276    11279    +3     
- Misses       4997     4998    +1     
  Partials       28       28           
Impacted Files Coverage Δ
packages/jest-runner/src/runTest.ts 3.47% <0.00%> (-0.07%) ⬇️
packages/jest-util/src/requireOrImportModule.ts 0.00% <0.00%> (ø)
packages/jest-config/src/normalize.ts 89.07% <100.00%> (+0.04%) ⬆️
packages/expect/src/utils.ts 96.13% <0.00%> (+0.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f4dd18...c4ea5bf. Read the comment docs.

@SimenB SimenB merged commit 0927834 into jestjs:master May 28, 2021
@SimenB SimenB deleted the dependency-fixes branch May 28, 2021 13:32
@github-actions
Copy link

This pull request 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 Jun 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to run jest after 26 to 27 version bump with Yarn 3's PnP
4 participants