Skip to content

Commit

Permalink
npm version field gets its value from semver coerce method to fix cal…
Browse files Browse the repository at this point in the history
…ver incompatability.
  • Loading branch information
muratgozel committed Aug 2, 2022
1 parent e021bd8 commit 2a0a67b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
13 changes: 1 addition & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
{
"name": "node-releaser",
"version": {
"options": {},
"loose": false,
"includePrerelease": false,
"raw": "0.7.5",
"major": 0,
"minor": 7,
"patch": 5,
"prerelease": [],
"build": [],
"version": "0.7.5"
},
"version": "0.7.6",
"description": "Automated versioning and package publishing tool. Supports semver and calver. Extendible with plugins.",
"main": "src/index.js",
"bin": {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function npm() {
}

async function beforePush(nextTag) {
console.log(semver.coerce(nextTag));
updatePkgJson('version', semver.coerce(nextTag))
console.log(semver.valid(semver.coerce(nextTag)));
updatePkgJson('version', semver.valid(semver.coerce(nextTag)))
}

async function afterPush() {
Expand Down

0 comments on commit 2a0a67b

Please sign in to comment.