@thisismanta/semantic-version 11.3.0 → 11.4.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.
package/lib/index.d.ts CHANGED
@@ -15,7 +15,7 @@ interface GitCommit {
15
15
  subject: string;
16
16
  }
17
17
  export declare function getReleaseType(commits: Array<GitCommit>): string | null;
18
- export declare function getCurrentPackageVersion(): Promise<string>;
18
+ export declare function getCurrentPackageVersion(): Promise<any>;
19
19
  export declare function getGitHistory(version: string): Promise<Array<GitCommit>>;
20
20
  export declare function getReleaseNote(commits: Array<GitCommit>): string;
21
21
  export {};
package/lib/src.js CHANGED
@@ -510,8 +510,7 @@ 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
+ if ((0, import_valid.default)(packageJSON.version)) return packageJSON.version;
515
514
  else throw new Error("Expected a valid version field in package.json.");
516
515
  }
517
516
  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.4.0",
4
4
  "license": "ISC",
5
5
  "author": "Anantachai Saothong <thisismanta@gmail.com>",
6
6
  "repository": {