@forsakringskassan/commitlint-config 1.4.0 → 1.4.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.
- package/dist/commitlint.js +50 -28
- package/dist/format.js +2 -2
- package/package.json +1 -1
package/dist/commitlint.js
CHANGED
|
@@ -98,6 +98,7 @@ var require_re = __commonJS({
|
|
|
98
98
|
var re = exports.re = [];
|
|
99
99
|
var safeRe = exports.safeRe = [];
|
|
100
100
|
var src = exports.src = [];
|
|
101
|
+
var safeSrc = exports.safeSrc = [];
|
|
101
102
|
var t = exports.t = {};
|
|
102
103
|
var R2 = 0;
|
|
103
104
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -118,6 +119,7 @@ var require_re = __commonJS({
|
|
|
118
119
|
debug(name, index, value2);
|
|
119
120
|
t[name] = index;
|
|
120
121
|
src[index] = value2;
|
|
122
|
+
safeSrc[index] = safe;
|
|
121
123
|
re[index] = new RegExp(value2, isGlobal ? "g" : void 0);
|
|
122
124
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
123
125
|
};
|
|
@@ -214,7 +216,7 @@ var require_semver = __commonJS({
|
|
|
214
216
|
"node_modules/semver/classes/semver.js"(exports, module) {
|
|
215
217
|
var debug = require_debug();
|
|
216
218
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
|
|
217
|
-
var { safeRe: re, t } = require_re();
|
|
219
|
+
var { safeRe: re, safeSrc: src, t } = require_re();
|
|
218
220
|
var parseOptions = require_parse_options();
|
|
219
221
|
var { compareIdentifiers } = require_identifiers();
|
|
220
222
|
var SemVer = class _SemVer {
|
|
@@ -354,6 +356,18 @@ var require_semver = __commonJS({
|
|
|
354
356
|
// preminor will bump the version up to the next minor release, and immediately
|
|
355
357
|
// down to pre-release. premajor and prepatch work the same way.
|
|
356
358
|
inc(release, identifier, identifierBase) {
|
|
359
|
+
if (release.startsWith("pre")) {
|
|
360
|
+
if (!identifier && identifierBase === false) {
|
|
361
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
362
|
+
}
|
|
363
|
+
if (identifier) {
|
|
364
|
+
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
|
|
365
|
+
const match2 = `-${identifier}`.match(r);
|
|
366
|
+
if (!match2 || match2[1] !== identifier) {
|
|
367
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
357
371
|
switch (release) {
|
|
358
372
|
case "premajor":
|
|
359
373
|
this.prerelease.length = 0;
|
|
@@ -381,6 +395,12 @@ var require_semver = __commonJS({
|
|
|
381
395
|
}
|
|
382
396
|
this.inc("pre", identifier, identifierBase);
|
|
383
397
|
break;
|
|
398
|
+
case "release":
|
|
399
|
+
if (this.prerelease.length === 0) {
|
|
400
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
401
|
+
}
|
|
402
|
+
this.prerelease.length = 0;
|
|
403
|
+
break;
|
|
384
404
|
case "major":
|
|
385
405
|
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
386
406
|
this.major++;
|
|
@@ -406,9 +426,6 @@ var require_semver = __commonJS({
|
|
|
406
426
|
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
407
427
|
case "pre": {
|
|
408
428
|
const base = Number(identifierBase) ? 1 : 0;
|
|
409
|
-
if (!identifier && identifierBase === false) {
|
|
410
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
411
|
-
}
|
|
412
429
|
if (this.prerelease.length === 0) {
|
|
413
430
|
this.prerelease = [base];
|
|
414
431
|
} else {
|
|
@@ -543,13 +560,12 @@ var require_diff = __commonJS({
|
|
|
543
560
|
if (!lowVersion.patch && !lowVersion.minor) {
|
|
544
561
|
return "major";
|
|
545
562
|
}
|
|
546
|
-
if (highVersion
|
|
563
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
564
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
565
|
+
return "minor";
|
|
566
|
+
}
|
|
547
567
|
return "patch";
|
|
548
568
|
}
|
|
549
|
-
if (highVersion.minor) {
|
|
550
|
-
return "minor";
|
|
551
|
-
}
|
|
552
|
-
return "major";
|
|
553
569
|
}
|
|
554
570
|
const prefix2 = highHasPre ? "pre" : "";
|
|
555
571
|
if (v1.major !== v2.major) {
|
|
@@ -256355,13 +256371,13 @@ var require_git_raw_commits = __commonJS({
|
|
|
256355
256371
|
});
|
|
256356
256372
|
|
|
256357
256373
|
// node_modules/@commitlint/cli/lib/cli.js
|
|
256358
|
-
import { createRequire as createRequire4 } from "module";
|
|
256359
|
-
import path13 from "path";
|
|
256360
|
-
import { fileURLToPath as fileURLToPath10, pathToFileURL as pathToFileURL4 } from "url";
|
|
256361
|
-
import util2 from "util";
|
|
256374
|
+
import { createRequire as createRequire4 } from "node:module";
|
|
256375
|
+
import path13 from "node:path";
|
|
256376
|
+
import { fileURLToPath as fileURLToPath10, pathToFileURL as pathToFileURL4 } from "node:url";
|
|
256377
|
+
import util2 from "node:util";
|
|
256362
256378
|
|
|
256363
256379
|
// node_modules/@commitlint/lint/lib/lint.js
|
|
256364
|
-
import util from "util";
|
|
256380
|
+
import util from "node:util";
|
|
256365
256381
|
|
|
256366
256382
|
// node_modules/@commitlint/is-ignored/lib/defaults.js
|
|
256367
256383
|
var import_semver = __toESM(require_semver2(), 1);
|
|
@@ -256951,7 +256967,7 @@ var subjectExclamationMark = (parsed, when = "always") => {
|
|
|
256951
256967
|
};
|
|
256952
256968
|
|
|
256953
256969
|
// node_modules/@commitlint/rules/lib/trailer-exists.js
|
|
256954
|
-
import { spawnSync } from "child_process";
|
|
256970
|
+
import { spawnSync } from "node:child_process";
|
|
256955
256971
|
var trailerExists = (parsed, when = "always", value2 = "") => {
|
|
256956
256972
|
const trailers = spawnSync("git", ["interpret-trailers", "--parse"], {
|
|
256957
256973
|
input: parsed.raw || ""
|
|
@@ -257208,11 +257224,11 @@ async function lint(message2, rawRulesConfig, rawOpts) {
|
|
|
257208
257224
|
}
|
|
257209
257225
|
|
|
257210
257226
|
// node_modules/@commitlint/load/lib/load.js
|
|
257211
|
-
import path8 from "path";
|
|
257227
|
+
import path8 from "node:path";
|
|
257212
257228
|
|
|
257213
257229
|
// node_modules/@commitlint/config-validator/lib/validate.js
|
|
257214
257230
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
257215
|
-
import { createRequire } from "module";
|
|
257231
|
+
import { createRequire } from "node:module";
|
|
257216
257232
|
|
|
257217
257233
|
// node_modules/@commitlint/config-validator/lib/formatErrors.js
|
|
257218
257234
|
function formatErrors(errors) {
|
|
@@ -257289,9 +257305,9 @@ function executable(config) {
|
|
|
257289
257305
|
}
|
|
257290
257306
|
|
|
257291
257307
|
// node_modules/@commitlint/resolve-extends/lib/index.js
|
|
257292
|
-
import fs3 from "fs";
|
|
257293
|
-
import path4 from "path";
|
|
257294
|
-
import { pathToFileURL as pathToFileURL2, fileURLToPath as fileURLToPath5 } from "url";
|
|
257308
|
+
import fs3 from "node:fs";
|
|
257309
|
+
import path4 from "node:path";
|
|
257310
|
+
import { pathToFileURL as pathToFileURL2, fileURLToPath as fileURLToPath5 } from "node:url";
|
|
257295
257311
|
|
|
257296
257312
|
// node_modules/global-directory/index.js
|
|
257297
257313
|
var import_ini = __toESM(require_ini(), 1);
|
|
@@ -258773,8 +258789,8 @@ var import_lodash9 = __toESM(require_lodash9(), 1);
|
|
|
258773
258789
|
|
|
258774
258790
|
// node_modules/@commitlint/load/lib/utils/load-config.js
|
|
258775
258791
|
var import_cosmiconfig = __toESM(require_dist2(), 1);
|
|
258776
|
-
import { existsSync, readFileSync } from "fs";
|
|
258777
|
-
import path5 from "path";
|
|
258792
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
258793
|
+
import path5 from "node:path";
|
|
258778
258794
|
|
|
258779
258795
|
// node_modules/jiti/lib/jiti.mjs
|
|
258780
258796
|
var import_jiti = __toESM(require_jiti(), 1);
|
|
@@ -258939,9 +258955,9 @@ async function loadParserOpts(pendingParser) {
|
|
|
258939
258955
|
}
|
|
258940
258956
|
|
|
258941
258957
|
// node_modules/@commitlint/load/lib/utils/load-plugin.js
|
|
258942
|
-
import { createRequire as createRequire3 } from "module";
|
|
258943
|
-
import path7 from "path";
|
|
258944
|
-
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "url";
|
|
258958
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
258959
|
+
import path7 from "node:path";
|
|
258960
|
+
import { fileURLToPath as fileURLToPath6, pathToFileURL as pathToFileURL3 } from "node:url";
|
|
258945
258961
|
|
|
258946
258962
|
// node_modules/@commitlint/load/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
258947
258963
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -259433,7 +259449,7 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
|
259433
259449
|
var source_default = chalk;
|
|
259434
259450
|
|
|
259435
259451
|
// node_modules/@commitlint/load/lib/utils/plugin-naming.js
|
|
259436
|
-
import path6 from "path";
|
|
259452
|
+
import path6 from "node:path";
|
|
259437
259453
|
var prefix = "commitlint-plugin";
|
|
259438
259454
|
function convertPathToPosix(filepath) {
|
|
259439
259455
|
const normalizedFilepath = path6.normalize(filepath);
|
|
@@ -259631,7 +259647,7 @@ async function getHistoryCommits(options, opts = {}) {
|
|
|
259631
259647
|
}
|
|
259632
259648
|
|
|
259633
259649
|
// node_modules/@commitlint/top-level/lib/index.js
|
|
259634
|
-
import path11 from "path";
|
|
259650
|
+
import path11 from "node:path";
|
|
259635
259651
|
|
|
259636
259652
|
// node_modules/@commitlint/top-level/node_modules/find-up/index.js
|
|
259637
259653
|
import path10 from "node:path";
|
|
@@ -259698,6 +259714,12 @@ var Queue = class {
|
|
|
259698
259714
|
current = current.next;
|
|
259699
259715
|
}
|
|
259700
259716
|
}
|
|
259717
|
+
*drain() {
|
|
259718
|
+
let current;
|
|
259719
|
+
while ((current = this.dequeue()) !== void 0) {
|
|
259720
|
+
yield current;
|
|
259721
|
+
}
|
|
259722
|
+
}
|
|
259701
259723
|
};
|
|
259702
259724
|
|
|
259703
259725
|
// node_modules/@commitlint/top-level/node_modules/p-limit/index.js
|
|
@@ -259880,7 +259902,7 @@ async function searchDotGit(cwd) {
|
|
|
259880
259902
|
import fs6 from "fs/promises";
|
|
259881
259903
|
|
|
259882
259904
|
// node_modules/@commitlint/read/lib/get-edit-file-path.js
|
|
259883
|
-
import path12 from "path";
|
|
259905
|
+
import path12 from "node:path";
|
|
259884
259906
|
import fs5 from "fs/promises";
|
|
259885
259907
|
async function getEditFilePath(top2, edit) {
|
|
259886
259908
|
if (typeof edit === "string") {
|
package/dist/format.js
CHANGED
|
@@ -267,10 +267,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
|
267
267
|
return 1;
|
|
268
268
|
}
|
|
269
269
|
if ("CI" in env) {
|
|
270
|
-
if ("GITHUB_ACTIONS"
|
|
270
|
+
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
|
|
271
271
|
return 3;
|
|
272
272
|
}
|
|
273
|
-
if (["TRAVIS", "
|
|
273
|
+
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
274
274
|
return 1;
|
|
275
275
|
}
|
|
276
276
|
return min;
|