@thisismanta/semantic-version 11.3.0 → 11.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/src.js +2 -2
  2. package/package.json +1 -1
package/lib/src.js CHANGED
@@ -510,8 +510,8 @@ function getReleaseType(commits) {
510
510
  return null;
511
511
  }
512
512
  async function getCurrentPackageVersion() {
513
- const version = JSON.parse(await run(`${npm} pkg get version`));
514
- if (typeof version === "string" && (0, import_valid.default)(version)) return version;
513
+ const version = (await run(`${npm} pkg get version`)).trim().replace(/^"/, "").replace(/"$/, "");
514
+ if ((0, import_valid.default)(version)) return version;
515
515
  else throw new Error("Expected a valid version field in package.json.");
516
516
  }
517
517
  async function getGitHistory(version) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisismanta/semantic-version",
3
- "version": "11.3.0",
3
+ "version": "11.5.0",
4
4
  "license": "ISC",
5
5
  "author": "Anantachai Saothong <thisismanta@gmail.com>",
6
6
  "repository": {