@forsakringskassan/vite-lib-config 4.8.0 → 4.8.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.
@@ -1314,6 +1314,47 @@ var require_coerce = __commonJS({
1314
1314
  }
1315
1315
  });
1316
1316
 
1317
+ // node_modules/semver/functions/truncate.js
1318
+ var require_truncate = __commonJS({
1319
+ "node_modules/semver/functions/truncate.js"(exports, module) {
1320
+ "use strict";
1321
+ var parse = require_parse();
1322
+ var constants = require_constants();
1323
+ var SemVer = require_semver();
1324
+ var truncate = (version2, truncation, options) => {
1325
+ if (!constants.RELEASE_TYPES.includes(truncation)) {
1326
+ return null;
1327
+ }
1328
+ const clonedVersion = cloneInputVersion(version2, options);
1329
+ return clonedVersion && doTruncation(clonedVersion, truncation);
1330
+ };
1331
+ var cloneInputVersion = (version2, options) => {
1332
+ const versionStringToParse = version2 instanceof SemVer ? version2.version : version2;
1333
+ return parse(versionStringToParse, options);
1334
+ };
1335
+ var doTruncation = (version2, truncation) => {
1336
+ if (isPrerelease(truncation)) {
1337
+ return version2.version;
1338
+ }
1339
+ version2.prerelease = [];
1340
+ switch (truncation) {
1341
+ case "major":
1342
+ version2.minor = 0;
1343
+ version2.patch = 0;
1344
+ break;
1345
+ case "minor":
1346
+ version2.patch = 0;
1347
+ break;
1348
+ }
1349
+ return version2.format();
1350
+ };
1351
+ var isPrerelease = (type) => {
1352
+ return type.startsWith("pre");
1353
+ };
1354
+ module.exports = truncate;
1355
+ }
1356
+ });
1357
+
1317
1358
  // node_modules/semver/internal/lrucache.js
1318
1359
  var require_lrucache = __commonJS({
1319
1360
  "node_modules/semver/internal/lrucache.js"(exports, module) {
@@ -2348,6 +2389,7 @@ var require_semver2 = __commonJS({
2348
2389
  var lte = require_lte();
2349
2390
  var cmp = require_cmp();
2350
2391
  var coerce = require_coerce();
2392
+ var truncate = require_truncate();
2351
2393
  var Comparator = require_comparator();
2352
2394
  var Range = require_range();
2353
2395
  var satisfies = require_satisfies();
@@ -2386,6 +2428,7 @@ var require_semver2 = __commonJS({
2386
2428
  lte,
2387
2429
  cmp,
2388
2430
  coerce,
2431
+ truncate,
2389
2432
  Comparator,
2390
2433
  Range,
2391
2434
  satisfies,