@thisismanta/semantic-version 11.2.0 → 11.2.1
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/src.js +8 -2
- package/package.json +1 -1
package/lib/src.js
CHANGED
|
@@ -470,8 +470,14 @@ function run(command) {
|
|
|
470
470
|
});
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
|
-
const packageJSON =
|
|
474
|
-
|
|
473
|
+
const packageJSON = (() => {
|
|
474
|
+
try {
|
|
475
|
+
return JSON.parse(node_fs.readFileSync("./package.json", { encoding: "utf-8" }));
|
|
476
|
+
} catch {
|
|
477
|
+
return {};
|
|
478
|
+
}
|
|
479
|
+
})();
|
|
480
|
+
const npm = "packageManager" in packageJSON && packageJSON.packageManager?.replace(/@.*$/, "") || "devEngines" in packageJSON && packageJSON.devEngines?.packageManager?.name || "npm";
|
|
475
481
|
const titlePattern = /^(?<type>\w+)(?<scope>\(.*?\))?(?<breaking>\!)?:(?<subject>.+)/;
|
|
476
482
|
const allowedTypes = [
|
|
477
483
|
"feat",
|