nuxt-nightly 4.2.3-29430410.6b7fc747 → 4.2.3-29430444.708dbe51

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 +40 -57
  2. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -3837,7 +3837,7 @@ function addDeclarationTemplates(ctx, options) {
3837
3837
  });
3838
3838
  }
3839
3839
 
3840
- const version = "4.2.3-29430410.6b7fc747";
3840
+ const version = "4.2.3-29430444.708dbe51";
3841
3841
 
3842
3842
  function createImportProtectionPatterns(nuxt, options) {
3843
3843
  const patterns = [];
@@ -4013,7 +4013,6 @@ const DevOnlyPlugin = (options) => createUnplugin(() => {
4013
4013
 
4014
4014
  const ALIAS_RE = /(?<=['"])[~@]{1,2}(?=\/)/g;
4015
4015
  const ALIAS_RE_SINGLE = /(?<=['"])[~@]{1,2}(?=\/)/;
4016
- const ALIAS_ID_RE = /^[~@]{1,2}\//;
4017
4016
  const LayerAliasingPlugin = (options) => createUnplugin((_options, meta) => {
4018
4017
  const aliases = {};
4019
4018
  for (const layer of options.layers) {
@@ -4057,9 +4056,6 @@ const LayerAliasingPlugin = (options) => createUnplugin((_options, meta) => {
4057
4056
  vite: {
4058
4057
  resolveId: {
4059
4058
  order: "pre",
4060
- filter: {
4061
- id: ALIAS_ID_RE
4062
- },
4063
4059
  async handler(id, importer) {
4064
4060
  if (!importer) {
4065
4061
  return;
@@ -4599,50 +4595,39 @@ function ResolveDeepImportsPlugin(nuxt) {
4599
4595
  return {
4600
4596
  name: "nuxt:resolve-bare-imports",
4601
4597
  enforce: "post",
4602
- resolveId: {
4603
- filter: {
4604
- id: {
4605
- exclude: [
4606
- // absolute path
4607
- /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,
4608
- ...exclude.map((e) => new RegExp("^" + escapeRE(e)))
4609
- ]
4610
- }
4611
- },
4612
- async handler(id, importer) {
4613
- if (!importer || !isAbsolute(importer) && !VIRTUAL_RE.test(importer)) {
4614
- return;
4615
- }
4616
- const normalisedId = resolveAlias$1(normalize(id), nuxt.options.alias);
4617
- const isNuxtTemplate = importer.startsWith("virtual:nuxt");
4618
- const normalisedImporter = (isNuxtTemplate ? decodeURIComponent(importer) : importer).replace(VIRTUAL_RE, "");
4619
- if (nuxt.options.experimental.templateImportResolution !== false && isNuxtTemplate) {
4620
- const template = nuxt.options.build.templates.find((t) => resolve(nuxt.options.buildDir, t.filename) === normalisedImporter);
4621
- if (template?._path) {
4622
- const res2 = await this.resolve?.(normalisedId, template._path, { skipSelf: true });
4623
- if (res2 !== void 0 && res2 !== null) {
4624
- return res2;
4625
- }
4598
+ async resolveId(id, importer) {
4599
+ if (!importer || isAbsolute(id) || !isAbsolute(importer) && !VIRTUAL_RE.test(importer) || exclude.some((e) => id.startsWith(e))) {
4600
+ return;
4601
+ }
4602
+ const normalisedId = resolveAlias$1(normalize(id), nuxt.options.alias);
4603
+ const isNuxtTemplate = importer.startsWith("virtual:nuxt");
4604
+ const normalisedImporter = (isNuxtTemplate ? decodeURIComponent(importer) : importer).replace(VIRTUAL_RE, "");
4605
+ if (nuxt.options.experimental.templateImportResolution !== false && isNuxtTemplate) {
4606
+ const template = nuxt.options.build.templates.find((t) => resolve(nuxt.options.buildDir, t.filename) === normalisedImporter);
4607
+ if (template?._path) {
4608
+ const res2 = await this.resolve?.(normalisedId, template._path, { skipSelf: true });
4609
+ if (res2 !== void 0 && res2 !== null) {
4610
+ return res2;
4626
4611
  }
4627
4612
  }
4628
- const dir = parseNodeModulePath(normalisedImporter).dir || pkgDir;
4629
- const res = await this.resolve?.(normalisedId, dir, { skipSelf: true });
4630
- if (res !== void 0 && res !== null) {
4631
- return res;
4632
- }
4633
- const environmentConditions = conditions[this.environment.name] ||= resolveConditions(this.environment);
4634
- const path = resolveModulePath(id, {
4635
- from: [dir, ...nuxt.options.modulesDir].map((d) => directoryToURL(d)),
4636
- suffixes: ["", "index"],
4637
- conditions: environmentConditions,
4638
- try: true
4639
- });
4640
- if (!path) {
4641
- logger.debug("Could not resolve id", id, importer);
4642
- return null;
4643
- }
4644
- return normalize(path);
4645
4613
  }
4614
+ const dir = parseNodeModulePath(normalisedImporter).dir || pkgDir;
4615
+ const res = await this.resolve?.(normalisedId, dir, { skipSelf: true });
4616
+ if (res !== void 0 && res !== null) {
4617
+ return res;
4618
+ }
4619
+ const environmentConditions = conditions[this.environment.name] ||= resolveConditions(this.environment);
4620
+ const path = resolveModulePath(id, {
4621
+ from: [dir, ...nuxt.options.modulesDir].map((d) => directoryToURL(d)),
4622
+ suffixes: ["", "index"],
4623
+ conditions: environmentConditions,
4624
+ try: true
4625
+ });
4626
+ if (!path) {
4627
+ logger.debug("Could not resolve id", id, importer);
4628
+ return null;
4629
+ }
4630
+ return normalize(path);
4646
4631
  }
4647
4632
  };
4648
4633
  }
@@ -4970,17 +4955,15 @@ const VirtualFSPlugin = (nuxt, options) => createUnplugin((_, meta) => {
4970
4955
  }
4971
4956
  }
4972
4957
  },
4973
- load: {
4974
- filter: {
4975
- id: PREFIX_RE
4976
- },
4977
- handler(id) {
4978
- const key = withoutQuery(withoutPrefix(decodeURIComponent(id)));
4979
- return {
4980
- code: nuxt.vfs[key] || "",
4981
- map: null
4982
- };
4983
- }
4958
+ loadInclude(id) {
4959
+ return PREFIX_RE.test(id) && withoutQuery(withoutPrefix(decodeURIComponent(id))) in nuxt.vfs;
4960
+ },
4961
+ load(id) {
4962
+ const key = withoutQuery(withoutPrefix(decodeURIComponent(id)));
4963
+ return {
4964
+ code: nuxt.vfs[key] || "",
4965
+ map: null
4966
+ };
4984
4967
  }
4985
4968
  };
4986
4969
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-nightly",
3
- "version": "4.2.3-29430410.6b7fc747",
3
+ "version": "4.2.3-29430444.708dbe51",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -67,11 +67,11 @@
67
67
  "@dxup/nuxt": "^0.2.2",
68
68
  "@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
69
69
  "@nuxt/devtools": "^3.1.1",
70
- "@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.3-29430410.6b7fc747",
71
- "@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.3-29430410.6b7fc747",
72
- "@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.3-29430410.6b7fc747",
70
+ "@nuxt/kit": "npm:@nuxt/kit-nightly@4.2.3-29430444.708dbe51",
71
+ "@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.2.3-29430444.708dbe51",
72
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@4.2.3-29430444.708dbe51",
73
73
  "@nuxt/telemetry": "^2.6.6",
74
- "@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.3-29430410.6b7fc747",
74
+ "@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.2.3-29430444.708dbe51",
75
75
  "@unhead/vue": "^2.0.19",
76
76
  "@vue/shared": "^3.5.25",
77
77
  "c12": "^3.3.2",