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 optional typescript peerDependency to apollo-composable package #1546

Open
wants to merge 1 commit into
base: v4
Choose a base branch
from

Conversation

jnoordsij
Copy link
Contributor

Fixes #1499

@jnoordsij jnoordsij changed the title Add optional typescript peerDependency to apollo-composable package fix: Add optional typescript peerDependency to apollo-composable package Mar 26, 2024
@nickmessing
Copy link
Member

@jnoordsij, This is probably not the correct fix. This project can and is used by some people with plain JS. We should not add typescript as a peerDependency

@jnoordsij
Copy link
Contributor Author

Hey there, thanks for checking this! I do think this is the correct fix for this case, given

  • ts-essentials is listed as a (hard) dependency, although this is also only required for those using TypeScript
  • given that ts-essentials requires a (very broad but technically speaking still a) specific range of TypeScript versions and lists this as peerDependency, it is up to this package to fulfill that in some way
  • by explicitly marking it here as an optional peerDependency, it is up to the end-user to decide on wether or not to use TypeScript, therefore not adding an additional package (even though ts-essentials still is added)

The only alternative I see is moving ts-essentials to be an optional peerDependency, but I think that is more breaking and invasive to end-users, given that it is harder to realise that they should be providing that in case they are using TypeScript, compared to them installing typescript when they want to use TypeScript.

@nickmessing
Copy link
Member

@jnoordsij, oh, didn't realise that ts-essentials is a dependency O_O.

@Akryum wdyt on this?

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.

Missing peer dependency on typescript in @vue/apollo-composable
2 participants