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 missing haste-map dep to jest-snapshot #10008

Merged
merged 2 commits into from May 9, 2020

Conversation

tanem
Copy link
Contributor

@tanem tanem commented May 9, 2020

Hi there,

I recently updated to jest-snapshot version 26.0.1, and was getting this TypeScript compilation error:

node_modules/jest-snapshot/build/index.d.ts:17:31 - error TS2307: Cannot find module 'jest-haste-map/build/HasteFS'.

17     cleanup: (hasteFS: import("jest-haste-map/build/HasteFS").default, update: Config.SnapshotUpdateState, snapshotResolver: JestSnapshotResolver, testPathIgnorePatterns?: string[] | undefined) => {

It appears jest-haste-map should no longer be a dev dependency of jest-snapshot?

PS: I raised this PR before raising an issue, feel free to 🔥it if there's already a fix underway (or if it's the wrong fix).

@facebook-github-bot
Copy link
Contributor

Hi @tanem!

Thank you for your pull request and welcome to our community.We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@codecov-io
Copy link

codecov-io commented May 9, 2020

Codecov Report

Merging #10008 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10008   +/-   ##
=======================================
  Coverage   63.92%   63.92%           
=======================================
  Files         293      293           
  Lines       12496    12496           
  Branches     3081     3083    +2     
=======================================
  Hits         7988     7988           
  Misses       3863     3863           
  Partials      645      645           

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 c776f87...8cd6af3. Read the comment docs.

Copy link
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.

That's unfortunate, but does look like the correct fix 👍 We might consider moving the declaration out of jest-haste-map to reduce the dependency weight in the future, but this looks correct 👍

@SimenB SimenB changed the title Fix jest-snapshot TypeScript compilation fix: add missing haste-map dep to jest-snapshot May 9, 2020
@SimenB SimenB merged commit 41e2856 into jestjs:master May 9, 2020
@tanem tanem deleted the fix-tsc-error branch May 9, 2020 03:39
jeysal added a commit to jeysal/jest that referenced this pull request May 25, 2020
…esolve-outside

* upstream/master: (106 commits)
  docs: fix jest-diff example (jestjs#10067)
  Cleanup `displayName` type (jestjs#10049)
  docs: correct confusing filename in `enableAutomock` example (jestjs#10055)
  chore: minor optimize getTransformer (jestjs#10050)
  chore: fix TestUtils.ts to match the types (jestjs#10034)
  Minor test name typo fix (jestjs#10033)
  chore: upgrade to typescript 3.9 (jestjs#10031)
  feat: CLI argument to filter tests by projects (jestjs#8612)
  chore: bump `istanbul-lib-instrument` (jestjs#10009)
  feat: support config files exporting (`async`) `function`s (jestjs#10001)
  fix: add missing haste-map dep to jest-snapshot (jestjs#10008)
  🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 (jestjs#10000)
  Fix typo in dependency warning (jestjs#10006)
  chore: add missing comma (jestjs#9999)
  fix: Control no diff message color with diff options (jestjs#9997)
  fix(jest-jasmine2): fix Error message (jestjs#9990)
  docs: fix jest-object ids for docusaurs (jestjs#9994)
  docs: fix Configuration, JestPlatform and JestObjectAPI docs for 26 (jestjs#9985)
  Add migration notes for breaking changes (jestjs#9978)
  chore: fix date and heading in blog post (jestjs#9977)
  ...
@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 May 11, 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.

None yet

4 participants