Gavant / glint-template-types

MIT License
18 stars 20 forks source link

Add some peerDeps to help support pnpm #69

Closed RobbieTheWagner closed 11 months ago

RobbieTheWagner commented 1 year ago

This is not necessarily an exhaustive list, but anything we import from needs to be either a dep or a peerDep, otherwise we get errors using pnpm because it is strict about imports.

RobbieTheWagner commented 1 year ago

@bakerac4 any thoughts here?

bakerac4 commented 1 year ago

@RobbieTheWagner sorry for the delay.

I don't think it would be wise to have it be a straight dependency, since most people don't use many packages from this and depending on their build system it might not be compiled away.

Adding it as a peer dep is probably the best option out of either of those, but I dont necessarily love that you would get a bunch of warnings in your console about missing peer deps to just grab the types for one package.

RobbieTheWagner commented 1 year ago

@bakerac4 yeah, that's why I made these peerDeps. We could mark them as optional, but not sure if every package manager respects that. The root problem is, if this package is going to import from other packages, it has to actually have those packages as some kind of dependency, otherwise, it breaks consuming apps.

bakerac4 commented 1 year ago

@RobbieTheWagner I asked about this in the TS chat. They recommended just making the packages optional. Once you do that I can merge this!

RobbieTheWagner commented 1 year ago

@bakerac4 sorry for the huge delay, but this is updated now.