Skip to content

Commit

Permalink
fix(node): correctly detect >=, <= over >, < when replacing version r…
Browse files Browse the repository at this point in the history
…anges (#2171)
  • Loading branch information
tada5hi authored Dec 18, 2023
1 parent 9b745d5 commit 47fe582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __snapshots__/package-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports['PackageJson updateContent updates dependency versions 1'] = `
\t\t"foo": "~0.1.0"
\t},
\t"peerDependencies": {
\t\t"bar": ">2.3.4"
\t\t"bar": ">=2.3.4"
\t},
\t"files": [
\t\t"lib",
Expand Down
4 changes: 2 additions & 2 deletions src/updaters/node/package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export class PackageJson extends DefaultUpdater {
enum SUPPORTED_RANGE_PREFIXES {
CARET = '^',
TILDE = '~',
GREATER_THAN = '>',
LESS_THAN = '<',
EQUAL_OR_GREATER_THAN = '>=',
EQUAL_OR_LESS_THAN = '<=',
GREATER_THAN = '>',
LESS_THAN = '<',
}
function detectRangePrefix(version: string): string {
return (
Expand Down

0 comments on commit 47fe582

Please sign in to comment.