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

Prettier as peer dependency prevents upgrading it in consumers projects #60

Open
StefanoMagrassi opened this issue Jul 18, 2023 · 3 comments · May be fixed by #62
Open

Prettier as peer dependency prevents upgrading it in consumers projects #60

StefanoMagrassi opened this issue Jul 18, 2023 · 3 comments · May be fixed by #62

Comments

@StefanoMagrassi
Copy link

Do you want to request a feature or report a bug?

It seems to be a bug

What is the current behavior?

Prettier ^2.0.0 is required as peer dependency and it is used in runtime code.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://codesandbox.io/ or similar.

Prettier cannot be upgraded to v3 in a project that uses docs-ts as dependency:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: docs-ts@0.8.0
npm ERR! Found: prettier@3.0.0
npm ERR! node_modules/prettier
npm ERR!   dev prettier@"3.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer prettier@"^2.0.0" from docs-ts@0.8.0
npm ERR! node_modules/docs-ts
npm ERR!   dev docs-ts@"0.8.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: prettier@2.8.8
npm ERR! node_modules/prettier
npm ERR!   peer prettier@"^2.0.0" from docs-ts@0.8.0
npm ERR!   node_modules/docs-ts
npm ERR!     dev docs-ts@"0.8.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

What is the expected behavior?

Users should be able to upgrade Prettier to v3 (or further versions) and docs-ts should still work.

Which versions of docs-ts, and which browser and OS are affected by this issue? Did this work in previous versions of docs-ts?

  • docs-ts v0.8.0
  • any browser
  • any OS
@StefanoMagrassi
Copy link
Author

@gcanti if Prettier is still a fundamental part of doc-ts, it should be declared as dependency (not peer) in order to be available even if the the user wants to upgrade it in his/her project

@StefanoMagrassi
Copy link
Author

related #22

@velocityzen
Copy link

Hello, any progress on this?

@velocityzen velocityzen linked a pull request Dec 27, 2024 that will close this issue
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 a pull request may close this issue.

2 participants