From 2a0a67b2d2369986f511410151ce94ad381777e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Murat=20Go=CC=88zel?= Date: Tue, 2 Aug 2022 16:15:49 +0300 Subject: [PATCH] npm version field gets its value from semver coerce method to fix calver incompatability. --- package.json | 13 +------------ src/plugins/npm.js | 4 ++-- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 4104194..f7dfc3a 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/plugins/npm.js b/src/plugins/npm.js index 7c590e5..dda9778 100644 --- a/src/plugins/npm.js +++ b/src/plugins/npm.js @@ -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() {