@commitlint/is-ignored 19.8.0 → 19.8.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/defaults.d.ts +1 -1
- package/lib/defaults.d.ts.map +1 -1
- package/lib/defaults.js +4 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/is-ignored.d.ts +1 -1
- package/lib/is-ignored.d.ts.map +1 -1
- package/lib/is-ignored.js +5 -5
- package/lib/is-ignored.js.map +1 -1
- package/package.json +6 -6
package/lib/defaults.d.ts
CHANGED
package/lib/defaults.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAe5C,eAAO,MAAM,SAAS,EAAE,OAAO,EAa9B,CAAC"}
|
package/lib/defaults.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import semver from
|
|
1
|
+
import semver from "semver";
|
|
2
2
|
const isSemver = (c) => {
|
|
3
|
-
const firstLine = c.split(
|
|
4
|
-
if (typeof firstLine !==
|
|
3
|
+
const firstLine = c.split("\n").shift();
|
|
4
|
+
if (typeof firstLine !== "string") {
|
|
5
5
|
return false;
|
|
6
6
|
}
|
|
7
|
-
const stripped = firstLine.replace(/^chore(\([^)]+\))?:/,
|
|
7
|
+
const stripped = firstLine.replace(/^chore(\([^)]+\))?:/, "").trim();
|
|
8
8
|
return semver.valid(stripped) !== null;
|
|
9
9
|
};
|
|
10
10
|
const test = (r) => r.test.bind(r);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default } from
|
|
1
|
+
export * from "./is-ignored.js";
|
|
2
|
+
export { default } from "./is-ignored.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export { default } from
|
|
1
|
+
export * from "./is-ignored.js";
|
|
2
|
+
export { default } from "./is-ignored.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
|
package/lib/is-ignored.d.ts
CHANGED
package/lib/is-ignored.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-ignored.d.ts","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"is-ignored.d.ts","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,CAAC,OAAO,UAAU,SAAS,CAChC,MAAM,GAAE,MAAW,EACnB,IAAI,GAAE,gBAAqB,GACzB,OAAO,CAqBT"}
|
package/lib/is-ignored.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { wildcards } from
|
|
2
|
-
export default function isIgnored(commit =
|
|
3
|
-
const ignores = typeof opts.ignores ===
|
|
1
|
+
import { wildcards } from "./defaults.js";
|
|
2
|
+
export default function isIgnored(commit = "", opts = {}) {
|
|
3
|
+
const ignores = typeof opts.ignores === "undefined" ? [] : opts.ignores;
|
|
4
4
|
if (!Array.isArray(ignores)) {
|
|
5
5
|
throw new Error(`ignores must be of type array, received ${ignores} of type ${typeof ignores}`);
|
|
6
6
|
}
|
|
7
|
-
const invalids = ignores.filter((c) => typeof c !==
|
|
7
|
+
const invalids = ignores.filter((c) => typeof c !== "function");
|
|
8
8
|
if (invalids.length > 0) {
|
|
9
9
|
throw new Error(`ignores must be array of type function, received items of type: ${invalids
|
|
10
10
|
.map((i) => typeof i)
|
|
11
|
-
.join(
|
|
11
|
+
.join(", ")}`);
|
|
12
12
|
}
|
|
13
13
|
const base = opts.defaults === false ? [] : wildcards;
|
|
14
14
|
return [...base, ...ignores].some((w) => w(commit));
|
package/lib/is-ignored.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-ignored.js","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"is-ignored.js","sourceRoot":"","sources":["../src/is-ignored.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,CAAC,OAAO,UAAU,SAAS,CAChC,SAAiB,EAAE,EACnB,OAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;IAExE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACd,2CAA2C,OAAO,YAAY,OAAO,OAAO,EAAE,CAC9E,CAAC;IACH,CAAC;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;IAEhE,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACd,mEAAmE,QAAQ;aACzE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;aACpB,IAAI,CAAC,IAAI,CAAC,EAAE,CACd,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commitlint/is-ignored",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "19.8.
|
|
4
|
+
"version": "19.8.1",
|
|
5
5
|
"description": "Lint your commit messages",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@commitlint/parse": "^19.8.
|
|
40
|
-
"@commitlint/test": "^19.8.
|
|
41
|
-
"@commitlint/utils": "^19.8.
|
|
39
|
+
"@commitlint/parse": "^19.8.1",
|
|
40
|
+
"@commitlint/test": "^19.8.1",
|
|
41
|
+
"@commitlint/utils": "^19.8.1",
|
|
42
42
|
"@types/semver": "^7.5.7"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@commitlint/types": "^19.8.
|
|
45
|
+
"@commitlint/types": "^19.8.1",
|
|
46
46
|
"semver": "^7.6.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3c302008cabeb0b08cd246b2417a51a9d745a918"
|
|
49
49
|
}
|