@nuxt/kit 3.12.2 β†’ 3.12.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.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- [![Nuxt banner](./.github/assets/banner.svg)](https://nuxt.com)
1
+ [![Nuxt banner](https://github.com/nuxt/nuxt/tree/main/.github/assets/banner.svg)](https://nuxt.com)
2
2
 
3
3
  # Nuxt
4
4
 
5
5
  <p>
6
6
  <a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/v/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Version"></a>
7
7
  <a href="https://www.npmjs.com/package/nuxt"><img src="https://img.shields.io/npm/dm/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="Downloads"></a>
8
- <a href="./LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>
8
+ <a href="https://github.com/nuxt/nuxt/tree/main/LICENSE"><img src="https://img.shields.io/github/license/nuxt/nuxt.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="License"></a>
9
9
  <a href="https://nuxt.com"><img src="https://img.shields.io/badge/Nuxt%20Docs-18181B?logo=nuxt.js" alt="Website"></a>
10
10
  <a href="https://chat.nuxt.dev"><img src="https://img.shields.io/badge/Nuxt%20Discord-18181B?logo=discord" alt="Discord"></a>
11
11
  </p>
@@ -34,7 +34,7 @@ It provides a number of features that make it easy to build fast, SEO-friendly,
34
34
  - 🏠 [Local Development](#local-development)
35
35
  - ⛰️ [Nuxt 2](#nuxt-2)
36
36
  - πŸ›Ÿ [Professional Support](#professional-support)
37
- - πŸ”— [Follow us](#follow-us)
37
+ - πŸ”— [Follow Us](#follow-us)
38
38
  - βš–οΈ [License](#license)
39
39
 
40
40
  ---
@@ -101,23 +101,17 @@ Here are a few ways you can get involved:
101
101
 
102
102
  Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/docs/community/framework-contribution#setup) to contribute to the framework and documentation.
103
103
 
104
- ## <a name="nuxt-2">⛰️ Nuxt 2</a>
105
-
106
- You can find the code for Nuxt 2 on the [`2.x` branch](https://github.com/nuxt/nuxt/tree/2.x) and the documentation at [v2.nuxt.com](https://v2.nuxt.com).
107
-
108
- If you expect to be using Nuxt 2 beyond the EOL (End of Life) date (June 30, 2024), and still need a maintained version that can satisfy security and browser compatibility requirements, make sure to check out [HeroDevs’ NES (Never-Ending Support) Nuxt 2](https://www.herodevs.com/support/nuxt-nes?utm_source=nuxt-github&utm_medium=nuxt-readme).
109
-
110
104
  ## <a name="professional-support">πŸ›Ÿ Professional Support</a>
111
105
 
112
106
  - Technical audit & consulting: [Nuxt Experts](https://nuxt.com/enterprise/support)
113
107
  - Custom development & more: [Nuxt Agencies Partners](https://nuxt.com/enterprise/agencies)
114
108
 
115
- ## <a name="follow-us">πŸ”— Follow us</a>
109
+ ## <a name="follow-us">πŸ”— Follow Us</a>
116
110
 
117
111
  <p valign="center">
118
- <a href="https://chat.nuxt.dev"><img width="20px" src="./.github/assets/discord.svg" alt="Discord"></a>&nbsp;&nbsp;<a href="https://twitter.nuxt.dev"><img width="20px" src="./.github/assets/twitter.svg" alt="Twitter"></a>&nbsp;&nbsp;<a href="https://github.nuxt.dev"><img width="20px" src="./.github/assets/github.svg" alt="GitHub"></a>
112
+ <a href="https://chat.nuxt.dev"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/discord.svg" alt="Discord"></a>&nbsp;&nbsp;<a href="https://twitter.nuxt.dev"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/twitter.svg" alt="Twitter"></a>&nbsp;&nbsp;<a href="https://github.nuxt.dev"><img width="20px" src="https://github.com/nuxt/nuxt/tree/main/.github/assets/github.svg" alt="GitHub"></a>
119
113
  </p>
120
114
 
121
115
  ## <a name="license">βš–οΈ License</a>
122
116
 
123
- [MIT](./LICENSE)
117
+ [MIT](https://github.com/nuxt/nuxt/tree/main/LICENSE)
package/dist/index.d.mts CHANGED
@@ -158,7 +158,7 @@ declare function isNuxt3(nuxt?: Nuxt): boolean;
158
158
  /**
159
159
  * Get nuxt version
160
160
  */
161
- declare function getNuxtVersion(nuxt?: Nuxt | any): any;
161
+ declare function getNuxtVersion(nuxt?: Nuxt | any): string;
162
162
 
163
163
  /**
164
164
  * Register a directory to be scanned for components and imported only when used.
package/dist/index.d.ts CHANGED
@@ -158,7 +158,7 @@ declare function isNuxt3(nuxt?: Nuxt): boolean;
158
158
  /**
159
159
  * Get nuxt version
160
160
  */
161
- declare function getNuxtVersion(nuxt?: Nuxt | any): any;
161
+ declare function getNuxtVersion(nuxt?: Nuxt | any): string;
162
162
 
163
163
  /**
164
164
  * Register a directory to be scanned for components and imported only when used.
package/dist/index.mjs CHANGED
@@ -119,8 +119,8 @@ function isNuxt3(nuxt = useNuxt()) {
119
119
  }
120
120
  function getNuxtVersion(nuxt = useNuxt()) {
121
121
  const rawVersion = nuxt?._version || nuxt?.version || nuxt?.constructor?.version;
122
- if (!rawVersion) {
123
- throw new Error("Cannot determine nuxt version! Is current instance passed?");
122
+ if (typeof rawVersion !== "string") {
123
+ throw new TypeError("Cannot determine nuxt version! Is current instance passed?");
124
124
  }
125
125
  return rawVersion.replace(/^v/g, "");
126
126
  }
@@ -2122,11 +2122,10 @@ ${issues.toString()}`);
2122
2122
  if (module.hooks) {
2123
2123
  nuxt.hooks.addHooks(module.hooks);
2124
2124
  }
2125
- const key = `nuxt:module:${uniqueKey || Math.round(Math.random() * 1e4)}`;
2126
- const mark = performance.mark(key);
2125
+ const start = performance.now();
2127
2126
  const res = await module.setup?.call(null, _options, nuxt) ?? {};
2128
- const perf = performance.measure(key, mark.name);
2129
- const setupTime = Math.round(perf.duration * 100) / 100;
2127
+ const perf = performance.now() - start;
2128
+ const setupTime = Math.round(perf * 100) / 100;
2130
2129
  if (setupTime > 5e3 && uniqueKey !== "@nuxt/telemetry") {
2131
2130
  logger.warn(`Slow module \`${uniqueKey || "<no name>"}\` took \`${setupTime}ms\` to setup.`);
2132
2131
  } else if (nuxt.options.debug) {
@@ -2303,7 +2302,7 @@ function resolveIgnorePatterns(relativePath) {
2303
2302
  if (relativePath) {
2304
2303
  return ignorePatterns.map((p) => {
2305
2304
  const [_, negation = "", pattern] = p.match(NEGATION_RE) || [];
2306
- if (pattern[0] === "*") {
2305
+ if (pattern && pattern[0] === "*") {
2307
2306
  return p;
2308
2307
  }
2309
2308
  return negation + relative(relativePath, resolve(nuxt.options.rootDir, pattern || p));
@@ -2317,7 +2316,7 @@ function resolveGroupSyntax(group) {
2317
2316
  groups = groups.flatMap((group2) => {
2318
2317
  const [head, ...tail] = group2.split("{");
2319
2318
  if (tail.length) {
2320
- const [body, ...rest] = tail.join("{").split("}");
2319
+ const [body = "", ...rest] = tail.join("{").split("}");
2321
2320
  return body.split(",").map((part) => `${head}${part}${rest.join("")}`);
2322
2321
  }
2323
2322
  return group2;
@@ -2570,7 +2569,7 @@ async function getNuxtModuleVersion(module, nuxt = useNuxt()) {
2570
2569
  return false;
2571
2570
  }
2572
2571
 
2573
- const layerSchemaKeys = ["future", "srcDir", "rootDir", "dir"];
2572
+ const layerSchemaKeys = ["future", "srcDir", "rootDir", "serverDir", "dir"];
2574
2573
  const layerSchema = /* @__PURE__ */ Object.create(null);
2575
2574
  for (const key of layerSchemaKeys) {
2576
2575
  if (key in NuxtConfigSchema) {
@@ -2646,7 +2645,7 @@ async function loadNuxt(opts) {
2646
2645
  const pkg = await readPackageJSON(nearestNuxtPkg);
2647
2646
  const majorVersion = pkg.version ? Number.parseInt(pkg.version.split(".")[0]) : "";
2648
2647
  const rootDir = pathToFileURL(opts.cwd || process.cwd()).href;
2649
- if (majorVersion === 3) {
2648
+ if (majorVersion && majorVersion >= 3) {
2650
2649
  const { loadNuxt: loadNuxt3 } = await importModule(pkg._name || pkg.name, rootDir);
2651
2650
  const nuxt2 = await loadNuxt3(opts);
2652
2651
  return nuxt2;
@@ -3061,7 +3060,8 @@ async function _generateTypes(nuxt) {
3061
3060
  lib: [
3062
3061
  "ESNext",
3063
3062
  "dom",
3064
- "dom.iterable"
3063
+ "dom.iterable",
3064
+ "webworker"
3065
3065
  ],
3066
3066
  /* JSX support for Vue */
3067
3067
  jsx: "preserve",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuxt/kit",
3
- "version": "3.12.2",
3
+ "version": "3.12.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/nuxt/nuxt.git",
@@ -27,7 +27,7 @@
27
27
  "consola": "^3.2.3",
28
28
  "defu": "^6.1.4",
29
29
  "destr": "^2.0.3",
30
- "globby": "^14.0.1",
30
+ "globby": "^14.0.2",
31
31
  "hash-sum": "^2.0.0",
32
32
  "ignore": "^5.3.1",
33
33
  "jiti": "^1.21.6",
@@ -35,25 +35,25 @@
35
35
  "knitwork": "^1.1.0",
36
36
  "mlly": "^1.7.1",
37
37
  "pathe": "^1.1.2",
38
- "pkg-types": "^1.1.1",
38
+ "pkg-types": "^1.1.3",
39
39
  "scule": "^1.3.0",
40
- "semver": "^7.6.2",
41
- "ufo": "^1.5.3",
40
+ "semver": "^7.6.3",
41
+ "ufo": "^1.5.4",
42
42
  "unctx": "^2.3.1",
43
- "unimport": "^3.7.2",
43
+ "unimport": "^3.9.0",
44
44
  "untyped": "^1.4.2",
45
- "@nuxt/schema": "3.12.2"
45
+ "@nuxt/schema": "3.12.4"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/hash-sum": "1.0.2",
49
49
  "@types/lodash-es": "4.17.12",
50
50
  "@types/semver": "7.5.8",
51
51
  "lodash-es": "4.17.21",
52
- "nitropack": "2.9.6",
52
+ "nitropack": "2.9.7",
53
53
  "unbuild": "latest",
54
- "vite": "5.3.1",
55
- "vitest": "1.6.0",
56
- "webpack": "5.92.0"
54
+ "vite": "5.3.4",
55
+ "vitest": "2.0.3",
56
+ "webpack": "5.93.0"
57
57
  },
58
58
  "engines": {
59
59
  "node": "^14.18.0 || >=16.10.0"