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(jest-snapshot): move @types/prettier to devDependencies #14328

Merged
merged 2 commits into from
Jul 14, 2023

Conversation

Kloen
Copy link
Contributor

@Kloen Kloen commented Jul 13, 2023

Move @types/prettier to devDependencies to avoid conflicts with typescript projects using prettier>2.1.5.

Summary

I've been working on a project that uses TypeScript and Prettier directly, while working with it there were a few issues regarding the types (check and format functions).

I'm using prettier@3.x and jest@29.6.1 for testing. After getting some warnings about the types on my IDE, and given that prettier already ships it's own types I decided to check around, turns out that jest-snapshot was listing @types/prettier as a dependency. Not only that, but it's prettier@2.x so that were giving me erroneous warnings and IDE hints.

I don't see a reason to have @types/prettier as a dependency instead of a devDependency so...

Test plan

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 13, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Kloen / name: Klöen Lansfiel (643ab16)
  • ✅ login: SimenB / name: Simen Bekkhus (fe489db)

@netlify
Copy link

netlify bot commented Jul 13, 2023

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit fe489db
🔍 Latest deploy log https://app.netlify.com/sites/jestjs/deploys/64b140900072be00071038d4
😎 Deploy Preview https://deploy-preview-14328--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

This is correct as the types are not used in the exported types: https://www.runpkg.com/?jest-snapshot@29.6.1/build/index.d.ts

@SimenB SimenB merged commit e04947c into jestjs:main Jul 14, 2023
@SimenB
Copy link
Member

SimenB commented Jul 27, 2023

@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 Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants