vuejs / apollo

🚀 Apollo/GraphQL integration for VueJS
http://apollo.vuejs.org
MIT License
6.03k stars 523 forks source link

fix: Add optional typescript peerDependency to apollo-composable package #1546

Closed jnoordsij closed 3 months ago

jnoordsij commented 8 months ago

Fixes #1499

nickmessing commented 8 months ago

@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 commented 8 months ago

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

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 commented 8 months ago

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

@Akryum wdyt on this?

jnoordsij commented 5 months ago

As ts-essentials now has its typescript dependency marked as optional (see https://github.com/ts-essentials/ts-essentials/pull/371), this is no longer required to fix the issue. One may opt to still add this as some possibly useful metadata, although maybe having it at ts-essentials and leaving it there suffices. So feel free to close this if there's no time or reason to review/merge this further.