nuxt-nightly 4.3.0-29437273.f9c092c5 → 4.3.0-29439165.ec1da219
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.
- package/dist/index.mjs +11 -156
- package/meta.d.mts +1 -0
- package/meta.mjs +18 -0
- package/package.json +7 -5
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { AsyncLocalStorage } from 'node:async_hooks';
|
|
|
6
6
|
import { dirname, resolve, normalize, basename, extname, relative, isAbsolute, join } from 'pathe';
|
|
7
7
|
import { createHooks, createDebugger } from 'hookable';
|
|
8
8
|
import ignore from 'ignore';
|
|
9
|
-
import { useLogger, tryUseNuxt, useNuxt, directoryToURL, getLayerDirectories, resolveFiles, resolvePath, defineNuxtModule, findPath, addPlugin, addTemplate, addTypeTemplate, addComponent, useNitro, addBuildPlugin, isIgnored, resolveAlias as resolveAlias$1, addPluginTemplate, addImportsSources, addVitePlugin, createIsIgnored, updateTemplates, tryResolveModule, normalizeModuleTranspilePath, importModule, createResolver,
|
|
9
|
+
import { useLogger, tryUseNuxt, useNuxt, directoryToURL, getLayerDirectories, resolveFiles, resolvePath, defineNuxtModule, findPath, addPlugin, addTemplate, addTypeTemplate, addComponent, useNitro, addBuildPlugin, isIgnored, resolveAlias as resolveAlias$1, addPluginTemplate, addImportsSources, addVitePlugin, createIsIgnored, updateTemplates, tryResolveModule, normalizeModuleTranspilePath, importModule, createResolver, runWithNuxtContext, nuxtCtx, loadNuxtConfig, installModules, resolveIgnorePatterns, addRouteMiddleware, resolveModuleWithOptions, normalizeTemplate, normalizePlugin } from '@nuxt/kit';
|
|
10
10
|
import { resolvePackageJSON, readPackage, readPackageJSON } from 'pkg-types';
|
|
11
11
|
import { hash, isEqual, serialize } from 'ohash';
|
|
12
12
|
import { consola } from 'consola';
|
|
@@ -3880,7 +3880,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3880
3880
|
});
|
|
3881
3881
|
}
|
|
3882
3882
|
|
|
3883
|
-
const version = "4.3.0-
|
|
3883
|
+
const version = "4.3.0-29439165.ec1da219";
|
|
3884
3884
|
const pkg = {
|
|
3885
3885
|
version: version};
|
|
3886
3886
|
|
|
@@ -4631,155 +4631,6 @@ function detectImportNames(code, composableMeta) {
|
|
|
4631
4631
|
return names;
|
|
4632
4632
|
}
|
|
4633
4633
|
|
|
4634
|
-
const VIRTUAL_RE = /^\0?virtual:(?:nuxt:)?/;
|
|
4635
|
-
function ResolveDeepImportsPlugin(nuxt) {
|
|
4636
|
-
const exclude = ["virtual:", "\0virtual:", "/__skip_vite", "@vitest/"];
|
|
4637
|
-
const conditions = {};
|
|
4638
|
-
function resolveConditions(environment) {
|
|
4639
|
-
const resolvedConditions = /* @__PURE__ */ new Set([nuxt.options.dev ? "development" : "production", ...environment.config.resolve.conditions]);
|
|
4640
|
-
if (resolvedConditions.has("browser")) {
|
|
4641
|
-
resolvedConditions.add("web");
|
|
4642
|
-
resolvedConditions.add("import");
|
|
4643
|
-
resolvedConditions.add("module");
|
|
4644
|
-
resolvedConditions.add("default");
|
|
4645
|
-
}
|
|
4646
|
-
if (environment.config.mode === "test") {
|
|
4647
|
-
resolvedConditions.add("import");
|
|
4648
|
-
resolvedConditions.add("require");
|
|
4649
|
-
}
|
|
4650
|
-
return [...resolvedConditions];
|
|
4651
|
-
}
|
|
4652
|
-
return {
|
|
4653
|
-
name: "nuxt:resolve-bare-imports",
|
|
4654
|
-
enforce: "post",
|
|
4655
|
-
resolveId: {
|
|
4656
|
-
filter: {
|
|
4657
|
-
id: {
|
|
4658
|
-
exclude: [
|
|
4659
|
-
// absolute path
|
|
4660
|
-
/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,
|
|
4661
|
-
...exclude.map((e) => new RegExp("^" + escapeRE(e)))
|
|
4662
|
-
]
|
|
4663
|
-
}
|
|
4664
|
-
},
|
|
4665
|
-
async handler(id, importer) {
|
|
4666
|
-
if (!importer || !isAbsolute(importer) && !VIRTUAL_RE.test(importer)) {
|
|
4667
|
-
return;
|
|
4668
|
-
}
|
|
4669
|
-
const normalisedId = resolveAlias$1(normalize(id), nuxt.options.alias);
|
|
4670
|
-
const isNuxtTemplate = importer.startsWith("virtual:nuxt");
|
|
4671
|
-
const normalisedImporter = (isNuxtTemplate ? decodeURIComponent(importer) : importer).replace(VIRTUAL_RE, "");
|
|
4672
|
-
if (nuxt.options.experimental.templateImportResolution !== false && isNuxtTemplate) {
|
|
4673
|
-
const template = nuxt.options.build.templates.find((t) => resolve(nuxt.options.buildDir, t.filename) === normalisedImporter);
|
|
4674
|
-
if (template?._path) {
|
|
4675
|
-
const res2 = await this.resolve?.(normalisedId, template._path, { skipSelf: true });
|
|
4676
|
-
if (res2 !== void 0 && res2 !== null) {
|
|
4677
|
-
return res2;
|
|
4678
|
-
}
|
|
4679
|
-
}
|
|
4680
|
-
}
|
|
4681
|
-
const dir = parseNodeModulePath(normalisedImporter).dir || pkgDir;
|
|
4682
|
-
const res = await this.resolve?.(normalisedId, dir, { skipSelf: true });
|
|
4683
|
-
if (res !== void 0 && res !== null) {
|
|
4684
|
-
return res;
|
|
4685
|
-
}
|
|
4686
|
-
const environmentConditions = conditions[this.environment.name] ||= resolveConditions(this.environment);
|
|
4687
|
-
const path = resolveModulePath(id, {
|
|
4688
|
-
from: [dir, ...nuxt.options.modulesDir].map((d) => directoryToURL(d)),
|
|
4689
|
-
suffixes: ["", "index"],
|
|
4690
|
-
conditions: environmentConditions,
|
|
4691
|
-
try: true
|
|
4692
|
-
});
|
|
4693
|
-
if (!path) {
|
|
4694
|
-
logger.debug("Could not resolve id", id, importer);
|
|
4695
|
-
return null;
|
|
4696
|
-
}
|
|
4697
|
-
return normalize(path);
|
|
4698
|
-
}
|
|
4699
|
-
}
|
|
4700
|
-
};
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
|
-
const runtimeDependencies = [
|
|
4704
|
-
// other deps
|
|
4705
|
-
"devalue",
|
|
4706
|
-
"klona",
|
|
4707
|
-
// unjs ecosystem
|
|
4708
|
-
"defu",
|
|
4709
|
-
"ufo",
|
|
4710
|
-
"h3",
|
|
4711
|
-
"destr",
|
|
4712
|
-
"consola",
|
|
4713
|
-
"hookable",
|
|
4714
|
-
"unctx",
|
|
4715
|
-
"cookie-es",
|
|
4716
|
-
"perfect-debounce",
|
|
4717
|
-
"ohash",
|
|
4718
|
-
"pathe",
|
|
4719
|
-
"uncrypto"
|
|
4720
|
-
];
|
|
4721
|
-
|
|
4722
|
-
function ResolveExternalsPlugin(nuxt) {
|
|
4723
|
-
let external = /* @__PURE__ */ new Set();
|
|
4724
|
-
const nitro = useNitro();
|
|
4725
|
-
return {
|
|
4726
|
-
name: "nuxt:resolve-externals",
|
|
4727
|
-
enforce: "pre",
|
|
4728
|
-
async config() {
|
|
4729
|
-
const { runtimeDependencies: runtimeNitroDependencies = [] } = await tryImportModule("nitropack/runtime/meta", {
|
|
4730
|
-
url: new URL(import.meta.url)
|
|
4731
|
-
}) || {};
|
|
4732
|
-
external = /* @__PURE__ */ new Set([
|
|
4733
|
-
// explicit dependencies we use in our ssr renderer - these can be inlined (if necessary) in the nitro build
|
|
4734
|
-
"unhead",
|
|
4735
|
-
"@unhead/vue",
|
|
4736
|
-
"@nuxt/devalue",
|
|
4737
|
-
"rou3",
|
|
4738
|
-
"unstorage",
|
|
4739
|
-
// ensure we only have one version of vue if nitro is going to inline anyway
|
|
4740
|
-
...nitro.options.inlineDynamicImports ? ["vue", "@vue/server-renderer"] : [],
|
|
4741
|
-
...runtimeDependencies,
|
|
4742
|
-
// dependencies we might share with nitro - these can be inlined (if necessary) in the nitro build
|
|
4743
|
-
...runtimeNitroDependencies
|
|
4744
|
-
]);
|
|
4745
|
-
return {
|
|
4746
|
-
optimizeDeps: {
|
|
4747
|
-
exclude: Array.from(external)
|
|
4748
|
-
}
|
|
4749
|
-
};
|
|
4750
|
-
},
|
|
4751
|
-
applyToEnvironment(environment) {
|
|
4752
|
-
if (nuxt.options.dev || environment.name !== "ssr") {
|
|
4753
|
-
return false;
|
|
4754
|
-
}
|
|
4755
|
-
return {
|
|
4756
|
-
name: "nuxt:resolve-externals:external",
|
|
4757
|
-
resolveId: {
|
|
4758
|
-
filter: {
|
|
4759
|
-
id: [...external].map((dep) => new RegExp("^" + escapeRE(dep) + "$"))
|
|
4760
|
-
},
|
|
4761
|
-
async handler(id, importer) {
|
|
4762
|
-
const res = await this.resolve?.(id, importer, { skipSelf: true });
|
|
4763
|
-
if (res !== void 0 && res !== null) {
|
|
4764
|
-
if (res.id === id) {
|
|
4765
|
-
res.id = resolveModulePath(res.id, {
|
|
4766
|
-
try: true,
|
|
4767
|
-
from: importer,
|
|
4768
|
-
extensions: nuxt.options.extensions
|
|
4769
|
-
}) || res.id;
|
|
4770
|
-
}
|
|
4771
|
-
return {
|
|
4772
|
-
...res,
|
|
4773
|
-
external: "absolute"
|
|
4774
|
-
};
|
|
4775
|
-
}
|
|
4776
|
-
}
|
|
4777
|
-
}
|
|
4778
|
-
};
|
|
4779
|
-
}
|
|
4780
|
-
};
|
|
4781
|
-
}
|
|
4782
|
-
|
|
4783
4634
|
function transformAndMinify(input, options) {
|
|
4784
4635
|
const oxcOptions = tryUseNuxt()?.options.oxc;
|
|
4785
4636
|
const transformResult = transformSync("", input, { ...oxcOptions?.transform.options, ...options });
|
|
@@ -5302,8 +5153,6 @@ Using \`${fallbackCompatibilityDate}\` as fallback. More info at: ${colors.under
|
|
|
5302
5153
|
rootDir: nuxt.options.rootDir,
|
|
5303
5154
|
composables: nuxt.options.optimization.keyedComposables
|
|
5304
5155
|
}));
|
|
5305
|
-
addVitePlugin(() => ResolveDeepImportsPlugin(nuxt));
|
|
5306
|
-
addVitePlugin(() => ResolveExternalsPlugin(nuxt), { prepend: true });
|
|
5307
5156
|
addBuildPlugin(PrehydrateTransformPlugin({ sourcemap: !!nuxt.options.sourcemap.server || !!nuxt.options.sourcemap.client }));
|
|
5308
5157
|
if (nuxt.options.experimental.localLayerAliases) {
|
|
5309
5158
|
addBuildPlugin(LayerAliasingPlugin({
|
|
@@ -5342,17 +5191,23 @@ Using \`${fallbackCompatibilityDate}\` as fallback. More info at: ${colors.under
|
|
|
5342
5191
|
include: sharedPatterns,
|
|
5343
5192
|
patterns: createImportProtectionPatterns(nuxt, { context: "shared" })
|
|
5344
5193
|
};
|
|
5345
|
-
|
|
5346
|
-
|
|
5194
|
+
addBuildPlugin({
|
|
5195
|
+
vite: () => ImpoundPlugin.vite(sharedProtectionConfig),
|
|
5196
|
+
webpack: () => ImpoundPlugin.webpack(sharedProtectionConfig),
|
|
5197
|
+
rspack: () => ImpoundPlugin.rspack(sharedProtectionConfig)
|
|
5198
|
+
}, { server: false });
|
|
5347
5199
|
const nuxtProtectionConfig = {
|
|
5348
5200
|
cwd: nuxt.options.rootDir,
|
|
5349
5201
|
// Exclude top-level resolutions by plugins
|
|
5350
5202
|
exclude: [relative(nuxt.options.rootDir, join(nuxt.options.srcDir, "index.html")), ...sharedPatterns],
|
|
5351
5203
|
patterns: createImportProtectionPatterns(nuxt, { context: "nuxt-app" })
|
|
5352
5204
|
};
|
|
5205
|
+
addBuildPlugin({
|
|
5206
|
+
webpack: () => ImpoundPlugin.webpack(nuxtProtectionConfig),
|
|
5207
|
+
rspack: () => ImpoundPlugin.rspack(nuxtProtectionConfig)
|
|
5208
|
+
});
|
|
5353
5209
|
addVitePlugin(() => Object.assign(ImpoundPlugin.vite({ ...nuxtProtectionConfig, error: false }), { name: "nuxt:import-protection" }), { client: false });
|
|
5354
5210
|
addVitePlugin(() => Object.assign(ImpoundPlugin.vite({ ...nuxtProtectionConfig, error: true }), { name: "nuxt:import-protection" }), { server: false });
|
|
5355
|
-
addWebpackPlugin(() => ImpoundPlugin.webpack(nuxtProtectionConfig));
|
|
5356
5211
|
});
|
|
5357
5212
|
if (!nuxt.options.dev) {
|
|
5358
5213
|
addBuildPlugin(DevOnlyPlugin({
|
package/meta.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const runtimeDependencies: string[]
|
package/meta.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const runtimeDependencies = [
|
|
2
|
+
// other deps
|
|
3
|
+
'devalue',
|
|
4
|
+
'klona',
|
|
5
|
+
// unjs ecosystem
|
|
6
|
+
'defu',
|
|
7
|
+
'ufo',
|
|
8
|
+
'h3',
|
|
9
|
+
'destr',
|
|
10
|
+
'consola',
|
|
11
|
+
'hookable',
|
|
12
|
+
'unctx',
|
|
13
|
+
'cookie-es',
|
|
14
|
+
'perfect-debounce',
|
|
15
|
+
'ohash',
|
|
16
|
+
'pathe',
|
|
17
|
+
'uncrypto',
|
|
18
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-29439165.ec1da219",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"types": "./kit.d.ts",
|
|
34
34
|
"import": "./kit.js"
|
|
35
35
|
},
|
|
36
|
+
"./meta": "./meta.mjs",
|
|
36
37
|
"./app": {
|
|
37
38
|
"types": "./dist/app/index.d.ts",
|
|
38
39
|
"import": "./dist/app/index.js"
|
|
@@ -61,17 +62,18 @@
|
|
|
61
62
|
"dist",
|
|
62
63
|
"config.*",
|
|
63
64
|
"kit.*",
|
|
65
|
+
"meta.*",
|
|
64
66
|
"schema.*"
|
|
65
67
|
],
|
|
66
68
|
"dependencies": {
|
|
67
69
|
"@dxup/nuxt": "^0.3.2",
|
|
68
70
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
69
71
|
"@nuxt/devtools": "^3.1.1",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-
|
|
71
|
-
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.3.0-
|
|
72
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-
|
|
72
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.3.0-29439165.ec1da219",
|
|
73
|
+
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@4.3.0-29439165.ec1da219",
|
|
74
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.3.0-29439165.ec1da219",
|
|
73
75
|
"@nuxt/telemetry": "^2.6.6",
|
|
74
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.3.0-
|
|
76
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.3.0-29439165.ec1da219",
|
|
75
77
|
"@unhead/vue": "^2.0.19",
|
|
76
78
|
"@vue/shared": "^3.5.25",
|
|
77
79
|
"c12": "^3.3.2",
|