Skip to content

Commit

Permalink
fix: allow prereleases for * (#76)
Browse files Browse the repository at this point in the history
---

By submitting this pull request, I confirm that my contribution is made
under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
rix0rrr authored Apr 25, 2023
1 parent 50b1fac commit 90cf878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/snippet-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function resolveConflict(
fs.readFileSync(path.join(a.resolvedDirectory, 'package.json'), 'utf-8'),
).version;

if (!semver.satisfies(concreteVersion, b.versionRange)) {
if (!semver.satisfies(concreteVersion, b.versionRange, { includePrerelease: true })) {
throw new Error(
`Dependency conflict: ${name} expected to match ${b.versionRange} but found ${concreteVersion} at ${a.resolvedDirectory}`,
);
Expand Down

0 comments on commit 90cf878

Please sign in to comment.