christopherthielen / check-peer-dependencies

Checks peer dependencies of the current NodeJS package. Offers solutions for any that are unmet.
MIT License
60 stars 19 forks source link

fix: Method for determining the installed version fails #27 #39

Closed regevbr closed 1 year ago

regevbr commented 1 year ago

fix #27 @christopherthielen can you please CR? This is a super small fix

The fix handles cases where main references a dir that has an additional incomplete nested package.json without a version set to it.

For example: https://unpkg.com/browse/i18next-http-backend@2.1.1/cjs/package.json

christopherthielen commented 1 year ago

Thanks for the PR! Can you provide a scenario where the current code fails (using i18next-http-backend@2.1.1 for example)? I tried adding as a direct dependency and a peer dependency. In both cases, check-peer-dependencies seems to have processed it without any problems.

For example, can you provide instructions to reproduce, such as:

mkdir temp
cd temp
npm init -y 
npm add i18next-http-backend@2.1.1 
npx check-peer-dependencies # Reproduces error
regevbr commented 1 year ago

Thanks for the PR! Can you provide a scenario where the current code fails (using i18next-http-backend@2.1.1 for example)? I tried adding as a direct dependency and a peer dependency. In both cases, check-peer-dependencies seems to have processed it without any problems.

For example, can you provide instructions to reproduce, such as:

mkdir temp
cd temp
npm init -y 
npm add i18next-http-backend@2.1.1 
npx check-peer-dependencies # Reproduces error

Gladly! Please see instructions in issue #27

christopherthielen commented 1 year ago

oh, gotcha, thanks!