@forsakringskassan/vite-lib-config 3.4.1 → 3.4.3

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.
@@ -731,6 +731,7 @@ var require_re = __commonJS({
731
731
  var re = exports2.re = [];
732
732
  var safeRe = exports2.safeRe = [];
733
733
  var src = exports2.src = [];
734
+ var safeSrc = exports2.safeSrc = [];
734
735
  var t = exports2.t = {};
735
736
  var R = 0;
736
737
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -751,6 +752,7 @@ var require_re = __commonJS({
751
752
  debug(name, index, value);
752
753
  t[name] = index;
753
754
  src[index] = value;
755
+ safeSrc[index] = safe;
754
756
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
755
757
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
756
758
  };
@@ -847,7 +849,7 @@ var require_semver = __commonJS({
847
849
  "node_modules/semver/classes/semver.js"(exports2, module2) {
848
850
  var debug = require_debug();
849
851
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
850
- var { safeRe: re, t } = require_re();
852
+ var { safeRe: re, safeSrc: src, t } = require_re();
851
853
  var parseOptions = require_parse_options();
852
854
  var { compareIdentifiers } = require_identifiers();
853
855
  var SemVer = class _SemVer {
@@ -992,7 +994,8 @@ var require_semver = __commonJS({
992
994
  throw new Error("invalid increment argument: identifier is empty");
993
995
  }
994
996
  if (identifier) {
995
- const match2 = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
997
+ const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
998
+ const match2 = `-${identifier}`.match(r);
996
999
  if (!match2 || match2[1] !== identifier) {
997
1000
  throw new Error(`invalid identifier: ${identifier}`);
998
1001
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.49.2"
8
+ "packageVersion": "7.50.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -336,11 +336,11 @@ var require_dist = __commonJS({
336
336
  "node_modules/@vitejs/plugin-vue/dist/index.cjs"(exports2, module2) {
337
337
  "use strict";
338
338
  Object.defineProperty(exports2, "__esModule", { value: true });
339
- var fs5 = require("node:fs");
339
+ var fs4 = require("node:fs");
340
340
  var vite = require("vite");
341
341
  var vue = require("vue");
342
342
  var node_module = require("node:module");
343
- var path4 = require("node:path");
343
+ var path3 = require("node:path");
344
344
  var crypto = require("node:crypto");
345
345
  var require$$0 = require("tty");
346
346
  var require$$1 = require("util");
@@ -348,8 +348,8 @@ var require_dist = __commonJS({
348
348
  function _interopDefaultCompat(e) {
349
349
  return e && typeof e === "object" && "default" in e ? e.default : e;
350
350
  }
351
- var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs5);
352
- var path__default = /* @__PURE__ */ _interopDefaultCompat(path4);
351
+ var fs__default = /* @__PURE__ */ _interopDefaultCompat(fs4);
352
+ var path__default = /* @__PURE__ */ _interopDefaultCompat(path3);
353
353
  var crypto__default = /* @__PURE__ */ _interopDefaultCompat(crypto);
354
354
  var require$$0__default = /* @__PURE__ */ _interopDefaultCompat(require$$0);
355
355
  var require$$1__default = /* @__PURE__ */ _interopDefaultCompat(require$$1);
@@ -498,12 +498,12 @@ var require_dist = __commonJS({
498
498
  function getHash(text) {
499
499
  return hash("sha256", text, "hex").substring(0, 8);
500
500
  }
501
- function slash(path5) {
502
- const isExtendedLengthPath = path5.startsWith("\\\\?\\");
501
+ function slash(path4) {
502
+ const isExtendedLengthPath = path4.startsWith("\\\\?\\");
503
503
  if (isExtendedLengthPath) {
504
- return path5;
504
+ return path4;
505
505
  }
506
- return path5.replace(/\\/g, "/");
506
+ return path4.replace(/\\/g, "/");
507
507
  }
508
508
  function createRollupError(id, error) {
509
509
  const { message, name, stack } = error;
@@ -939,16 +939,16 @@ import.meta.hot.accept(({ render }) => {
939
939
  }
940
940
  function parseFileUrl(input) {
941
941
  const match2 = fileRegex.exec(input);
942
- const path5 = match2[2];
943
- return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path5) ? path5 : "/" + path5, match2[3] || "", match2[4] || "");
942
+ const path4 = match2[2];
943
+ return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path4) ? path4 : "/" + path4, match2[3] || "", match2[4] || "");
944
944
  }
945
- function makeUrl(scheme, user, host, port, path5, query, hash2) {
945
+ function makeUrl(scheme, user, host, port, path4, query, hash2) {
946
946
  return {
947
947
  scheme,
948
948
  user,
949
949
  host,
950
950
  port,
951
- path: path5,
951
+ path: path4,
952
952
  query,
953
953
  hash: hash2,
954
954
  type: 7
@@ -978,11 +978,11 @@ import.meta.hot.accept(({ render }) => {
978
978
  url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
979
979
  return url;
980
980
  }
981
- function stripPathFilename(path5) {
982
- if (path5.endsWith("/.."))
983
- return path5;
984
- const index = path5.lastIndexOf("/");
985
- return path5.slice(0, index + 1);
981
+ function stripPathFilename(path4) {
982
+ if (path4.endsWith("/.."))
983
+ return path4;
984
+ const index = path4.lastIndexOf("/");
985
+ return path4.slice(0, index + 1);
986
986
  }
987
987
  function mergePaths(url, base) {
988
988
  normalizePath(base, base.type);
@@ -1020,14 +1020,14 @@ import.meta.hot.accept(({ render }) => {
1020
1020
  pieces[pointer++] = piece;
1021
1021
  positive++;
1022
1022
  }
1023
- let path5 = "";
1023
+ let path4 = "";
1024
1024
  for (let i = 1; i < pointer; i++) {
1025
- path5 += "/" + pieces[i];
1025
+ path4 += "/" + pieces[i];
1026
1026
  }
1027
- if (!path5 || addTrailingSlash && !path5.endsWith("/..")) {
1028
- path5 += "/";
1027
+ if (!path4 || addTrailingSlash && !path4.endsWith("/..")) {
1028
+ path4 += "/";
1029
1029
  }
1030
- url.path = path5;
1030
+ url.path = path4;
1031
1031
  }
1032
1032
  function resolve$1(input, base) {
1033
1033
  if (!input && !base)
@@ -1068,13 +1068,13 @@ import.meta.hot.accept(({ render }) => {
1068
1068
  case 3:
1069
1069
  return queryHash;
1070
1070
  case 4: {
1071
- const path5 = url.path.slice(1);
1072
- if (!path5)
1071
+ const path4 = url.path.slice(1);
1072
+ if (!path4)
1073
1073
  return queryHash || ".";
1074
- if (isRelative(base || input) && !isRelative(path5)) {
1075
- return "./" + path5 + queryHash;
1074
+ if (isRelative(base || input) && !isRelative(path4)) {
1075
+ return "./" + path4 + queryHash;
1076
1076
  }
1077
- return path5 + queryHash;
1077
+ return path4 + queryHash;
1078
1078
  }
1079
1079
  case 5:
1080
1080
  return url.path + queryHash;
@@ -1087,11 +1087,11 @@ import.meta.hot.accept(({ render }) => {
1087
1087
  base += "/";
1088
1088
  return resolve$1(input, base);
1089
1089
  }
1090
- function stripFilename(path5) {
1091
- if (!path5)
1090
+ function stripFilename(path4) {
1091
+ if (!path4)
1092
1092
  return "";
1093
- const index = path5.lastIndexOf("/");
1094
- return path5.slice(0, index + 1);
1093
+ const index = path4.lastIndexOf("/");
1094
+ return path4.slice(0, index + 1);
1095
1095
  }
1096
1096
  var COLUMN$1 = 0;
1097
1097
  function maybeSort(mappings, owned) {
@@ -3083,6 +3083,7 @@ var require_re = __commonJS({
3083
3083
  var re = exports2.re = [];
3084
3084
  var safeRe = exports2.safeRe = [];
3085
3085
  var src = exports2.src = [];
3086
+ var safeSrc = exports2.safeSrc = [];
3086
3087
  var t = exports2.t = {};
3087
3088
  var R = 0;
3088
3089
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -3103,6 +3104,7 @@ var require_re = __commonJS({
3103
3104
  debug(name, index, value);
3104
3105
  t[name] = index;
3105
3106
  src[index] = value;
3107
+ safeSrc[index] = safe;
3106
3108
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
3107
3109
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
3108
3110
  };
@@ -3199,7 +3201,7 @@ var require_semver = __commonJS({
3199
3201
  "node_modules/semver/classes/semver.js"(exports2, module2) {
3200
3202
  var debug = require_debug();
3201
3203
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
3202
- var { safeRe: re, t } = require_re();
3204
+ var { safeRe: re, safeSrc: src, t } = require_re();
3203
3205
  var parseOptions = require_parse_options();
3204
3206
  var { compareIdentifiers } = require_identifiers();
3205
3207
  var SemVer = class _SemVer {
@@ -3344,7 +3346,8 @@ var require_semver = __commonJS({
3344
3346
  throw new Error("invalid increment argument: identifier is empty");
3345
3347
  }
3346
3348
  if (identifier) {
3347
- const match2 = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
3349
+ const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
3350
+ const match2 = `-${identifier}`.match(r);
3348
3351
  if (!match2 || match2[1] !== identifier) {
3349
3352
  throw new Error(`invalid identifier: ${identifier}`);
3350
3353
  }
@@ -5071,26 +5074,6 @@ function packageJsonPlugin() {
5071
5074
  };
5072
5075
  }
5073
5076
 
5074
- // src/utils/detect-internal-dependencies.ts
5075
- function detectInternalDependencies(packages2, dependencies2) {
5076
- const internal = packages2.filter((pkg) => dependencies2.includes(pkg.name));
5077
- const num = internal.length;
5078
- console.group("Detecting monorepo dependencies:");
5079
- if (num > 0) {
5080
- const ies = num === 1 ? "y" : "ies";
5081
- console.log(`${num} internal dependenc${ies} found.
5082
- `);
5083
- } else {
5084
- console.log("No internal dependencies found");
5085
- }
5086
- console.groupEnd();
5087
- return internal;
5088
- }
5089
-
5090
- // src/utils/detect-monorepo-packages.ts
5091
- var import_fs2 = __toESM(require("fs"));
5092
- var import_node_path3 = __toESM(require("node:path"));
5093
-
5094
5077
  // node_modules/glob/node_modules/minimatch/dist/esm/index.js
5095
5078
  var import_brace_expansion = __toESM(require_brace_expansion(), 1);
5096
5079
 
@@ -8848,12 +8831,12 @@ var PathBase = class {
8848
8831
  /**
8849
8832
  * Get the Path object referenced by the string path, resolved from this Path
8850
8833
  */
8851
- resolve(path4) {
8852
- if (!path4) {
8834
+ resolve(path3) {
8835
+ if (!path3) {
8853
8836
  return this;
8854
8837
  }
8855
- const rootPath = this.getRootString(path4);
8856
- const dir = path4.substring(rootPath.length);
8838
+ const rootPath = this.getRootString(path3);
8839
+ const dir = path3.substring(rootPath.length);
8857
8840
  const dirParts = dir.split(this.splitSep);
8858
8841
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
8859
8842
  return result;
@@ -9605,8 +9588,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
9605
9588
  /**
9606
9589
  * @internal
9607
9590
  */
9608
- getRootString(path4) {
9609
- return import_node_path2.win32.parse(path4).root;
9591
+ getRootString(path3) {
9592
+ return import_node_path2.win32.parse(path3).root;
9610
9593
  }
9611
9594
  /**
9612
9595
  * @internal
@@ -9652,8 +9635,8 @@ var PathPosix = class _PathPosix extends PathBase {
9652
9635
  /**
9653
9636
  * @internal
9654
9637
  */
9655
- getRootString(path4) {
9656
- return path4.startsWith("/") ? "/" : "";
9638
+ getRootString(path3) {
9639
+ return path3.startsWith("/") ? "/" : "";
9657
9640
  }
9658
9641
  /**
9659
9642
  * @internal
@@ -9702,8 +9685,8 @@ var PathScurryBase = class {
9702
9685
  *
9703
9686
  * @internal
9704
9687
  */
9705
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs5 = defaultFS } = {}) {
9706
- this.#fs = fsFromOption(fs5);
9688
+ constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs4 = defaultFS } = {}) {
9689
+ this.#fs = fsFromOption(fs4);
9707
9690
  if (cwd instanceof URL || cwd.startsWith("file://")) {
9708
9691
  cwd = (0, import_node_url.fileURLToPath)(cwd);
9709
9692
  }
@@ -9742,11 +9725,11 @@ var PathScurryBase = class {
9742
9725
  /**
9743
9726
  * Get the depth of a provided path, string, or the cwd
9744
9727
  */
9745
- depth(path4 = this.cwd) {
9746
- if (typeof path4 === "string") {
9747
- path4 = this.cwd.resolve(path4);
9728
+ depth(path3 = this.cwd) {
9729
+ if (typeof path3 === "string") {
9730
+ path3 = this.cwd.resolve(path3);
9748
9731
  }
9749
- return path4.depth();
9732
+ return path3.depth();
9750
9733
  }
9751
9734
  /**
9752
9735
  * Return the cache of child entries. Exposed so subclasses can create
@@ -10233,9 +10216,9 @@ var PathScurryBase = class {
10233
10216
  process2();
10234
10217
  return results;
10235
10218
  }
10236
- chdir(path4 = this.cwd) {
10219
+ chdir(path3 = this.cwd) {
10237
10220
  const oldCwd = this.cwd;
10238
- this.cwd = typeof path4 === "string" ? this.cwd.resolve(path4) : path4;
10221
+ this.cwd = typeof path3 === "string" ? this.cwd.resolve(path3) : path3;
10239
10222
  this.cwd[setAsCwd](oldCwd);
10240
10223
  }
10241
10224
  };
@@ -10261,8 +10244,8 @@ var PathScurryWin32 = class extends PathScurryBase {
10261
10244
  /**
10262
10245
  * @internal
10263
10246
  */
10264
- newRoot(fs5) {
10265
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs5 });
10247
+ newRoot(fs4) {
10248
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs4 });
10266
10249
  }
10267
10250
  /**
10268
10251
  * Return true if the provided path string is an absolute path
@@ -10290,8 +10273,8 @@ var PathScurryPosix = class extends PathScurryBase {
10290
10273
  /**
10291
10274
  * @internal
10292
10275
  */
10293
- newRoot(fs5) {
10294
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs5 });
10276
+ newRoot(fs4) {
10277
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs4 });
10295
10278
  }
10296
10279
  /**
10297
10280
  * Return true if the provided path string is an absolute path
@@ -10591,8 +10574,8 @@ var MatchRecord = class {
10591
10574
  }
10592
10575
  // match, absolute, ifdir
10593
10576
  entries() {
10594
- return [...this.store.entries()].map(([path4, n]) => [
10595
- path4,
10577
+ return [...this.store.entries()].map(([path3, n]) => [
10578
+ path3,
10596
10579
  !!(n & 2),
10597
10580
  !!(n & 1)
10598
10581
  ]);
@@ -10797,9 +10780,9 @@ var GlobUtil = class {
10797
10780
  signal;
10798
10781
  maxDepth;
10799
10782
  includeChildMatches;
10800
- constructor(patterns, path4, opts) {
10783
+ constructor(patterns, path3, opts) {
10801
10784
  this.patterns = patterns;
10802
- this.path = path4;
10785
+ this.path = path3;
10803
10786
  this.opts = opts;
10804
10787
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
10805
10788
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -10818,11 +10801,11 @@ var GlobUtil = class {
10818
10801
  });
10819
10802
  }
10820
10803
  }
10821
- #ignored(path4) {
10822
- return this.seen.has(path4) || !!this.#ignore?.ignored?.(path4);
10804
+ #ignored(path3) {
10805
+ return this.seen.has(path3) || !!this.#ignore?.ignored?.(path3);
10823
10806
  }
10824
- #childrenIgnored(path4) {
10825
- return !!this.#ignore?.childrenIgnored?.(path4);
10807
+ #childrenIgnored(path3) {
10808
+ return !!this.#ignore?.childrenIgnored?.(path3);
10826
10809
  }
10827
10810
  // backpressure mechanism
10828
10811
  pause() {
@@ -11037,8 +11020,8 @@ var GlobUtil = class {
11037
11020
  };
11038
11021
  var GlobWalker = class extends GlobUtil {
11039
11022
  matches = /* @__PURE__ */ new Set();
11040
- constructor(patterns, path4, opts) {
11041
- super(patterns, path4, opts);
11023
+ constructor(patterns, path3, opts) {
11024
+ super(patterns, path3, opts);
11042
11025
  }
11043
11026
  matchEmit(e) {
11044
11027
  this.matches.add(e);
@@ -11075,8 +11058,8 @@ var GlobWalker = class extends GlobUtil {
11075
11058
  };
11076
11059
  var GlobStream = class extends GlobUtil {
11077
11060
  results;
11078
- constructor(patterns, path4, opts) {
11079
- super(patterns, path4, opts);
11061
+ constructor(patterns, path3, opts) {
11062
+ super(patterns, path3, opts);
11080
11063
  this.results = new Minipass({
11081
11064
  signal: this.signal,
11082
11065
  objectMode: true
@@ -11375,28 +11358,6 @@ function readJsonFile(filename) {
11375
11358
  return JSON.parse(import_node_fs2.default.readFileSync(filename, "utf-8"));
11376
11359
  }
11377
11360
 
11378
- // src/utils/detect-monorepo-packages.ts
11379
- function detectMonorepoPackages(...pkgPaths) {
11380
- for (const pkgPath of pkgPaths) {
11381
- if (!import_fs2.default.existsSync(pkgPath)) {
11382
- continue;
11383
- }
11384
- const rootDir = import_node_path3.default.dirname(pkgPath);
11385
- const { workspaces } = readJsonFile(pkgPath);
11386
- if (!workspaces) {
11387
- continue;
11388
- }
11389
- return workspaces.map((it) => globSync(`${rootDir}/${it}/package.json`)).flat().map((filename) => {
11390
- return {
11391
- name: readJsonFile(filename).name,
11392
- pkgPath: filename,
11393
- srcPath: import_node_path3.default.resolve(import_node_path3.default.dirname(filename), "src")
11394
- };
11395
- });
11396
- }
11397
- return [];
11398
- }
11399
-
11400
11361
  // src/utils/detect-vue-major.ts
11401
11362
  var import_semver = __toESM(require_semver2());
11402
11363
  var import_vue = require("vue");
@@ -11573,11 +11534,6 @@ console.log(
11573
11534
  `v${packageJson.version} (Vue ${vueMajor})`
11574
11535
  );
11575
11536
  console.log();
11576
- var packages = detectMonorepoPackages("./package.json", "../../package.json");
11577
- var internalDependencies = detectInternalDependencies(
11578
- packages,
11579
- allDependencies
11580
- );
11581
11537
  var defaultPlugins = [
11582
11538
  indexHtmlPlugin(),
11583
11539
  packageJsonPlugin(),
@@ -11588,14 +11544,6 @@ var defaultPlugins = [
11588
11544
  var defaultConfig = {
11589
11545
  fk: {},
11590
11546
  plugins: defaultPlugins,
11591
- optimizeDeps: {
11592
- /**
11593
- * Vite treats monorepo packages as sourcecode and performs no prebundling by default.
11594
- * See https://vitejs.dev/guide/dep-pre-bundling.html#monorepos-and-linked-dependencies
11595
- */
11596
- include: internalDependencies.map((it) => it.name),
11597
- force: false
11598
- },
11599
11547
  build: {
11600
11548
  emptyOutDir: false,
11601
11549
  minify: false,
@@ -596,6 +596,7 @@ var require_re = __commonJS({
596
596
  var re = exports.re = [];
597
597
  var safeRe = exports.safeRe = [];
598
598
  var src2 = exports.src = [];
599
+ var safeSrc = exports.safeSrc = [];
599
600
  var t = exports.t = {};
600
601
  var R = 0;
601
602
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
@@ -616,6 +617,7 @@ var require_re = __commonJS({
616
617
  debug2(name, index, value);
617
618
  t[name] = index;
618
619
  src2[index] = value;
620
+ safeSrc[index] = safe;
619
621
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
620
622
  safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
621
623
  };
@@ -712,7 +714,7 @@ var require_semver = __commonJS({
712
714
  "node_modules/semver/classes/semver.js"(exports, module) {
713
715
  var debug2 = require_debug();
714
716
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
715
- var { safeRe: re, t } = require_re();
717
+ var { safeRe: re, safeSrc: src2, t } = require_re();
716
718
  var parseOptions = require_parse_options();
717
719
  var { compareIdentifiers } = require_identifiers();
718
720
  var SemVer = class _SemVer {
@@ -857,7 +859,8 @@ var require_semver = __commonJS({
857
859
  throw new Error("invalid increment argument: identifier is empty");
858
860
  }
859
861
  if (identifier) {
860
- const match2 = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]);
862
+ const r = new RegExp(`^${this.options.loose ? src2[t.PRERELEASELOOSE] : src2[t.PRERELEASE]}$`);
863
+ const match2 = `-${identifier}`.match(r);
861
864
  if (!match2 || match2[1] !== identifier) {
862
865
  throw new Error(`invalid identifier: ${identifier}`);
863
866
  }
@@ -2563,12 +2566,12 @@ var hash = (
2563
2566
  function getHash(text) {
2564
2567
  return hash("sha256", text, "hex").substring(0, 8);
2565
2568
  }
2566
- function slash(path5) {
2567
- const isExtendedLengthPath = path5.startsWith("\\\\?\\");
2569
+ function slash(path4) {
2570
+ const isExtendedLengthPath = path4.startsWith("\\\\?\\");
2568
2571
  if (isExtendedLengthPath) {
2569
- return path5;
2572
+ return path4;
2570
2573
  }
2571
- return path5.replace(/\\/g, "/");
2574
+ return path4.replace(/\\/g, "/");
2572
2575
  }
2573
2576
  function createRollupError(id, error) {
2574
2577
  const { message, name, stack } = error;
@@ -3004,16 +3007,16 @@ function parseAbsoluteUrl(input) {
3004
3007
  }
3005
3008
  function parseFileUrl(input) {
3006
3009
  const match2 = fileRegex.exec(input);
3007
- const path5 = match2[2];
3008
- return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path5) ? path5 : "/" + path5, match2[3] || "", match2[4] || "");
3010
+ const path4 = match2[2];
3011
+ return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path4) ? path4 : "/" + path4, match2[3] || "", match2[4] || "");
3009
3012
  }
3010
- function makeUrl(scheme, user, host, port, path5, query, hash2) {
3013
+ function makeUrl(scheme, user, host, port, path4, query, hash2) {
3011
3014
  return {
3012
3015
  scheme,
3013
3016
  user,
3014
3017
  host,
3015
3018
  port,
3016
- path: path5,
3019
+ path: path4,
3017
3020
  query,
3018
3021
  hash: hash2,
3019
3022
  type: 7
@@ -3043,11 +3046,11 @@ function parseUrl(input) {
3043
3046
  url.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
3044
3047
  return url;
3045
3048
  }
3046
- function stripPathFilename(path5) {
3047
- if (path5.endsWith("/.."))
3048
- return path5;
3049
- const index = path5.lastIndexOf("/");
3050
- return path5.slice(0, index + 1);
3049
+ function stripPathFilename(path4) {
3050
+ if (path4.endsWith("/.."))
3051
+ return path4;
3052
+ const index = path4.lastIndexOf("/");
3053
+ return path4.slice(0, index + 1);
3051
3054
  }
3052
3055
  function mergePaths(url, base) {
3053
3056
  normalizePath(base, base.type);
@@ -3085,14 +3088,14 @@ function normalizePath(url, type) {
3085
3088
  pieces[pointer++] = piece;
3086
3089
  positive++;
3087
3090
  }
3088
- let path5 = "";
3091
+ let path4 = "";
3089
3092
  for (let i = 1; i < pointer; i++) {
3090
- path5 += "/" + pieces[i];
3093
+ path4 += "/" + pieces[i];
3091
3094
  }
3092
- if (!path5 || addTrailingSlash && !path5.endsWith("/..")) {
3093
- path5 += "/";
3095
+ if (!path4 || addTrailingSlash && !path4.endsWith("/..")) {
3096
+ path4 += "/";
3094
3097
  }
3095
- url.path = path5;
3098
+ url.path = path4;
3096
3099
  }
3097
3100
  function resolve$1(input, base) {
3098
3101
  if (!input && !base)
@@ -3133,13 +3136,13 @@ function resolve$1(input, base) {
3133
3136
  case 3:
3134
3137
  return queryHash;
3135
3138
  case 4: {
3136
- const path5 = url.path.slice(1);
3137
- if (!path5)
3139
+ const path4 = url.path.slice(1);
3140
+ if (!path4)
3138
3141
  return queryHash || ".";
3139
- if (isRelative(base || input) && !isRelative(path5)) {
3140
- return "./" + path5 + queryHash;
3142
+ if (isRelative(base || input) && !isRelative(path4)) {
3143
+ return "./" + path4 + queryHash;
3141
3144
  }
3142
- return path5 + queryHash;
3145
+ return path4 + queryHash;
3143
3146
  }
3144
3147
  case 5:
3145
3148
  return url.path + queryHash;
@@ -3152,11 +3155,11 @@ function resolve(input, base) {
3152
3155
  base += "/";
3153
3156
  return resolve$1(input, base);
3154
3157
  }
3155
- function stripFilename(path5) {
3156
- if (!path5)
3158
+ function stripFilename(path4) {
3159
+ if (!path4)
3157
3160
  return "";
3158
- const index = path5.lastIndexOf("/");
3159
- return path5.slice(0, index + 1);
3161
+ const index = path4.lastIndexOf("/");
3162
+ return path4.slice(0, index + 1);
3160
3163
  }
3161
3164
  var COLUMN$1 = 0;
3162
3165
  function maybeSort(mappings, owned) {
@@ -5048,26 +5051,6 @@ function packageJsonPlugin() {
5048
5051
  };
5049
5052
  }
5050
5053
 
5051
- // src/utils/detect-internal-dependencies.ts
5052
- function detectInternalDependencies(packages2, dependencies2) {
5053
- const internal = packages2.filter((pkg) => dependencies2.includes(pkg.name));
5054
- const num = internal.length;
5055
- console.group("Detecting monorepo dependencies:");
5056
- if (num > 0) {
5057
- const ies = num === 1 ? "y" : "ies";
5058
- console.log(`${num} internal dependenc${ies} found.
5059
- `);
5060
- } else {
5061
- console.log("No internal dependencies found");
5062
- }
5063
- console.groupEnd();
5064
- return internal;
5065
- }
5066
-
5067
- // src/utils/detect-monorepo-packages.ts
5068
- import fs5 from "fs";
5069
- import path4 from "node:path";
5070
-
5071
5054
  // node_modules/glob/node_modules/minimatch/dist/esm/index.js
5072
5055
  var import_brace_expansion = __toESM(require_brace_expansion(), 1);
5073
5056
 
@@ -8825,12 +8808,12 @@ var PathBase = class {
8825
8808
  /**
8826
8809
  * Get the Path object referenced by the string path, resolved from this Path
8827
8810
  */
8828
- resolve(path5) {
8829
- if (!path5) {
8811
+ resolve(path4) {
8812
+ if (!path4) {
8830
8813
  return this;
8831
8814
  }
8832
- const rootPath = this.getRootString(path5);
8833
- const dir = path5.substring(rootPath.length);
8815
+ const rootPath = this.getRootString(path4);
8816
+ const dir = path4.substring(rootPath.length);
8834
8817
  const dirParts = dir.split(this.splitSep);
8835
8818
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
8836
8819
  return result;
@@ -9582,8 +9565,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
9582
9565
  /**
9583
9566
  * @internal
9584
9567
  */
9585
- getRootString(path5) {
9586
- return win32.parse(path5).root;
9568
+ getRootString(path4) {
9569
+ return win32.parse(path4).root;
9587
9570
  }
9588
9571
  /**
9589
9572
  * @internal
@@ -9629,8 +9612,8 @@ var PathPosix = class _PathPosix extends PathBase {
9629
9612
  /**
9630
9613
  * @internal
9631
9614
  */
9632
- getRootString(path5) {
9633
- return path5.startsWith("/") ? "/" : "";
9615
+ getRootString(path4) {
9616
+ return path4.startsWith("/") ? "/" : "";
9634
9617
  }
9635
9618
  /**
9636
9619
  * @internal
@@ -9679,8 +9662,8 @@ var PathScurryBase = class {
9679
9662
  *
9680
9663
  * @internal
9681
9664
  */
9682
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs6 = defaultFS } = {}) {
9683
- this.#fs = fsFromOption(fs6);
9665
+ constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs5 = defaultFS } = {}) {
9666
+ this.#fs = fsFromOption(fs5);
9684
9667
  if (cwd instanceof URL || cwd.startsWith("file://")) {
9685
9668
  cwd = fileURLToPath(cwd);
9686
9669
  }
@@ -9719,11 +9702,11 @@ var PathScurryBase = class {
9719
9702
  /**
9720
9703
  * Get the depth of a provided path, string, or the cwd
9721
9704
  */
9722
- depth(path5 = this.cwd) {
9723
- if (typeof path5 === "string") {
9724
- path5 = this.cwd.resolve(path5);
9705
+ depth(path4 = this.cwd) {
9706
+ if (typeof path4 === "string") {
9707
+ path4 = this.cwd.resolve(path4);
9725
9708
  }
9726
- return path5.depth();
9709
+ return path4.depth();
9727
9710
  }
9728
9711
  /**
9729
9712
  * Return the cache of child entries. Exposed so subclasses can create
@@ -10210,9 +10193,9 @@ var PathScurryBase = class {
10210
10193
  process2();
10211
10194
  return results;
10212
10195
  }
10213
- chdir(path5 = this.cwd) {
10196
+ chdir(path4 = this.cwd) {
10214
10197
  const oldCwd = this.cwd;
10215
- this.cwd = typeof path5 === "string" ? this.cwd.resolve(path5) : path5;
10198
+ this.cwd = typeof path4 === "string" ? this.cwd.resolve(path4) : path4;
10216
10199
  this.cwd[setAsCwd](oldCwd);
10217
10200
  }
10218
10201
  };
@@ -10238,8 +10221,8 @@ var PathScurryWin32 = class extends PathScurryBase {
10238
10221
  /**
10239
10222
  * @internal
10240
10223
  */
10241
- newRoot(fs6) {
10242
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs6 });
10224
+ newRoot(fs5) {
10225
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs5 });
10243
10226
  }
10244
10227
  /**
10245
10228
  * Return true if the provided path string is an absolute path
@@ -10267,8 +10250,8 @@ var PathScurryPosix = class extends PathScurryBase {
10267
10250
  /**
10268
10251
  * @internal
10269
10252
  */
10270
- newRoot(fs6) {
10271
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs6 });
10253
+ newRoot(fs5) {
10254
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs5 });
10272
10255
  }
10273
10256
  /**
10274
10257
  * Return true if the provided path string is an absolute path
@@ -10568,8 +10551,8 @@ var MatchRecord = class {
10568
10551
  }
10569
10552
  // match, absolute, ifdir
10570
10553
  entries() {
10571
- return [...this.store.entries()].map(([path5, n]) => [
10572
- path5,
10554
+ return [...this.store.entries()].map(([path4, n]) => [
10555
+ path4,
10573
10556
  !!(n & 2),
10574
10557
  !!(n & 1)
10575
10558
  ]);
@@ -10774,9 +10757,9 @@ var GlobUtil = class {
10774
10757
  signal;
10775
10758
  maxDepth;
10776
10759
  includeChildMatches;
10777
- constructor(patterns, path5, opts) {
10760
+ constructor(patterns, path4, opts) {
10778
10761
  this.patterns = patterns;
10779
- this.path = path5;
10762
+ this.path = path4;
10780
10763
  this.opts = opts;
10781
10764
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
10782
10765
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -10795,11 +10778,11 @@ var GlobUtil = class {
10795
10778
  });
10796
10779
  }
10797
10780
  }
10798
- #ignored(path5) {
10799
- return this.seen.has(path5) || !!this.#ignore?.ignored?.(path5);
10781
+ #ignored(path4) {
10782
+ return this.seen.has(path4) || !!this.#ignore?.ignored?.(path4);
10800
10783
  }
10801
- #childrenIgnored(path5) {
10802
- return !!this.#ignore?.childrenIgnored?.(path5);
10784
+ #childrenIgnored(path4) {
10785
+ return !!this.#ignore?.childrenIgnored?.(path4);
10803
10786
  }
10804
10787
  // backpressure mechanism
10805
10788
  pause() {
@@ -11014,8 +10997,8 @@ var GlobUtil = class {
11014
10997
  };
11015
10998
  var GlobWalker = class extends GlobUtil {
11016
10999
  matches = /* @__PURE__ */ new Set();
11017
- constructor(patterns, path5, opts) {
11018
- super(patterns, path5, opts);
11000
+ constructor(patterns, path4, opts) {
11001
+ super(patterns, path4, opts);
11019
11002
  }
11020
11003
  matchEmit(e) {
11021
11004
  this.matches.add(e);
@@ -11052,8 +11035,8 @@ var GlobWalker = class extends GlobUtil {
11052
11035
  };
11053
11036
  var GlobStream = class extends GlobUtil {
11054
11037
  results;
11055
- constructor(patterns, path5, opts) {
11056
- super(patterns, path5, opts);
11038
+ constructor(patterns, path4, opts) {
11039
+ super(patterns, path4, opts);
11057
11040
  this.results = new Minipass({
11058
11041
  signal: this.signal,
11059
11042
  objectMode: true
@@ -11352,28 +11335,6 @@ function readJsonFile(filename) {
11352
11335
  return JSON.parse(fs4.readFileSync(filename, "utf-8"));
11353
11336
  }
11354
11337
 
11355
- // src/utils/detect-monorepo-packages.ts
11356
- function detectMonorepoPackages(...pkgPaths) {
11357
- for (const pkgPath of pkgPaths) {
11358
- if (!fs5.existsSync(pkgPath)) {
11359
- continue;
11360
- }
11361
- const rootDir = path4.dirname(pkgPath);
11362
- const { workspaces } = readJsonFile(pkgPath);
11363
- if (!workspaces) {
11364
- continue;
11365
- }
11366
- return workspaces.map((it) => globSync(`${rootDir}/${it}/package.json`)).flat().map((filename) => {
11367
- return {
11368
- name: readJsonFile(filename).name,
11369
- pkgPath: filename,
11370
- srcPath: path4.resolve(path4.dirname(filename), "src")
11371
- };
11372
- });
11373
- }
11374
- return [];
11375
- }
11376
-
11377
11338
  // src/utils/detect-vue-major.ts
11378
11339
  var import_semver = __toESM(require_semver2());
11379
11340
  import { version as version2 } from "vue";
@@ -11552,11 +11513,6 @@ console.log(
11552
11513
  `v${packageJson.version} (Vue ${vueMajor})`
11553
11514
  );
11554
11515
  console.log();
11555
- var packages = detectMonorepoPackages("./package.json", "../../package.json");
11556
- var internalDependencies = detectInternalDependencies(
11557
- packages,
11558
- allDependencies
11559
- );
11560
11516
  var defaultPlugins = [
11561
11517
  indexHtmlPlugin(),
11562
11518
  packageJsonPlugin(),
@@ -11567,14 +11523,6 @@ var defaultPlugins = [
11567
11523
  var defaultConfig = {
11568
11524
  fk: {},
11569
11525
  plugins: defaultPlugins,
11570
- optimizeDeps: {
11571
- /**
11572
- * Vite treats monorepo packages as sourcecode and performs no prebundling by default.
11573
- * See https://vitejs.dev/guide/dep-pre-bundling.html#monorepos-and-linked-dependencies
11574
- */
11575
- include: internalDependencies.map((it) => it.name),
11576
- force: false
11577
- },
11578
11526
  build: {
11579
11527
  emptyOutDir: false,
11580
11528
  minify: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/vite-lib-config",
3
- "version": "3.4.1",
3
+ "version": "3.4.3",
4
4
  "description": "Försäkringskassan toolchain to build libraries with Vite",
5
5
  "keywords": [
6
6
  "vite"
@@ -42,7 +42,7 @@
42
42
  "dist"
43
43
  ],
44
44
  "dependencies": {
45
- "@microsoft/api-extractor": "7.49.2",
45
+ "@microsoft/api-extractor": "7.50.0",
46
46
  "@vue/babel-preset-app": "5.0.8"
47
47
  },
48
48
  "peerDependencies": {