@forsakringskassan/commitlint-config 3.2.1 → 3.3.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.
@@ -14690,6 +14690,18 @@ var require_loader = __commonJS({
14690
14690
  (c - 65536 & 1023) + 56320
14691
14691
  );
14692
14692
  }
14693
+ function setProperty(object, key, value2) {
14694
+ if (key === "__proto__") {
14695
+ Object.defineProperty(object, key, {
14696
+ configurable: true,
14697
+ enumerable: true,
14698
+ writable: true,
14699
+ value: value2
14700
+ });
14701
+ } else {
14702
+ object[key] = value2;
14703
+ }
14704
+ }
14693
14705
  var simpleEscapeCheck = new Array(256);
14694
14706
  var simpleEscapeMap = new Array(256);
14695
14707
  for (i = 0; i < 256; i++) {
@@ -14809,7 +14821,7 @@ var require_loader = __commonJS({
14809
14821
  for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
14810
14822
  key = sourceKeys[index];
14811
14823
  if (!_hasOwnProperty.call(destination, key)) {
14812
- destination[key] = source[key];
14824
+ setProperty(destination, key, source[key]);
14813
14825
  overridableKeys[key] = true;
14814
14826
  }
14815
14827
  }
@@ -14849,16 +14861,7 @@ var require_loader = __commonJS({
14849
14861
  state.position = startPos || state.position;
14850
14862
  throwError(state, "duplicated mapping key");
14851
14863
  }
14852
- if (keyNode === "__proto__") {
14853
- Object.defineProperty(_result, keyNode, {
14854
- configurable: true,
14855
- enumerable: true,
14856
- writable: true,
14857
- value: valueNode
14858
- });
14859
- } else {
14860
- _result[keyNode] = valueNode;
14861
- }
14864
+ setProperty(_result, keyNode, valueNode);
14862
14865
  delete overridableKeys[keyNode];
14863
14866
  }
14864
14867
  return _result;
package/dist/install.js CHANGED
@@ -1107,8 +1107,11 @@ var parseClass = (glob2, position) => {
1107
1107
  };
1108
1108
 
1109
1109
  // node_modules/glob/node_modules/minimatch/dist/esm/unescape.js
1110
- var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
1111
- return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1110
+ var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
1111
+ if (magicalBraces) {
1112
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
1113
+ }
1114
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
1112
1115
  };
1113
1116
 
1114
1117
  // node_modules/glob/node_modules/minimatch/dist/esm/ast.js
@@ -1462,7 +1465,7 @@ var AST = class _AST {
1462
1465
  if (this.#root === this)
1463
1466
  this.#fillNegs();
1464
1467
  if (!this.type) {
1465
- const noEmpty = this.isStart() && this.isEnd();
1468
+ const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
1466
1469
  const src = this.#parts.map((p) => {
1467
1470
  const [re, _, hasMagic2, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
1468
1471
  this.#hasMagic = this.#hasMagic || hasMagic2;
@@ -1572,10 +1575,7 @@ var AST = class _AST {
1572
1575
  }
1573
1576
  }
1574
1577
  if (c === "*") {
1575
- if (noEmpty && glob2 === "*")
1576
- re += starNoEmpty;
1577
- else
1578
- re += star;
1578
+ re += noEmpty && glob2 === "*" ? starNoEmpty : star;
1579
1579
  hasMagic2 = true;
1580
1580
  continue;
1581
1581
  }
@@ -1591,7 +1591,10 @@ var AST = class _AST {
1591
1591
  };
1592
1592
 
1593
1593
  // node_modules/glob/node_modules/minimatch/dist/esm/escape.js
1594
- var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1594
+ var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
1595
+ if (magicalBraces) {
1596
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
1597
+ }
1595
1598
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1596
1599
  };
1597
1600
 
@@ -2232,16 +2235,27 @@ var Minimatch = class {
2232
2235
  pp[i] = twoStar;
2233
2236
  }
2234
2237
  } else if (next === void 0) {
2235
- pp[i - 1] = prev + "(?:\\/|" + twoStar + ")?";
2238
+ pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
2236
2239
  } else if (next !== GLOBSTAR) {
2237
2240
  pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
2238
2241
  pp[i + 1] = GLOBSTAR;
2239
2242
  }
2240
2243
  });
2241
- return pp.filter((p) => p !== GLOBSTAR).join("/");
2244
+ const filtered = pp.filter((p) => p !== GLOBSTAR);
2245
+ if (this.partial && filtered.length >= 1) {
2246
+ const prefixes = [];
2247
+ for (let i = 1; i <= filtered.length; i++) {
2248
+ prefixes.push(filtered.slice(0, i).join("/"));
2249
+ }
2250
+ return "(?:" + prefixes.join("|") + ")";
2251
+ }
2252
+ return filtered.join("/");
2242
2253
  }).join("|");
2243
2254
  const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
2244
2255
  re = "^" + open + re + close + "$";
2256
+ if (this.partial) {
2257
+ re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
2258
+ }
2245
2259
  if (this.negate)
2246
2260
  re = "^(?!" + re + ").+$";
2247
2261
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/commitlint-config",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "FK commitlint shareable config",
5
5
  "keywords": [
6
6
  "commitlint"