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

Ensure latest peerDependencies are checked #8

Merged
merged 1 commit into from
Oct 18, 2017

Conversation

Arcanemagus
Copy link
Owner

When checking peerDependencies if a package is found to have dependencies query npm for the current versions. If the latest version allowed by the current range is greater than the installed version query NPM for the peerDependencies list instead of using the local package.json. This ensures that newer allowed version's requirements are met.

There are two edge cases where this isn't correct:

  • A newer version is released that satisfies the current range and adds peerDependencies to a package that previously didn't have any.
    • This is unlikely to be hit in practice as that should generally require a bump out of most client dependency ranges of the package.
  • The locally installed package isn't up to date so NPM is queried, but NPM has a version that is outside the allowed range of the package.
    • NPM has no way of querying a specific version's peerDependencies so this can't be fixed unfortunately.

Fixes #7.

When checking `peerDependencies` if a package is found to have
dependencies query npm for the current versions. If the latest version
allowed by the current range is greater than the installed version query
NPM for the `peerDependencies` list instead of using the local
`package.json`. This ensures that newer allowed version's requirements
are met.

There are two edge cases where this isn't correct:
* A newer version is released that satisfies the current range and adds
`peerDependencies` to a package that previously didn't have any.
    * This is unlikely to be hit in practice as that should generally
require a bump out of most client dependency ranges of the package.
* The locally installed package isn't up to date so NPM is queried, but
NPM has a version that is outside the allowed range of the package.
    * NPM has no way of querying a specific version's `peerDependencies`
so this can't be fixed unfortunately.

Fixes #7
@Arcanemagus Arcanemagus self-assigned this Oct 18, 2017
@Arcanemagus Arcanemagus merged commit bf301be into master Oct 18, 2017
@Arcanemagus Arcanemagus deleted the check-latest-versions branch October 18, 2017 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check peerDeps for latest version
1 participant