@nuxt/kit-nightly 5.0.0-29796419.a2fd06ab → 5.0.0-29798548.0ea1c97e

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.d.mts CHANGED
@@ -75,6 +75,21 @@ interface NuxtLayerResolverContext {
75
75
  interface LoadNuxtConfigOptions {
76
76
  /** Directory to load `nuxt.config` from. @default process.cwd() */
77
77
  cwd?: string;
78
+ /**
79
+ * Name of the config file to load, without an extension.
80
+ * @default 'nuxt.config'
81
+ */
82
+ configFile?: string;
83
+ /**
84
+ * Name of the `.rc` file to load alongside the config file, or `false` to load none.
85
+ * @default '.nuxtrc'
86
+ */
87
+ rcFile?: string | false;
88
+ /**
89
+ * Also load the user-level and workspace-level `.nuxtrc` files.
90
+ * @default true
91
+ */
92
+ globalRc?: boolean;
78
93
  /**
79
94
  * Configuration applied above every layer, including the root project's own `nuxt.config`.
80
95
  * Excluded from the `rawConfig` snapshot passed to `onConfigResolved`.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as runWithNuxtContext, A as findPath, B as isIgnored, C as importModule, D as tryRequireModule, E as tryImportModule, F as MODE_RE, G as warn, H as getLayerDirectories, I as distDirURL, J as readPackageJSON, K as interopDefault, L as filterInPlace, M as resolveFiles, N as resolveNuxtModule, O as tryResolveModule, P as resolvePath, Q as nuxtCtx, R as toArray, S as directoryToURL, T as resolveModule, V as resolveIgnorePatterns, W as getUserCaller, X as resolvePackageJSON, Y as resolvePackageDir, Z as getNuxtCtx, _ as configDiagnostics, a as getDirectory, at as DEFAULT_JSX_FILE_EXTENSIONS$1, b as logger, c as loadNuxtModuleInstance, d as getMissingCjsGlobal, et as tryUseNuxt, f as isLoaderError, g as getAddDependencyCommand, h as ensureDependencyInstalled, i as componentDiagnostics, j as resolveAlias, k as createResolver, l as normalizeModuleTranspilePath, m as shouldReportJitiFallbackOnce, n as pageDiagnostics, nt as kitDiagnostics, o as installModule, ot as DEFAULT_JS_FILE_EXTENSIONS$1, p as loadJiti, q as findWorkspaceDir, r as resolveModuleExportNames, t as pluginDiagnostics, tt as useNuxt, u as resolveModuleWithOptions, w as requireModule, x as useLogger, y as useTerminal, z as createIsIgnored } from "./plugins-CvbMgKG4.mjs";
1
+ import { $ as runWithNuxtContext, A as findPath, B as isIgnored, C as importModule, D as tryRequireModule, E as tryImportModule, F as MODE_RE, G as warn, H as getLayerDirectories, I as distDirURL, J as readPackageJSON, K as interopDefault, L as filterInPlace, M as resolveFiles, N as resolveNuxtModule, O as tryResolveModule, P as resolvePath, Q as nuxtCtx, R as toArray, S as directoryToURL, T as resolveModule, V as resolveIgnorePatterns, W as getUserCaller, X as resolvePackageJSON, Y as resolvePackageDir, Z as getNuxtCtx, _ as configDiagnostics, a as getDirectory, at as DEFAULT_JSX_FILE_EXTENSIONS$1, b as logger, c as loadNuxtModuleInstance, d as getMissingCjsGlobal, et as tryUseNuxt, f as isLoaderError, g as getAddDependencyCommand, h as ensureDependencyInstalled, i as componentDiagnostics, j as resolveAlias, k as createResolver, l as normalizeModuleTranspilePath, m as shouldReportJitiFallbackOnce, n as pageDiagnostics, nt as kitDiagnostics, o as installModule, ot as DEFAULT_JS_FILE_EXTENSIONS$1, p as loadJiti, q as findWorkspaceDir, r as resolveModuleExportNames, t as pluginDiagnostics, tt as useNuxt, u as resolveModuleWithOptions, w as requireModule, x as useLogger, y as useTerminal, z as createIsIgnored } from "./plugins-C6xAbHQF.mjs";
2
2
  import { createDefu, defu } from "defu";
3
3
  import { kebabCase, pascalCase, snakeCase } from "scule";
4
4
  import process$1 from "node:process";
@@ -868,6 +868,7 @@ const merger = createDefu((obj, key, value) => {
868
868
  });
869
869
  async function loadNuxtConfig(opts) {
870
870
  const rootCwd = resolve(opts.cwd || process$1.cwd());
871
+ const configFileName = opts.configFile || "nuxt.config";
871
872
  const localLayers = (await glob("layers/*", {
872
873
  onlyDirectories: true,
873
874
  cwd: rootCwd
@@ -887,7 +888,7 @@ async function loadNuxtConfig(opts) {
887
888
  jitiPromise ??= loadJiti({
888
889
  rootDir: rootCwd,
889
890
  install
890
- }).then((mod) => mod?.createJiti(join(rootCwd, "nuxt.config"), {
891
+ }).then((mod) => mod?.createJiti(join(rootCwd, configFileName), {
891
892
  interopDefault: true,
892
893
  moduleCache: false,
893
894
  extensions: [...CONFIG_EXTENSIONS]
@@ -934,14 +935,14 @@ async function loadNuxtConfig(opts) {
934
935
  };
935
936
  const loadRootConfig = () => withDefineNuxtConfig(() => loadConfig({
936
937
  name: "nuxt",
937
- configFile: "nuxt.config",
938
- rcFile: ".nuxtrc",
938
+ configFile: configFileName,
939
+ rcFile: opts.rcFile ?? ".nuxtrc",
939
940
  extend: { extendKey: [
940
941
  "theme",
941
942
  "_extends",
942
943
  "extends"
943
944
  ] },
944
- globalRc: true,
945
+ globalRc: opts.globalRc ?? true,
945
946
  merger,
946
947
  cwd: opts.cwd,
947
948
  overrides: opts.overrides,
@@ -970,7 +971,7 @@ async function loadNuxtConfig(opts) {
970
971
  const layer = await loadConfig({
971
972
  cwd: aliased,
972
973
  name: "nuxt",
973
- configFile: "nuxt.config",
974
+ configFile: configFileName,
974
975
  rcFile: false,
975
976
  extend: false,
976
977
  import: resolveOptions.import
@@ -149,6 +149,13 @@ declare const buildDiagnostics: import("nostics").Diagnostics<{
149
149
  readonly fix: "Remove `experimental.watcher` from your `nuxt.config`, or use a builder that supports its own watcher.";
150
150
  readonly docs: false;
151
151
  };
152
+ readonly NUXT_B1021: {
153
+ readonly why: (p: {
154
+ export: string;
155
+ }) => string;
156
+ readonly fix: "If you are a module author, ensure the `export` you register for a component is a valid identifier. Otherwise, please report this issue.";
157
+ readonly docs: false;
158
+ };
152
159
  }, readonly [import("nostics").DiagnosticReporter<{
153
160
  method?: import("nostics").ConsoleMethod;
154
161
  }>]>;
@@ -1,4 +1,4 @@
1
- import { U as parseNodeModulePath, _ as configDiagnostics, at as DEFAULT_JSX_FILE_EXTENSIONS, i as componentDiagnostics, it as reporters, n as pageDiagnostics, ot as DEFAULT_JS_FILE_EXTENSIONS, p as loadJiti, r as resolveModuleExportNames, rt as docsBase, s as installModules, t as pluginDiagnostics, v as buildDiagnostics } from "../plugins-CvbMgKG4.mjs";
1
+ import { U as parseNodeModulePath, _ as configDiagnostics, at as DEFAULT_JSX_FILE_EXTENSIONS, i as componentDiagnostics, it as reporters, n as pageDiagnostics, ot as DEFAULT_JS_FILE_EXTENSIONS, p as loadJiti, r as resolveModuleExportNames, rt as docsBase, s as installModules, t as pluginDiagnostics, v as buildDiagnostics } from "../plugins-C6xAbHQF.mjs";
2
2
  import { defineDiagnostics } from "nostics";
3
3
  //#region src/diagnostics/head.ts
4
4
  /**
@@ -934,6 +934,11 @@ const buildDiagnostics = /* #__PURE__ */ defineDiagnostics({
934
934
  why: "`experimental.watcher: \"builder\"` is set but the active builder does not implement `setupWatcher`. Falling back to the default file watcher.",
935
935
  fix: "Remove `experimental.watcher` from your `nuxt.config`, or use a builder that supports its own watcher.",
936
936
  docs: false
937
+ },
938
+ NUXT_B1021: {
939
+ why: (p) => `Component export name \`${p.export}\` is not a valid JavaScript identifier.`,
940
+ fix: "If you are a module author, ensure the `export` you register for a component is a valid identifier. Otherwise, please report this issue.",
941
+ docs: false
937
942
  }
938
943
  }
939
944
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/kit-nightly",
3
- "version": "5.0.0-29796419.a2fd06ab",
3
+ "version": "5.0.0-29798548.0ea1c97e",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -78,7 +78,7 @@
78
78
  }
79
79
  },
80
80
  "devDependencies": {
81
- "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29796419.a2fd06ab",
81
+ "@nuxt/schema": "npm:@nuxt/schema-nightly@5.0.0-29798548.0ea1c97e",
82
82
  "c12": "4.0.0-beta.5",
83
83
  "chokidar": "^5.0.0",
84
84
  "confbox": "^0.2.4",