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 pretty format import #705

Closed
wants to merge 3 commits into from
Closed

Fix pretty format import #705

wants to merge 3 commits into from

Conversation

samtsai
Copy link
Collaborator

@samtsai samtsai commented Jun 8, 2020

What: add pretty-format as a dependency

Why: fix #694, since moving typings to this repo we have to make pretty-format an explicit dependency since our types rely on it

How: update package.json

Checklist:

  • Documentation added to the
    docs site N/A
  • Tests N/A
  • Typescript definitions updated N/A
  • Ready to be merged

I tried with devDependency but those packages will not be installed on consumer projects, https://stackoverflow.com/questions/45176661/how-do-i-decide-whether-types-goes-into-dependencies-or-devdependencies is a good discussion that helped me wrap my head around what is necessary.

Typings use `import {OptionsReceived as PrettyFormatOptions} from 'pretty-format'`
Fix #694
Unfortunately as a side-effect of housing typings in this repo,
we need to explicitly add `pretty-format` as a dependency
since our types rely on it.

Note this project source code itself does not explicitly need
`pretty-format` but instead just its typings.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 8, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 073e99c:

Sandbox Source
jolly-wind-80n13 Configuration
pensive-boyd-1iu92 Configuration

@codecov
Copy link

codecov bot commented Jun 8, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #705   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          100       100           
  Branches        16        16           
=========================================
  Hits           100       100           

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 d10a13d...073e99c. Read the comment docs.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Shouldn't it come with @testing-library/dom? I'm worried about keeping the versions in sync.

@samtsai
Copy link
Collaborator Author

samtsai commented Jun 8, 2020

Shouldn't it come with @testing-library/dom? I'm worried about keeping the versions in sync.

This was my worry too, and maybe this issue is not for all users. I'll keep investigating with the OP repo.

@samtsai
Copy link
Collaborator Author

samtsai commented Jun 8, 2020

I'm going to close this PR, I have given feedback to the OP.

@nickmccurdy
Copy link
Member

Seems like we do need this based on #694 (comment)

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

I'd prefer to do this: #694 (comment)

@nickmccurdy nickmccurdy deleted the fix-pretty-format-import branch November 30, 2020 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find module 'pretty-format'
3 participants