Skip to content

fix(jest-config): add missing slash dependency#12080

Merged
SimenB merged 6 commits intojestjs:mainfrom
quisido:patch-1
Nov 24, 2021
Merged

fix(jest-config): add missing slash dependency#12080
SimenB merged 6 commits intojestjs:mainfrom
quisido:patch-1

Conversation

@quisido
Copy link
Copy Markdown
Contributor

@quisido quisido commented Nov 21, 2021

Summary

Adds dependency to package.json.

resolveConfigPath requires slash as a dependency, but this dependency is not declared in package.json, making it ambiguous.

image

Copy link
Copy Markdown
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

thanks! please run yarn and add an entry to the changelog 🙂

@quisido
Copy link
Copy Markdown
Contributor Author

quisido commented Nov 24, 2021

Haha, I give up. You may want to look at this yourself. Looks like the .d.ts file for slash is incorrect:

This expression is not callable.
  Type 'typeof import("f:/git/jest/packages/jest-config/node_modules/slash/index")' has no call signatures.

I committed a workaround to treat slash as import('slash').default, but it's giving the current error about not being able to import the module.

I don't have bandwidth to investigate this further. 😢

Comment thread packages/jest-config/package.json Outdated
Comment thread yarn.lock Outdated
Comment thread yarn.lock Outdated
Comment thread packages/jest-config/src/resolveConfigPath.ts Outdated
Comment thread packages/jest-config/src/resolveConfigPath.ts Outdated
@SimenB SimenB changed the title Update package.json fix(jest-config): add missing slash dependency Nov 24, 2021
Copy link
Copy Markdown
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

I think the issues you were seeing was due to using slash@4 which is ESM native. Downgrading to v3 (which is what we use elsewhere) should fix it 🙂

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #12080 (555d41f) into main (7bb400c) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #12080   +/-   ##
=======================================
  Coverage   68.88%   68.89%           
=======================================
  Files         324      324           
  Lines       16669    16669           
  Branches     4814     4814           
=======================================
+ Hits        11483    11484    +1     
+ Misses       5153     5152    -1     
  Partials       33       33           
Impacted Files Coverage Δ
packages/expect/src/utils.ts 96.37% <0.00%> (+0.51%) ⬆️

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 7bb400c...555d41f. Read the comment docs.

@SimenB SimenB merged commit 9947a2a into jestjs:main Nov 24, 2021
@github-actions
Copy link
Copy Markdown

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 Dec 25, 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.

4 participants