@forsakringskassan/commitlint-config 1.3.3 → 1.3.4

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 +65 -656
  2. package/package.json +1 -1
@@ -337,7 +337,7 @@ var require_semver = __commonJS({
337
337
  do {
338
338
  const a = this.build[i];
339
339
  const b = other.build[i];
340
- debug("prerelease compare", i, a, b);
340
+ debug("build compare", i, a, b);
341
341
  if (a === void 0 && b === void 0) {
342
342
  return 0;
343
343
  } else if (b === void 0) {
@@ -373,6 +373,8 @@ var require_semver = __commonJS({
373
373
  this.inc("patch", identifier, identifierBase);
374
374
  this.inc("pre", identifier, identifierBase);
375
375
  break;
376
+ // If the input is a non-prerelease version, this acts the same as
377
+ // prepatch.
376
378
  case "prerelease":
377
379
  if (this.prerelease.length === 0) {
378
380
  this.inc("patch", identifier, identifierBase);
@@ -400,6 +402,8 @@ var require_semver = __commonJS({
400
402
  }
401
403
  this.prerelease = [];
402
404
  break;
405
+ // This probably shouldn't be used publicly.
406
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
403
407
  case "pre": {
404
408
  const base = Number(identifierBase) ? 1 : 0;
405
409
  if (!identifier && identifierBase === false) {
@@ -808,654 +812,39 @@ var require_coerce = __commonJS({
808
812
  }
809
813
  });
810
814
 
811
- // node_modules/yallist/iterator.js
812
- var require_iterator = __commonJS({
813
- "node_modules/yallist/iterator.js"(exports, module) {
814
- "use strict";
815
- module.exports = function(Yallist) {
816
- Yallist.prototype[Symbol.iterator] = function* () {
817
- for (let walker = this.head; walker; walker = walker.next) {
818
- yield walker.value;
819
- }
820
- };
821
- };
822
- }
823
- });
824
-
825
- // node_modules/yallist/yallist.js
826
- var require_yallist = __commonJS({
827
- "node_modules/yallist/yallist.js"(exports, module) {
828
- "use strict";
829
- module.exports = Yallist;
830
- Yallist.Node = Node2;
831
- Yallist.create = Yallist;
832
- function Yallist(list) {
833
- var self2 = this;
834
- if (!(self2 instanceof Yallist)) {
835
- self2 = new Yallist();
836
- }
837
- self2.tail = null;
838
- self2.head = null;
839
- self2.length = 0;
840
- if (list && typeof list.forEach === "function") {
841
- list.forEach(function(item) {
842
- self2.push(item);
843
- });
844
- } else if (arguments.length > 0) {
845
- for (var i = 0, l = arguments.length; i < l; i++) {
846
- self2.push(arguments[i]);
847
- }
848
- }
849
- return self2;
850
- }
851
- Yallist.prototype.removeNode = function(node) {
852
- if (node.list !== this) {
853
- throw new Error("removing node which does not belong to this list");
854
- }
855
- var next = node.next;
856
- var prev = node.prev;
857
- if (next) {
858
- next.prev = prev;
859
- }
860
- if (prev) {
861
- prev.next = next;
862
- }
863
- if (node === this.head) {
864
- this.head = next;
865
- }
866
- if (node === this.tail) {
867
- this.tail = prev;
868
- }
869
- node.list.length--;
870
- node.next = null;
871
- node.prev = null;
872
- node.list = null;
873
- return next;
874
- };
875
- Yallist.prototype.unshiftNode = function(node) {
876
- if (node === this.head) {
877
- return;
878
- }
879
- if (node.list) {
880
- node.list.removeNode(node);
881
- }
882
- var head = this.head;
883
- node.list = this;
884
- node.next = head;
885
- if (head) {
886
- head.prev = node;
887
- }
888
- this.head = node;
889
- if (!this.tail) {
890
- this.tail = node;
891
- }
892
- this.length++;
893
- };
894
- Yallist.prototype.pushNode = function(node) {
895
- if (node === this.tail) {
896
- return;
897
- }
898
- if (node.list) {
899
- node.list.removeNode(node);
900
- }
901
- var tail = this.tail;
902
- node.list = this;
903
- node.prev = tail;
904
- if (tail) {
905
- tail.next = node;
906
- }
907
- this.tail = node;
908
- if (!this.head) {
909
- this.head = node;
910
- }
911
- this.length++;
912
- };
913
- Yallist.prototype.push = function() {
914
- for (var i = 0, l = arguments.length; i < l; i++) {
915
- push(this, arguments[i]);
916
- }
917
- return this.length;
918
- };
919
- Yallist.prototype.unshift = function() {
920
- for (var i = 0, l = arguments.length; i < l; i++) {
921
- unshift(this, arguments[i]);
922
- }
923
- return this.length;
924
- };
925
- Yallist.prototype.pop = function() {
926
- if (!this.tail) {
927
- return void 0;
928
- }
929
- var res = this.tail.value;
930
- this.tail = this.tail.prev;
931
- if (this.tail) {
932
- this.tail.next = null;
933
- } else {
934
- this.head = null;
935
- }
936
- this.length--;
937
- return res;
938
- };
939
- Yallist.prototype.shift = function() {
940
- if (!this.head) {
941
- return void 0;
942
- }
943
- var res = this.head.value;
944
- this.head = this.head.next;
945
- if (this.head) {
946
- this.head.prev = null;
947
- } else {
948
- this.tail = null;
949
- }
950
- this.length--;
951
- return res;
952
- };
953
- Yallist.prototype.forEach = function(fn, thisp) {
954
- thisp = thisp || this;
955
- for (var walker = this.head, i = 0; walker !== null; i++) {
956
- fn.call(thisp, walker.value, i, this);
957
- walker = walker.next;
958
- }
959
- };
960
- Yallist.prototype.forEachReverse = function(fn, thisp) {
961
- thisp = thisp || this;
962
- for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
963
- fn.call(thisp, walker.value, i, this);
964
- walker = walker.prev;
965
- }
966
- };
967
- Yallist.prototype.get = function(n) {
968
- for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
969
- walker = walker.next;
970
- }
971
- if (i === n && walker !== null) {
972
- return walker.value;
973
- }
974
- };
975
- Yallist.prototype.getReverse = function(n) {
976
- for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
977
- walker = walker.prev;
978
- }
979
- if (i === n && walker !== null) {
980
- return walker.value;
981
- }
982
- };
983
- Yallist.prototype.map = function(fn, thisp) {
984
- thisp = thisp || this;
985
- var res = new Yallist();
986
- for (var walker = this.head; walker !== null; ) {
987
- res.push(fn.call(thisp, walker.value, this));
988
- walker = walker.next;
989
- }
990
- return res;
991
- };
992
- Yallist.prototype.mapReverse = function(fn, thisp) {
993
- thisp = thisp || this;
994
- var res = new Yallist();
995
- for (var walker = this.tail; walker !== null; ) {
996
- res.push(fn.call(thisp, walker.value, this));
997
- walker = walker.prev;
998
- }
999
- return res;
1000
- };
1001
- Yallist.prototype.reduce = function(fn, initial) {
1002
- var acc;
1003
- var walker = this.head;
1004
- if (arguments.length > 1) {
1005
- acc = initial;
1006
- } else if (this.head) {
1007
- walker = this.head.next;
1008
- acc = this.head.value;
1009
- } else {
1010
- throw new TypeError("Reduce of empty list with no initial value");
1011
- }
1012
- for (var i = 0; walker !== null; i++) {
1013
- acc = fn(acc, walker.value, i);
1014
- walker = walker.next;
1015
- }
1016
- return acc;
1017
- };
1018
- Yallist.prototype.reduceReverse = function(fn, initial) {
1019
- var acc;
1020
- var walker = this.tail;
1021
- if (arguments.length > 1) {
1022
- acc = initial;
1023
- } else if (this.tail) {
1024
- walker = this.tail.prev;
1025
- acc = this.tail.value;
1026
- } else {
1027
- throw new TypeError("Reduce of empty list with no initial value");
1028
- }
1029
- for (var i = this.length - 1; walker !== null; i--) {
1030
- acc = fn(acc, walker.value, i);
1031
- walker = walker.prev;
1032
- }
1033
- return acc;
1034
- };
1035
- Yallist.prototype.toArray = function() {
1036
- var arr = new Array(this.length);
1037
- for (var i = 0, walker = this.head; walker !== null; i++) {
1038
- arr[i] = walker.value;
1039
- walker = walker.next;
1040
- }
1041
- return arr;
1042
- };
1043
- Yallist.prototype.toArrayReverse = function() {
1044
- var arr = new Array(this.length);
1045
- for (var i = 0, walker = this.tail; walker !== null; i++) {
1046
- arr[i] = walker.value;
1047
- walker = walker.prev;
1048
- }
1049
- return arr;
1050
- };
1051
- Yallist.prototype.slice = function(from, to) {
1052
- to = to || this.length;
1053
- if (to < 0) {
1054
- to += this.length;
1055
- }
1056
- from = from || 0;
1057
- if (from < 0) {
1058
- from += this.length;
1059
- }
1060
- var ret = new Yallist();
1061
- if (to < from || to < 0) {
1062
- return ret;
1063
- }
1064
- if (from < 0) {
1065
- from = 0;
1066
- }
1067
- if (to > this.length) {
1068
- to = this.length;
1069
- }
1070
- for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
1071
- walker = walker.next;
1072
- }
1073
- for (; walker !== null && i < to; i++, walker = walker.next) {
1074
- ret.push(walker.value);
1075
- }
1076
- return ret;
1077
- };
1078
- Yallist.prototype.sliceReverse = function(from, to) {
1079
- to = to || this.length;
1080
- if (to < 0) {
1081
- to += this.length;
1082
- }
1083
- from = from || 0;
1084
- if (from < 0) {
1085
- from += this.length;
1086
- }
1087
- var ret = new Yallist();
1088
- if (to < from || to < 0) {
1089
- return ret;
1090
- }
1091
- if (from < 0) {
1092
- from = 0;
1093
- }
1094
- if (to > this.length) {
1095
- to = this.length;
1096
- }
1097
- for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
1098
- walker = walker.prev;
1099
- }
1100
- for (; walker !== null && i > from; i--, walker = walker.prev) {
1101
- ret.push(walker.value);
1102
- }
1103
- return ret;
1104
- };
1105
- Yallist.prototype.splice = function(start, deleteCount, ...nodes) {
1106
- if (start > this.length) {
1107
- start = this.length - 1;
1108
- }
1109
- if (start < 0) {
1110
- start = this.length + start;
1111
- }
1112
- for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
1113
- walker = walker.next;
1114
- }
1115
- var ret = [];
1116
- for (var i = 0; walker && i < deleteCount; i++) {
1117
- ret.push(walker.value);
1118
- walker = this.removeNode(walker);
1119
- }
1120
- if (walker === null) {
1121
- walker = this.tail;
1122
- }
1123
- if (walker !== this.head && walker !== this.tail) {
1124
- walker = walker.prev;
1125
- }
1126
- for (var i = 0; i < nodes.length; i++) {
1127
- walker = insert(this, walker, nodes[i]);
1128
- }
1129
- return ret;
1130
- };
1131
- Yallist.prototype.reverse = function() {
1132
- var head = this.head;
1133
- var tail = this.tail;
1134
- for (var walker = head; walker !== null; walker = walker.prev) {
1135
- var p = walker.prev;
1136
- walker.prev = walker.next;
1137
- walker.next = p;
1138
- }
1139
- this.head = tail;
1140
- this.tail = head;
1141
- return this;
1142
- };
1143
- function insert(self2, node, value2) {
1144
- var inserted = node === self2.head ? new Node2(value2, null, node, self2) : new Node2(value2, node, node.next, self2);
1145
- if (inserted.next === null) {
1146
- self2.tail = inserted;
1147
- }
1148
- if (inserted.prev === null) {
1149
- self2.head = inserted;
1150
- }
1151
- self2.length++;
1152
- return inserted;
1153
- }
1154
- function push(self2, item) {
1155
- self2.tail = new Node2(item, self2.tail, null, self2);
1156
- if (!self2.head) {
1157
- self2.head = self2.tail;
1158
- }
1159
- self2.length++;
1160
- }
1161
- function unshift(self2, item) {
1162
- self2.head = new Node2(item, null, self2.head, self2);
1163
- if (!self2.tail) {
1164
- self2.tail = self2.head;
1165
- }
1166
- self2.length++;
1167
- }
1168
- function Node2(value2, prev, next, list) {
1169
- if (!(this instanceof Node2)) {
1170
- return new Node2(value2, prev, next, list);
1171
- }
1172
- this.list = list;
1173
- this.value = value2;
1174
- if (prev) {
1175
- prev.next = this;
1176
- this.prev = prev;
1177
- } else {
1178
- this.prev = null;
1179
- }
1180
- if (next) {
1181
- next.prev = this;
1182
- this.next = next;
1183
- } else {
1184
- this.next = null;
1185
- }
1186
- }
1187
- try {
1188
- require_iterator()(Yallist);
1189
- } catch (er) {
1190
- }
1191
- }
1192
- });
1193
-
1194
- // node_modules/lru-cache/index.js
1195
- var require_lru_cache = __commonJS({
1196
- "node_modules/lru-cache/index.js"(exports, module) {
1197
- "use strict";
1198
- var Yallist = require_yallist();
1199
- var MAX = Symbol("max");
1200
- var LENGTH = Symbol("length");
1201
- var LENGTH_CALCULATOR = Symbol("lengthCalculator");
1202
- var ALLOW_STALE = Symbol("allowStale");
1203
- var MAX_AGE = Symbol("maxAge");
1204
- var DISPOSE = Symbol("dispose");
1205
- var NO_DISPOSE_ON_SET = Symbol("noDisposeOnSet");
1206
- var LRU_LIST = Symbol("lruList");
1207
- var CACHE = Symbol("cache");
1208
- var UPDATE_AGE_ON_GET = Symbol("updateAgeOnGet");
1209
- var naiveLength = () => 1;
815
+ // node_modules/semver/internal/lrucache.js
816
+ var require_lrucache = __commonJS({
817
+ "node_modules/semver/internal/lrucache.js"(exports, module) {
1210
818
  var LRUCache = class {
1211
- constructor(options) {
1212
- if (typeof options === "number")
1213
- options = { max: options };
1214
- if (!options)
1215
- options = {};
1216
- if (options.max && (typeof options.max !== "number" || options.max < 0))
1217
- throw new TypeError("max must be a non-negative number");
1218
- const max = this[MAX] = options.max || Infinity;
1219
- const lc = options.length || naiveLength;
1220
- this[LENGTH_CALCULATOR] = typeof lc !== "function" ? naiveLength : lc;
1221
- this[ALLOW_STALE] = options.stale || false;
1222
- if (options.maxAge && typeof options.maxAge !== "number")
1223
- throw new TypeError("maxAge must be a number");
1224
- this[MAX_AGE] = options.maxAge || 0;
1225
- this[DISPOSE] = options.dispose;
1226
- this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
1227
- this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
1228
- this.reset();
1229
- }
1230
- // resize the cache when the max changes.
1231
- set max(mL) {
1232
- if (typeof mL !== "number" || mL < 0)
1233
- throw new TypeError("max must be a non-negative number");
1234
- this[MAX] = mL || Infinity;
1235
- trim(this);
1236
- }
1237
- get max() {
1238
- return this[MAX];
1239
- }
1240
- set allowStale(allowStale) {
1241
- this[ALLOW_STALE] = !!allowStale;
1242
- }
1243
- get allowStale() {
1244
- return this[ALLOW_STALE];
1245
- }
1246
- set maxAge(mA) {
1247
- if (typeof mA !== "number")
1248
- throw new TypeError("maxAge must be a non-negative number");
1249
- this[MAX_AGE] = mA;
1250
- trim(this);
1251
- }
1252
- get maxAge() {
1253
- return this[MAX_AGE];
1254
- }
1255
- // resize the cache when the lengthCalculator changes.
1256
- set lengthCalculator(lC) {
1257
- if (typeof lC !== "function")
1258
- lC = naiveLength;
1259
- if (lC !== this[LENGTH_CALCULATOR]) {
1260
- this[LENGTH_CALCULATOR] = lC;
1261
- this[LENGTH] = 0;
1262
- this[LRU_LIST].forEach((hit) => {
1263
- hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
1264
- this[LENGTH] += hit.length;
1265
- });
1266
- }
1267
- trim(this);
1268
- }
1269
- get lengthCalculator() {
1270
- return this[LENGTH_CALCULATOR];
1271
- }
1272
- get length() {
1273
- return this[LENGTH];
1274
- }
1275
- get itemCount() {
1276
- return this[LRU_LIST].length;
1277
- }
1278
- rforEach(fn, thisp) {
1279
- thisp = thisp || this;
1280
- for (let walker = this[LRU_LIST].tail; walker !== null; ) {
1281
- const prev = walker.prev;
1282
- forEachStep(this, fn, walker, thisp);
1283
- walker = prev;
1284
- }
1285
- }
1286
- forEach(fn, thisp) {
1287
- thisp = thisp || this;
1288
- for (let walker = this[LRU_LIST].head; walker !== null; ) {
1289
- const next = walker.next;
1290
- forEachStep(this, fn, walker, thisp);
1291
- walker = next;
1292
- }
1293
- }
1294
- keys() {
1295
- return this[LRU_LIST].toArray().map((k) => k.key);
1296
- }
1297
- values() {
1298
- return this[LRU_LIST].toArray().map((k) => k.value);
1299
- }
1300
- reset() {
1301
- if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
1302
- this[LRU_LIST].forEach((hit) => this[DISPOSE](hit.key, hit.value));
1303
- }
1304
- this[CACHE] = /* @__PURE__ */ new Map();
1305
- this[LRU_LIST] = new Yallist();
1306
- this[LENGTH] = 0;
1307
- }
1308
- dump() {
1309
- return this[LRU_LIST].map((hit) => isStale(this, hit) ? false : {
1310
- k: hit.key,
1311
- v: hit.value,
1312
- e: hit.now + (hit.maxAge || 0)
1313
- }).toArray().filter((h) => h);
1314
- }
1315
- dumpLru() {
1316
- return this[LRU_LIST];
1317
- }
1318
- set(key, value2, maxAge) {
1319
- maxAge = maxAge || this[MAX_AGE];
1320
- if (maxAge && typeof maxAge !== "number")
1321
- throw new TypeError("maxAge must be a number");
1322
- const now = maxAge ? Date.now() : 0;
1323
- const len = this[LENGTH_CALCULATOR](value2, key);
1324
- if (this[CACHE].has(key)) {
1325
- if (len > this[MAX]) {
1326
- del(this, this[CACHE].get(key));
1327
- return false;
1328
- }
1329
- const node = this[CACHE].get(key);
1330
- const item = node.value;
1331
- if (this[DISPOSE]) {
1332
- if (!this[NO_DISPOSE_ON_SET])
1333
- this[DISPOSE](key, item.value);
1334
- }
1335
- item.now = now;
1336
- item.maxAge = maxAge;
1337
- item.value = value2;
1338
- this[LENGTH] += len - item.length;
1339
- item.length = len;
1340
- this.get(key);
1341
- trim(this);
1342
- return true;
1343
- }
1344
- const hit = new Entry(key, value2, len, now, maxAge);
1345
- if (hit.length > this[MAX]) {
1346
- if (this[DISPOSE])
1347
- this[DISPOSE](key, value2);
1348
- return false;
1349
- }
1350
- this[LENGTH] += hit.length;
1351
- this[LRU_LIST].unshift(hit);
1352
- this[CACHE].set(key, this[LRU_LIST].head);
1353
- trim(this);
1354
- return true;
1355
- }
1356
- has(key) {
1357
- if (!this[CACHE].has(key)) return false;
1358
- const hit = this[CACHE].get(key).value;
1359
- return !isStale(this, hit);
819
+ constructor() {
820
+ this.max = 1e3;
821
+ this.map = /* @__PURE__ */ new Map();
1360
822
  }
1361
823
  get(key) {
1362
- return get(this, key, true);
1363
- }
1364
- peek(key) {
1365
- return get(this, key, false);
1366
- }
1367
- pop() {
1368
- const node = this[LRU_LIST].tail;
1369
- if (!node)
1370
- return null;
1371
- del(this, node);
1372
- return node.value;
1373
- }
1374
- del(key) {
1375
- del(this, this[CACHE].get(key));
1376
- }
1377
- load(arr) {
1378
- this.reset();
1379
- const now = Date.now();
1380
- for (let l = arr.length - 1; l >= 0; l--) {
1381
- const hit = arr[l];
1382
- const expiresAt = hit.e || 0;
1383
- if (expiresAt === 0)
1384
- this.set(hit.k, hit.v);
1385
- else {
1386
- const maxAge = expiresAt - now;
1387
- if (maxAge > 0) {
1388
- this.set(hit.k, hit.v, maxAge);
1389
- }
1390
- }
824
+ const value2 = this.map.get(key);
825
+ if (value2 === void 0) {
826
+ return void 0;
827
+ } else {
828
+ this.map.delete(key);
829
+ this.map.set(key, value2);
830
+ return value2;
1391
831
  }
1392
832
  }
1393
- prune() {
1394
- this[CACHE].forEach((value2, key) => get(this, key, false));
833
+ delete(key) {
834
+ return this.map.delete(key);
1395
835
  }
1396
- };
1397
- var get = (self2, key, doUse) => {
1398
- const node = self2[CACHE].get(key);
1399
- if (node) {
1400
- const hit = node.value;
1401
- if (isStale(self2, hit)) {
1402
- del(self2, node);
1403
- if (!self2[ALLOW_STALE])
1404
- return void 0;
1405
- } else {
1406
- if (doUse) {
1407
- if (self2[UPDATE_AGE_ON_GET])
1408
- node.value.now = Date.now();
1409
- self2[LRU_LIST].unshiftNode(node);
836
+ set(key, value2) {
837
+ const deleted = this.delete(key);
838
+ if (!deleted && value2 !== void 0) {
839
+ if (this.map.size >= this.max) {
840
+ const firstKey = this.map.keys().next().value;
841
+ this.delete(firstKey);
1410
842
  }
843
+ this.map.set(key, value2);
1411
844
  }
1412
- return hit.value;
1413
- }
1414
- };
1415
- var isStale = (self2, hit) => {
1416
- if (!hit || !hit.maxAge && !self2[MAX_AGE])
1417
- return false;
1418
- const diff = Date.now() - hit.now;
1419
- return hit.maxAge ? diff > hit.maxAge : self2[MAX_AGE] && diff > self2[MAX_AGE];
1420
- };
1421
- var trim = (self2) => {
1422
- if (self2[LENGTH] > self2[MAX]) {
1423
- for (let walker = self2[LRU_LIST].tail; self2[LENGTH] > self2[MAX] && walker !== null; ) {
1424
- const prev = walker.prev;
1425
- del(self2, walker);
1426
- walker = prev;
1427
- }
1428
- }
1429
- };
1430
- var del = (self2, node) => {
1431
- if (node) {
1432
- const hit = node.value;
1433
- if (self2[DISPOSE])
1434
- self2[DISPOSE](hit.key, hit.value);
1435
- self2[LENGTH] -= hit.length;
1436
- self2[CACHE].delete(hit.key);
1437
- self2[LRU_LIST].removeNode(node);
1438
- }
1439
- };
1440
- var Entry = class {
1441
- constructor(key, value2, length, now, maxAge) {
1442
- this.key = key;
1443
- this.value = value2;
1444
- this.length = length;
1445
- this.now = now;
1446
- this.maxAge = maxAge || 0;
845
+ return this;
1447
846
  }
1448
847
  };
1449
- var forEachStep = (self2, fn, node, thisp) => {
1450
- let hit = node.value;
1451
- if (isStale(self2, hit)) {
1452
- del(self2, node);
1453
- if (!self2[ALLOW_STALE])
1454
- hit = void 0;
1455
- }
1456
- if (hit)
1457
- fn.call(thisp, hit.value, hit.key, self2);
1458
- };
1459
848
  module.exports = LRUCache;
1460
849
  }
1461
850
  });
@@ -1463,6 +852,7 @@ var require_lru_cache = __commonJS({
1463
852
  // node_modules/semver/classes/range.js
1464
853
  var require_range = __commonJS({
1465
854
  "node_modules/semver/classes/range.js"(exports, module) {
855
+ var SPACE_CHARACTERS = /\s+/g;
1466
856
  var Range = class _Range {
1467
857
  constructor(range, options) {
1468
858
  options = parseOptions(options);
@@ -1476,13 +866,13 @@ var require_range = __commonJS({
1476
866
  if (range instanceof Comparator) {
1477
867
  this.raw = range.value;
1478
868
  this.set = [[range]];
1479
- this.format();
869
+ this.formatted = void 0;
1480
870
  return this;
1481
871
  }
1482
872
  this.options = options;
1483
873
  this.loose = !!options.loose;
1484
874
  this.includePrerelease = !!options.includePrerelease;
1485
- this.raw = range.trim().split(/\s+/).join(" ");
875
+ this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
1486
876
  this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
1487
877
  if (!this.set.length) {
1488
878
  throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
@@ -1501,10 +891,27 @@ var require_range = __commonJS({
1501
891
  }
1502
892
  }
1503
893
  }
1504
- this.format();
894
+ this.formatted = void 0;
895
+ }
896
+ get range() {
897
+ if (this.formatted === void 0) {
898
+ this.formatted = "";
899
+ for (let i = 0; i < this.set.length; i++) {
900
+ if (i > 0) {
901
+ this.formatted += "||";
902
+ }
903
+ const comps = this.set[i];
904
+ for (let k = 0; k < comps.length; k++) {
905
+ if (k > 0) {
906
+ this.formatted += " ";
907
+ }
908
+ this.formatted += comps[k].toString().trim();
909
+ }
910
+ }
911
+ }
912
+ return this.formatted;
1505
913
  }
1506
914
  format() {
1507
- this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
1508
915
  return this.range;
1509
916
  }
1510
917
  toString() {
@@ -1585,8 +992,8 @@ var require_range = __commonJS({
1585
992
  }
1586
993
  };
1587
994
  module.exports = Range;
1588
- var LRU = require_lru_cache();
1589
- var cache2 = new LRU({ max: 1e3 });
995
+ var LRU = require_lrucache();
996
+ var cache2 = new LRU();
1590
997
  var parseOptions = require_parse_options();
1591
998
  var Comparator = require_comparator();
1592
999
  var debug = require_debug();
@@ -1764,7 +1171,7 @@ var require_range = __commonJS({
1764
1171
  debug("replaceGTE0", comp, options);
1765
1172
  return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
1766
1173
  };
1767
- var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
1174
+ var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1768
1175
  if (isX(fM)) {
1769
1176
  from = "";
1770
1177
  } else if (isX(fm)) {
@@ -2040,6 +1447,7 @@ var require_min_version = __commonJS({
2040
1447
  compver.prerelease.push(0);
2041
1448
  }
2042
1449
  compver.raw = compver.format();
1450
+ /* fallthrough */
2043
1451
  case "":
2044
1452
  case ">=":
2045
1453
  if (!setMin || gt(compver, setMin)) {
@@ -2049,6 +1457,7 @@ var require_min_version = __commonJS({
2049
1457
  case "<":
2050
1458
  case "<=":
2051
1459
  break;
1460
+ /* istanbul ignore next */
2052
1461
  default:
2053
1462
  throw new Error(`Unexpected operation: ${comparator.operator}`);
2054
1463
  }
@@ -256879,7 +256288,7 @@ var headerCase = (parsed, when = "always", value2 = []) => {
256879
256288
  var headerFullStop = (parsed, when = "always", value2 = ".") => {
256880
256289
  const { header } = parsed;
256881
256290
  const negated6 = when === "never";
256882
- const hasStop = (header === null || header === void 0 ? void 0 : header[header.length - 1]) === value2;
256291
+ const hasStop = header?.[header.length - 1] === value2;
256883
256292
  return [
256884
256293
  negated6 ? !hasStop : hasStop,
256885
256294
  message(["header", negated6 ? "may not" : "must", "end with full stop"])
@@ -256888,19 +256297,17 @@ var headerFullStop = (parsed, when = "always", value2 = ".") => {
256888
256297
 
256889
256298
  // node_modules/@commitlint/rules/lib/header-max-length.js
256890
256299
  var headerMaxLength = (parsed, _when = void 0, value2 = 0) => {
256891
- var _a2;
256892
256300
  return [
256893
256301
  max_length_default(parsed.header, value2),
256894
- `header must not be longer than ${value2} characters, current length is ${(_a2 = parsed.header) === null || _a2 === void 0 ? void 0 : _a2.length}`
256302
+ `header must not be longer than ${value2} characters, current length is ${parsed.header?.length}`
256895
256303
  ];
256896
256304
  };
256897
256305
 
256898
256306
  // node_modules/@commitlint/rules/lib/header-min-length.js
256899
256307
  var headerMinLength = (parsed, _when = void 0, value2 = 0) => {
256900
- var _a2;
256901
256308
  return [
256902
256309
  min_length_default(parsed.header, value2),
256903
- `header must not be shorter than ${value2} characters, current length is ${(_a2 = parsed.header) === null || _a2 === void 0 ? void 0 : _a2.length}`
256310
+ `header must not be shorter than ${value2} characters, current length is ${parsed.header?.length}`
256904
256311
  ];
256905
256312
  };
256906
256313
 
@@ -257028,7 +256435,10 @@ var signedOffBy = (parsed, when = "always", value2 = "") => {
257028
256435
  ));
257029
256436
  const last = lines[lines.length - 1];
257030
256437
  const negated6 = when === "never";
257031
- const hasSignedOffBy = last.startsWith(value2);
256438
+ const hasSignedOffBy = (
256439
+ // empty commit message
256440
+ last ? last.startsWith(value2) : false
256441
+ );
257032
256442
  return [
257033
256443
  negated6 ? !hasSignedOffBy : hasSignedOffBy,
257034
256444
  message(["message", negated6 ? "must not" : "must", "be signed off"])
@@ -257075,15 +256485,14 @@ var subjectEmpty = (parsed, when = "always") => {
257075
256485
 
257076
256486
  // node_modules/@commitlint/rules/lib/subject-full-stop.js
257077
256487
  var subjectFullStop = (parsed, when = "always", value2 = ".") => {
257078
- var _a2;
257079
- const colonIndex = ((_a2 = parsed.header) === null || _a2 === void 0 ? void 0 : _a2.indexOf(":")) || 0;
256488
+ const colonIndex = parsed.header?.indexOf(":") || 0;
257080
256489
  if (colonIndex > 0 && colonIndex === parsed.header.length - 1) {
257081
256490
  return [true];
257082
256491
  }
257083
256492
  const input = parsed.header;
257084
256493
  const negated6 = when === "never";
257085
- let hasStop = (input === null || input === void 0 ? void 0 : input[input.length - 1]) === value2;
257086
- if ((input === null || input === void 0 ? void 0 : input.slice(-3)) === "...") {
256494
+ let hasStop = input?.[input.length - 1] === value2;
256495
+ if (input?.slice(-3) === "...") {
257087
256496
  hasStop = false;
257088
256497
  }
257089
256498
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/commitlint-config",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "FK commitlint shareable config",
5
5
  "keywords": [
6
6
  "commitlint"