Skip to content

Commit

Permalink
Use tilde range dependencies for stable releases
Browse files Browse the repository at this point in the history
  • Loading branch information
CPatchane committed Apr 12, 2021
1 parent 6f497e6 commit db435f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ async function prepare() {
})

// Replace "link:" versions with (A) exact versions for canary and beta releases,
// or with (B) caret ranges for actual releases.
// or with (B) tilde ranges for actual releases (allow to get patches automatically).
const exactRE = /-(rc|canary|beta)\./
const deps = pkg.dependencies
if (deps) {
Expand All @@ -197,7 +197,7 @@ async function prepare() {
const dep = packages[depId]
if (dep) {
const { version } = packages[depId]
deps[depId] = (exactRE.test(version) ? '' : '^') + version
deps[depId] = (exactRE.test(version) ? '' : '~') + version
if (localId !== depId) {
delete deps[localId]
}
Expand Down

0 comments on commit db435f5

Please sign in to comment.