Skip to content

Commit ae2cdd5

Browse files
committed
fix(spec/npm): port #116 - add '~>' alias
Add `~>` as an alias for `~` Credit to `@gnattishness`, author of [`python-semanticversion #116`]. [`python-semanticversion #116`]: rbarrois/python-semanticversion#116
1 parent b60406f commit ae2cdd5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

spec/internal/npm.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ _OP = dict(
226226
)
227227
OP = struct(**_OP)
228228

229-
OP_ALIASES = {"": "="}
229+
OP_ALIASES = {"": "=", "~>": "~"}
230230

231231
npmparser = struct(
232232
new = _npm_parser_new,

tests/spec/spec_npm.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def _expand_impl(ctx):
9898
("~0.2", ">=0.2.0 <0.3.0"),
9999
("~0", ">=0.0.0 <1.0.0"),
100100
("~1.2.3-beta.2", ">=1.2.3-beta.2 <1.3.0"),
101+
("~>1.2.3", ">=1.2.3 <1.3.0"),
101102

102103
# Caret ranges
103104
("^1.2.3", ">=1.2.3 <2.0.0"),

0 commit comments

Comments
 (0)