@forsakringskassan/vite-lib-config 5.13.2 → 5.13.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.
@@ -4743,7 +4743,7 @@ var import_node_path = __toESM(require("node:path"), 1);
4743
4743
  var import_node_crypto = __toESM(require("node:crypto"), 1);
4744
4744
  var import_node_tty = require("node:tty");
4745
4745
  var import_node_util = require("node:util");
4746
- var version = "6.0.9";
4746
+ var version = "6.0.10";
4747
4747
  function resolveCompiler(root) {
4748
4748
  const compiler = tryResolveCompiler(root) || tryResolveCompiler();
4749
4749
  if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
@@ -4971,7 +4971,7 @@ function resolveTemplateCompilerOptions(descriptor, options, filename, ssr) {
4971
4971
  function canReuseAST(version3) {
4972
4972
  if (version3) {
4973
4973
  const [_2, minor, patch] = version3.split(".").map(Number);
4974
- if (minor >= 4 && patch >= 3) return true;
4974
+ if (minor > 4 || minor === 4 && patch >= 3) return true;
4975
4975
  }
4976
4976
  return false;
4977
4977
  }
@@ -5012,7 +5012,7 @@ function resolveScript(descriptor, options, ssr, customElement) {
5012
5012
  sourceMap: options.sourceMap,
5013
5013
  genDefaultAs: canInlineMain(descriptor, options) ? scriptIdentifier : void 0,
5014
5014
  customElement,
5015
- vapor: isVaporMode(descriptor, options),
5015
+ vapor: !!descriptor.scriptSetup && isVaporMode(descriptor, options),
5016
5016
  propsDestructure: options.features?.propsDestructure ?? options.script?.propsDestructure
5017
5017
  });
5018
5018
  if (!options.isProduction && resolved?.deps) {
@@ -10940,10 +10940,10 @@ function babelPlugin() {
10940
10940
  if (!transformed) {
10941
10941
  return null;
10942
10942
  }
10943
- const { code: code2, map } = transformed;
10943
+ const { code: code2, map = null } = transformed;
10944
10944
  return {
10945
10945
  code: code2 ?? src,
10946
- map: map ?? null
10946
+ map
10947
10947
  };
10948
10948
  }
10949
10949
  };
@@ -4735,7 +4735,7 @@ import path from "node:path";
4735
4735
  import crypto from "node:crypto";
4736
4736
  import { isatty } from "node:tty";
4737
4737
  import { formatWithOptions, inspect } from "node:util";
4738
- var version = "6.0.9";
4738
+ var version = "6.0.10";
4739
4739
  function resolveCompiler(root) {
4740
4740
  const compiler = tryResolveCompiler(root) || tryResolveCompiler();
4741
4741
  if (!compiler) throw new Error("Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.25) to be present in the dependency tree.");
@@ -4963,7 +4963,7 @@ function resolveTemplateCompilerOptions(descriptor, options, filename, ssr) {
4963
4963
  function canReuseAST(version3) {
4964
4964
  if (version3) {
4965
4965
  const [_2, minor, patch] = version3.split(".").map(Number);
4966
- if (minor >= 4 && patch >= 3) return true;
4966
+ if (minor > 4 || minor === 4 && patch >= 3) return true;
4967
4967
  }
4968
4968
  return false;
4969
4969
  }
@@ -5004,7 +5004,7 @@ function resolveScript(descriptor, options, ssr, customElement) {
5004
5004
  sourceMap: options.sourceMap,
5005
5005
  genDefaultAs: canInlineMain(descriptor, options) ? scriptIdentifier : void 0,
5006
5006
  customElement,
5007
- vapor: isVaporMode(descriptor, options),
5007
+ vapor: !!descriptor.scriptSetup && isVaporMode(descriptor, options),
5008
5008
  propsDestructure: options.features?.propsDestructure ?? options.script?.propsDestructure
5009
5009
  });
5010
5010
  if (!options.isProduction && resolved?.deps) {
@@ -10932,10 +10932,10 @@ function babelPlugin() {
10932
10932
  if (!transformed) {
10933
10933
  return null;
10934
10934
  }
10935
- const { code: code2, map } = transformed;
10935
+ const { code: code2, map = null } = transformed;
10936
10936
  return {
10937
10937
  code: code2 ?? src,
10938
- map: map ?? null
10938
+ map
10939
10939
  };
10940
10940
  }
10941
10941
  };
@@ -813,8 +813,11 @@ function updateBuildScripts(pkg, options) {
813
813
  return result;
814
814
  }
815
815
  async function writeBuildScripts(cwd, options) {
816
- const result = await readJsonFile(cwd, "package.json");
817
- const { data: pkg, indent, trailer } = result;
816
+ const {
817
+ data: pkg,
818
+ indent,
819
+ trailer
820
+ } = await readJsonFile(cwd, "package.json");
818
821
  const updated = JSON.stringify(
819
822
  updateBuildScripts(pkg, options),
820
823
  void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/vite-lib-config",
3
- "version": "5.13.2",
3
+ "version": "5.13.4",
4
4
  "description": "Försäkringskassan toolchain to build libraries with Vite",
5
5
  "keywords": [
6
6
  "vite"