Gavant / glint-template-types

MIT License
19 stars 20 forks source link

Expand peer dependencies #88

Open Techn1x opened 10 months ago

Techn1x commented 10 months ago

Would be great to expand these eg "ember-basic-dropdown": "^6.0.1 || ^7",

└─┬ @gavant/glint-template-types 0.3.6
  ├── ✕ unmet peer ember-basic-dropdown@^6.0.1: found 7.3.0
  └── ✕ unmet peer ember-modifier@^3.2.7: found 4.1.0

pnpm is quite strict with peer deps (unless that is turned off, which I don't want to do, as I'm using this in an addon/package and it's advised to keep it strict there)

Probably a few others to update as well

https://github.com/Gavant/glint-template-types/blob/32f273d1630ea9019a8f9dd2e69ce5be002989b6/package.json#L53-L62

elidupuis commented 7 months ago

I just ran into this issue after upgrading to ember-intl v6. I've update my type registry based on the details in the ember-intl migration guide but I'm still getting the following error after running npm install:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @gavant/glint-template-types@0.4.0
npm ERR! Found: ember-intl@6.4.0
npm ERR! node_modules/ember-intl
npm ERR!   dev ember-intl@"^6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ember-intl@"^5.7.2" from @gavant/glint-template-types@0.4.0
npm ERR! node_modules/@gavant/glint-template-types
npm ERR!   dev @gavant/glint-template-types@"^0.4.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: ember-intl@5.7.2
npm ERR! node_modules/ember-intl
npm ERR!   peerOptional ember-intl@"^5.7.2" from @gavant/glint-template-types@0.4.0
npm ERR!   node_modules/@gavant/glint-template-types
npm ERR!     dev @gavant/glint-template-types@"^0.4.0" from the root project

@bakerac4 Would simply expanding the dependency range for these optional packages solve this issue? Happy to open a PR if this is the case.

Techn1x commented 7 months ago

What's a little annoying is that types from this package aren't needed for ember-intl v6 and various other addons once they're updated.

I think another solution here, is for those addons that do indeed have template types now, to remove them from this package. Cut a major, drop those types and dependencies, and tell those consumers to update to a later version of ember-intl, ember-concurrency, etc. to get the real template types.

elidupuis commented 7 months ago

What's a little annoying is that types from this package aren't needed for ember-intl v6 and various other addons once they're updated.

Yes, exactly!

I opened #90 and it seems to "fix" the issue for my case. But I agree that addons with first class type support should probably be removed from glint-template-types 👍

Techn1x commented 3 months ago

Doesn't look like this repo is seeing much help, which I guess is OK, it's only intended as a stop-gap and should go away over time. I only needed FaIcon and ModalDialog types from this package, so I've gone ahead and copied them into my repo and dropped gavant template types. Now I can have strict pnpm peers 👍