Avoid using SemVer instances
Use strings instead. They are easier to serialize and deserialize.
This commit is contained in:
parent
9b5753ab00
commit
06687e95c8
10 changed files with 26 additions and 26 deletions
2
lib/config-utils.js
generated
2
lib/config-utils.js
generated
|
|
@ -592,7 +592,7 @@ function toPackWithVersion(packStr, configFile) {
|
|||
throw new Error(getPacksStrInvalid(packStr, configFile));
|
||||
}
|
||||
else if (nameWithVersion.length === 2) {
|
||||
version = semver.parse(nameWithVersion[1]) || undefined;
|
||||
version = semver.clean(nameWithVersion[1]) || undefined;
|
||||
if (!version) {
|
||||
throw new Error(getPacksStrInvalid(packStr, configFile));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue