@polygontech/commit-template 1.0.0 → 1.0.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/CZRC.js CHANGED
@@ -39,6 +39,7 @@ CZRC.prototype.overwrite = function (overwrite) {
39
39
  CZRC.prototype.pushExtraImperativeVerbs = function (extraImperativeVerbs) {
40
40
  if (!Array.isArray(extraImperativeVerbs)) return;
41
41
  if (extraImperativeVerbs.length == 0) return;
42
+ extraImperativeVerbs = extraImperativeVerbs.map((v) => v.toLowerCase());
42
43
  this.extraImperativeVerbs = [...this.extraImperativeVerbs, ...extraImperativeVerbs];
43
44
  };
44
45
 
package/CZRCLoader.js CHANGED
@@ -104,10 +104,9 @@ async function ensureFile(file_fqn, file_url) {
104
104
 
105
105
  function getUrlFromFile(urlFile) {
106
106
  return read(urlFile)
107
- .split(/(?:\r\n|\r|\n)/g)
108
- .reduce((prev, cur) => {
109
- if (cur.startsWith("URL=")) return cur.replace("URL=", "");
110
- });
107
+ .trim()
108
+ .split(/(?:\r\n|\r|\n)/g)[1]
109
+ .replace("URL=", "");
111
110
  }
112
111
 
113
112
  function getProjectRCDownloadFileFQN() {
package/dto/message.js CHANGED
@@ -101,7 +101,7 @@ function validateSubject(subject) {
101
101
  }
102
102
 
103
103
  function isImperative(sentence) {
104
- let first_word = sentence.split(" ")[0];
104
+ let first_word = sentence.split(" ")[0].toLowerCase();
105
105
  let imperative = nlp(first_word).verbs().isImperative().text();
106
106
  if (first_word == imperative) return true;
107
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygontech/commit-template",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "JS wrapper of https://github.com/ShafiqIslam/dotfiles/blob/master/git/.gitmessage.",
5
5
  "homepage": "https://github.com/ShafiqIslam/commit-template",
6
6
  "main": "index.js",