Skip to content

Commit

Permalink
fix new semver.Range(">=4<6")
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Sep 29, 2022
1 parent e869be1 commit ccd2cb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Change how your team works.
&nbsp;


# tea/cli 0.6.9
# tea/cli 0.6.10

tea is a universal virtual‑environment manager:

Expand Down
4 changes: 2 additions & 2 deletions src/utils/semver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class Range {
return '*'
} else {
return this.set.map(([v1, v2]) => {
if (v2.minor == 0 && v2.patch == 0) {
if (v2.major == v1.major + 1 && v2.minor == 0 && v2.patch == 0) {
const v = chomp(v1)
return `^${v}`
} else if (v2.major == Infinity) {
Expand All @@ -164,7 +164,7 @@ export class Range {
if (v) {
return `@${v}`
} else {
return `>=${v1}<${v2}`
return `>=${chomp(v1)}<${chomp(v2)}`
}
}
}).join(",")
Expand Down

0 comments on commit ccd2cb1

Please sign in to comment.