@vizejs/nuxt 0.668.0 → 0.670.0

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/index.mjs +10 -5
  2. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -885,16 +885,21 @@ const NUXT_VUE_TYPE_GATED_TRANSFORMS = new Set([
885
885
  "unctx:transform",
886
886
  "nuxt:tree-shake-composables:transform",
887
887
  "nuxt:vue-async-context",
888
- "nuxt:prehydrate-transform"
888
+ "nuxt:prehydrate-transform",
889
+ "nuxt:navigate-to-early-return"
889
890
  ]);
890
891
  /** The id Vize gives a compiled SFC module (`Foo.vue?vue&vize`). */
891
892
  const VIZE_VUE_MODULE_ID_RE = /\.vue\?vue&vize(?:-ssr)?(?:&|$)/;
892
- /** Give Nuxt's `isVue(type)` gate a script identity while the plugin runs. */
893
+ /**
894
+ * Give Nuxt's `isVue(type)` gate a script identity while the plugin runs, in
895
+ * @vitejs/plugin-vue's shape: Nuxt 4.6's gates match `vue&type=script` with the
896
+ * two keys adjacent (`/[?&]vue&type=script\b/`).
897
+ */
893
898
  function toNuxtVueTransformId(id) {
894
899
  if (!isVizeGeneratedVueModuleId(id)) return id;
895
- const hasQuery = id.includes("?");
896
- const hasVueMarker = /[?&]vue(?:[=&]|$)/.test(id);
897
- return id + `${hasQuery ? "&" : "?"}${hasVueMarker ? "" : "vue&"}type=script`;
900
+ const marker = /([?&])vue=?(?=&|$)/;
901
+ if (marker.test(id)) return id.replace(marker, "$1vue&type=script");
902
+ return `${id}${id.includes("?") ? "&" : "?"}vue&type=script`;
898
903
  }
899
904
  function isFilterPatternList(value) {
900
905
  return typeof value === "string" || value instanceof RegExp || Array.isArray(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizejs/nuxt",
3
- "version": "0.668.0",
3
+ "version": "0.670.0",
4
4
  "description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
5
5
  "keywords": [
6
6
  "compiler",
@@ -49,15 +49,15 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@nuxt/kit": "3.21.8",
52
- "@vizejs/native": "0.668.0",
53
- "@vizejs/nuxt-lint-config": "0.668.0",
54
- "@vizejs/vite-plugin": "0.668.0",
55
- "@vizejs/vite-plugin-musea": "0.668.0",
56
- "vize": "0.668.0"
52
+ "@vizejs/native": "0.670.0",
53
+ "@vizejs/nuxt-lint-config": "0.670.0",
54
+ "@vizejs/vite-plugin": "0.670.0",
55
+ "@vizejs/vite-plugin-musea": "0.670.0",
56
+ "vize": "0.670.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "jiti-nuxt2": "npm:jiti@1.21.7",
60
- "oxlint-plugin-vize": "0.668.0",
60
+ "oxlint-plugin-vize": "0.670.0",
61
61
  "typescript": "6.0.3",
62
62
  "vite": "npm:@voidzero-dev/vite-plus-core@1.3.0",
63
63
  "vite-plus": "1.3.0",