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

Implement validatePeerDependencies logic. #1

Merged
merged 6 commits into from
Oct 20, 2020
Merged

Conversation

rwjblue
Copy link
Owner

@rwjblue rwjblue commented Oct 20, 2020

  • Add fixturify-project to devDeps.
  • Add semver / resolve-package-path.
  • Initial implementation of the core logic.

@rwjblue rwjblue marked this pull request as ready for review October 20, 2020 13:51
@rwjblue rwjblue changed the title Implement validatePeerDependencies logic. Implement validatePeerDependencies logic. Oct 20, 2020
Based on https://github.com/npm/node-semver#prerelease-tags:

> If a version has a prerelease tag (for example, 1.2.3-alpha.3) then it
> will only be allowed to satisfy comparator sets if at least one
> comparator with the same [major, minor, patch] tuple also has a
> prerelease tag.

That means that if a project that uses `validatePeerDependencies`
has a peer depenency of `ember-source: ^3.0.0` and we found
`3.2.0-beta.1` `semver.satisifies` will _by default_
return `false`.

For this libraries purpose however, we need to ensure that is allowed.
Mostly because the "end user" (the host project, or the package that
included the package that uses `validatePeerDependencies`) has
explicitly asked for a prerelease version.
@rwjblue rwjblue added the enhancement New feature or request label Oct 20, 2020
@rwjblue rwjblue merged commit 08f8506 into main Oct 20, 2020
@rwjblue rwjblue deleted the initial-implementation branch October 20, 2020 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants