-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
- I'd be willing to implement this feature (contributing guide)
Description
All current semver range functions are being called without the "includePrerelease" flag indicating the default behavior of ignoring prerelease versions when considering valid ranges.
This causes some issues when using lerna to version using prerelease tags and then utilizing non definitive versions in package.json dependencies
Given a package versioned as 1.0.0-develop.0 if another package defines a dependency in said package by using something like: * or ^1.0.0, said package will not be considered as a match in code detecting dependencies (such as createProjectGraphWithPackages), since running
semver.satisfies("1.0.0-develop.0", "*") === false
semver.satisfies("1.0.0-develop.0", "^1.0.0") === false
semver.satisfies("1.0.0-develop.0", "*", { includePrerelease: true }) === true
semver.satisfies("1.0.0-develop.0", "^1.0.0", { includePrerelease: true }) === true
This means that running
lerna run some-script --scope package-a --includes-dependencies
Will not run the script for dependencies
Suggested Implementation
I would imagine adding a settings in lerna.json per command (or globally if it fits) to allow enabling the "includePrerelease" behavior for semver functions