@forsakringskassan/commitlint-config 3.1.1 → 3.1.2

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.
Files changed (2) hide show
  1. package/dist/commitlint.js +52 -27
  2. package/package.json +1 -1
@@ -20945,7 +20945,7 @@ var require_typescript = __commonJS({
20945
20945
  });
20946
20946
  module2.exports = __toCommonJS(typescript_exports);
20947
20947
  var versionMajorMinor = "5.9";
20948
- var version = "5.9.2";
20948
+ var version = "5.9.3";
20949
20949
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
20950
20950
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
20951
20951
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -25601,10 +25601,10 @@ ${lanes.join("\n")}
25601
25601
  ] = "Latest";
25602
25602
  return ScriptTarget12;
25603
25603
  })(ScriptTarget || {});
25604
- var LanguageVariant = /* @__PURE__ */ ((LanguageVariant3) => {
25605
- LanguageVariant3[LanguageVariant3["Standard"] = 0] = "Standard";
25606
- LanguageVariant3[LanguageVariant3["JSX"] = 1] = "JSX";
25607
- return LanguageVariant3;
25604
+ var LanguageVariant = /* @__PURE__ */ ((LanguageVariant4) => {
25605
+ LanguageVariant4[LanguageVariant4["Standard"] = 0] = "Standard";
25606
+ LanguageVariant4[LanguageVariant4["JSX"] = 1] = "JSX";
25607
+ return LanguageVariant4;
25608
25608
  })(LanguageVariant || {});
25609
25609
  var WatchDirectoryFlags = /* @__PURE__ */ ((WatchDirectoryFlags3) => {
25610
25610
  WatchDirectoryFlags3[WatchDirectoryFlags3["None"] = 0] = "None";
@@ -43727,10 +43727,22 @@ ${lanes.join("\n")}
43727
43727
  }
43728
43728
  return parenthesizerRule;
43729
43729
  }
43730
+ function mixingBinaryOperatorsRequiresParentheses(a, b) {
43731
+ if (a === 61) {
43732
+ return b === 56 || b === 57;
43733
+ }
43734
+ if (b === 61) {
43735
+ return a === 56 || a === 57;
43736
+ }
43737
+ return false;
43738
+ }
43730
43739
  function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
43740
+ const emittedOperand = skipPartiallyEmittedExpressions(operand);
43741
+ if (isBinaryExpression(emittedOperand) && mixingBinaryOperatorsRequiresParentheses(binaryOperator, emittedOperand.operatorToken.kind)) {
43742
+ return true;
43743
+ }
43731
43744
  const binaryOperatorPrecedence = getOperatorPrecedence(227, binaryOperator);
43732
43745
  const binaryOperatorAssociativity = getOperatorAssociativity(227, binaryOperator);
43733
- const emittedOperand = skipPartiallyEmittedExpressions(operand);
43734
43746
  if (!isLeftSideOfBinary && operand.kind === 220 && binaryOperatorPrecedence > 3) {
43735
43747
  return true;
43736
43748
  }
@@ -80758,7 +80770,22 @@ ${lanes.join("\n")}
80758
80770
  function getPropertyNameNodeForSymbol(symbol, context) {
80759
80771
  const hashPrivateName = getClonedHashPrivateName(symbol);
80760
80772
  if (hashPrivateName) {
80761
- return hashPrivateName;
80773
+ const shouldEmitErroneousFieldName = !!context.tracker.reportPrivateInBaseOfClassExpression && context.flags & 2048;
80774
+ if (!shouldEmitErroneousFieldName) {
80775
+ return hashPrivateName;
80776
+ } else {
80777
+ let rawName2 = unescapeLeadingUnderscores(symbol.escapedName);
80778
+ rawName2 = rawName2.replace(/__#\d+@#/g, "__#private@#");
80779
+ return createPropertyNameNodeForIdentifierOrLiteral(
80780
+ rawName2,
80781
+ getEmitScriptTarget(compilerOptions),
80782
+ /*singleQuote*/
80783
+ false,
80784
+ /*stringNamed*/
80785
+ true,
80786
+ !!(symbol.flags & 8192)
80787
+ );
80788
+ }
80762
80789
  }
80763
80790
  const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed);
80764
80791
  const singleQuote = !!length(symbol.declarations) && every(symbol.declarations, isSingleQuotedStringNamed);
@@ -156856,10 +156883,9 @@ ${lanes.join("\n")}
156856
156883
  }
156857
156884
  const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
156858
156885
  commandLine.fileNames.forEach((fileName) => {
156859
- if (isDeclarationFileName(fileName)) return;
156860
156886
  const path14 = toPath32(fileName);
156861
156887
  let outputDts;
156862
- if (!fileExtensionIs(
156888
+ if (!isDeclarationFileName(fileName) && !fileExtensionIs(
156863
156889
  fileName,
156864
156890
  ".json"
156865
156891
  /* Json */
@@ -168524,7 +168550,7 @@ ${lanes.join("\n")}
168524
168550
  if (token && token.kind === 20 && token.parent.kind === 295) {
168525
168551
  return true;
168526
168552
  }
168527
- if (token.kind === 31 && token.parent.kind === 288) {
168553
+ if (token.kind === 30 && token.parent.kind === 288) {
168528
168554
  return true;
168529
168555
  }
168530
168556
  return false;
@@ -168552,7 +168578,7 @@ ${lanes.join("\n")}
168552
168578
  function isInsideJsxElement(sourceFile, position) {
168553
168579
  function isInsideJsxElementTraversal(node) {
168554
168580
  while (node) {
168555
- if (node.kind >= 286 && node.kind <= 295 || node.kind === 12 || node.kind === 30 || node.kind === 32 || node.kind === 80 || node.kind === 20 || node.kind === 19 || node.kind === 44 || node.kind === 31) {
168581
+ if (node.kind >= 286 && node.kind <= 295 || node.kind === 12 || node.kind === 30 || node.kind === 32 || node.kind === 80 || node.kind === 20 || node.kind === 19 || node.kind === 44) {
168556
168582
  node = node.parent;
168557
168583
  } else if (node.kind === 285) {
168558
168584
  if (position > node.getStart(sourceFile)) return true;
@@ -180608,9 +180634,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
180608
180634
  });
180609
180635
  return children;
180610
180636
  }
180611
- const languageVariant = (sourceFile == null ? void 0 : sourceFile.languageVariant) ?? 0;
180612
180637
  scanner.setText((sourceFile || node.getSourceFile()).text);
180613
- scanner.setLanguageVariant(languageVariant);
180614
180638
  let pos = node.pos;
180615
180639
  const processNode = (child) => {
180616
180640
  addSyntheticNodes(children, pos, child.pos, node);
@@ -180627,10 +180651,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
180627
180651
  node.forEachChild(processNode, processNodes);
180628
180652
  addSyntheticNodes(children, pos, node.end, node);
180629
180653
  scanner.setText(void 0);
180630
- scanner.setLanguageVariant(
180631
- 0
180632
- /* Standard */
180633
- );
180634
180654
  return children;
180635
180655
  }
180636
180656
  function addSyntheticNodes(nodes, pos, end, parent2) {
@@ -196749,7 +196769,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
196749
196769
  switch (node.kind) {
196750
196770
  case 288:
196751
196771
  return true;
196752
- case 31:
196772
+ case 44:
196753
196773
  case 32:
196754
196774
  case 80:
196755
196775
  case 212:
@@ -198148,7 +198168,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
198148
198168
  location = currentToken;
198149
198169
  }
198150
198170
  break;
198151
- case 31:
198171
+ case 44:
198152
198172
  if (currentToken.parent.kind === 286) {
198153
198173
  location = currentToken;
198154
198174
  }
@@ -198157,7 +198177,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
198157
198177
  }
198158
198178
  switch (parent2.kind) {
198159
198179
  case 288:
198160
- if (contextToken.kind === 31) {
198180
+ if (contextToken.kind === 44) {
198161
198181
  isStartingCloseTag = true;
198162
198182
  location = contextToken;
198163
198183
  }
@@ -199828,7 +199848,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
199828
199848
  case "<":
199829
199849
  return !!contextToken && contextToken.kind === 30 && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent));
199830
199850
  case "/":
199831
- return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 31 && isJsxClosingElement(contextToken.parent));
199851
+ return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) : contextToken.kind === 44 && isJsxClosingElement(contextToken.parent));
199832
199852
  case " ":
199833
199853
  return !!contextToken && isImportKeyword(contextToken) && contextToken.parent.kind === 308;
199834
199854
  default:
@@ -262296,7 +262316,7 @@ var require_git_raw_commits = __commonJS({
262296
262316
  });
262297
262317
 
262298
262318
  // node_modules/@commitlint/cli/lib/cli.js
262299
- import { createRequire as createRequire4 } from "node:module";
262319
+ import { createRequire as createRequire5 } from "node:module";
262300
262320
  import path13 from "node:path";
262301
262321
  import { fileURLToPath as fileURLToPath10, pathToFileURL as pathToFileURL4 } from "node:url";
262302
262322
  import util2 from "node:util";
@@ -263224,6 +263244,7 @@ function executable(config) {
263224
263244
  }
263225
263245
 
263226
263246
  // node_modules/@commitlint/resolve-extends/lib/index.js
263247
+ import { createRequire as createRequire2 } from "node:module";
263227
263248
  import fs3 from "node:fs";
263228
263249
  import path4 from "node:path";
263229
263250
  import { pathToFileURL as pathToFileURL2, fileURLToPath as fileURLToPath5 } from "node:url";
@@ -264565,6 +264586,10 @@ function moduleResolve(specifier, base, conditions2, preserveSymlinks) {
264565
264586
  var import_lodash6 = __toESM(require_lodash6(), 1);
264566
264587
  var import_resolve_from = __toESM(require_resolve_from(), 1);
264567
264588
  var dynamicImport = async (id) => {
264589
+ if (id.endsWith(".json")) {
264590
+ const require6 = createRequire2(import.meta.url);
264591
+ return require6(id);
264592
+ }
264568
264593
  const imported = await (path4.isAbsolute(id) ? import(pathToFileURL2(id).toString()) : import(id));
264569
264594
  return "default" in imported && imported.default || imported;
264570
264595
  };
@@ -264714,7 +264739,7 @@ import path5 from "node:path";
264714
264739
  // node_modules/jiti/lib/jiti.mjs
264715
264740
  var import_jiti = __toESM(require_jiti(), 1);
264716
264741
  var import_babel = __toESM(require_babel(), 1);
264717
- import { createRequire as createRequire2 } from "node:module";
264742
+ import { createRequire as createRequire3 } from "node:module";
264718
264743
  function onError(err) {
264719
264744
  throw err;
264720
264745
  }
@@ -264726,7 +264751,7 @@ function createJiti(id, opts = {}) {
264726
264751
  return (0, import_jiti.default)(id, opts, {
264727
264752
  onError,
264728
264753
  nativeImport,
264729
- createRequire: createRequire2
264754
+ createRequire: createRequire3
264730
264755
  });
264731
264756
  }
264732
264757
 
@@ -264874,7 +264899,7 @@ async function loadParserOpts(pendingParser) {
264874
264899
  }
264875
264900
 
264876
264901
  // node_modules/@commitlint/load/lib/utils/load-plugin.js
264877
- import { createRequire as createRequire3 } from "node:module";
264902
+ import { createRequire as createRequire4 } from "node:module";
264878
264903
  import path7 from "node:path";
264879
264904
  import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "node:url";
264880
264905
 
@@ -265437,7 +265462,7 @@ var MissingPluginError = class _MissingPluginError extends Error {
265437
265462
  };
265438
265463
 
265439
265464
  // node_modules/@commitlint/load/lib/utils/load-plugin.js
265440
- var require3 = createRequire3(import.meta.url);
265465
+ var require3 = createRequire4(import.meta.url);
265441
265466
  var __dirname2 = path7.resolve(fileURLToPath6(import.meta.url), "..");
265442
265467
  var dynamicImport2 = async (id) => {
265443
265468
  const imported = await (path7.isAbsolute(id) ? import(pathToFileURL3(id).toString()) : import(id));
@@ -271308,7 +271333,7 @@ var CliError = class _CliError extends Error {
271308
271333
  };
271309
271334
 
271310
271335
  // node_modules/@commitlint/cli/lib/cli.js
271311
- var require5 = createRequire4(import.meta.url);
271336
+ var require5 = createRequire5(import.meta.url);
271312
271337
  var __dirname4 = path13.resolve(fileURLToPath10(import.meta.url), "..");
271313
271338
  var dynamicImport3 = async (id) => {
271314
271339
  const imported = await (path13.isAbsolute(id) ? import(pathToFileURL4(id).toString()) : import(id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/commitlint-config",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "FK commitlint shareable config",
5
5
  "keywords": [
6
6
  "commitlint"