@nuxt/kit 4.1.1 → 4.1.3
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 +5 -5
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +18 -10
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ Example of an `app.vue`:
|
|
|
60
60
|
<script setup lang="ts">
|
|
61
61
|
useSeoMeta({
|
|
62
62
|
title: 'Meet Nuxt',
|
|
63
|
-
description: 'The Intuitive Vue Framework.'
|
|
63
|
+
description: 'The Intuitive Vue Framework.',
|
|
64
64
|
})
|
|
65
65
|
</script>
|
|
66
66
|
|
|
@@ -93,13 +93,13 @@ Discover our [list of modules](https://nuxt.com/modules) to supercharge your Nux
|
|
|
93
93
|
We invite you to contribute and help improve Nuxt 💚
|
|
94
94
|
|
|
95
95
|
Here are a few ways you can get involved:
|
|
96
|
-
- **Reporting Bugs:** If you come across any bugs or issues, please check out the [reporting bugs guide](https://nuxt.com/docs/community/reporting-bugs) to learn how to submit a bug report.
|
|
97
|
-
- **Suggestions:** Have ideas to enhance Nuxt? We'd love to hear them! Check out the [contribution guide](https://nuxt.com/docs/community/contribution) to share your suggestions.
|
|
98
|
-
- **Questions:** If you have questions or need assistance, the [getting help guide](https://nuxt.com/docs/community/getting-help) provides resources to help you out.
|
|
96
|
+
- **Reporting Bugs:** If you come across any bugs or issues, please check out the [reporting bugs guide](https://nuxt.com/docs/4.x/community/reporting-bugs) to learn how to submit a bug report.
|
|
97
|
+
- **Suggestions:** Have ideas to enhance Nuxt? We'd love to hear them! Check out the [contribution guide](https://nuxt.com/docs/4.x/community/contribution) to share your suggestions.
|
|
98
|
+
- **Questions:** If you have questions or need assistance, the [getting help guide](https://nuxt.com/docs/4.x/community/getting-help) provides resources to help you out.
|
|
99
99
|
|
|
100
100
|
## <a name="local-development">🏠 Local Development</a>
|
|
101
101
|
|
|
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.
|
|
102
|
+
Follow the docs to [Set Up Your Local Development Environment](https://nuxt.com/docs/4.x/community/framework-contribution#setup) to contribute to the framework and documentation.
|
|
103
103
|
|
|
104
104
|
## <a name="professional-support">🛟 Professional Support</a>
|
|
105
105
|
|
package/dist/index.d.mts
CHANGED
|
@@ -398,6 +398,9 @@ type PathType = 'file' | 'dir';
|
|
|
398
398
|
* @param path path to the directory to resolve files in
|
|
399
399
|
* @param pattern glob pattern or an array of glob patterns to match files
|
|
400
400
|
* @param opts options for globbing
|
|
401
|
+
* @param opts.followSymbolicLinks whether to follow symbolic links, default is `true`
|
|
402
|
+
* @param opts.ignore additional glob patterns to ignore
|
|
403
|
+
* @returns sorted array of absolute file paths
|
|
401
404
|
*/
|
|
402
405
|
declare function resolveFiles(path: string, pattern: string | string[], opts?: {
|
|
403
406
|
followSymbolicLinks?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -398,6 +398,9 @@ type PathType = 'file' | 'dir';
|
|
|
398
398
|
* @param path path to the directory to resolve files in
|
|
399
399
|
* @param pattern glob pattern or an array of glob patterns to match files
|
|
400
400
|
* @param opts options for globbing
|
|
401
|
+
* @param opts.followSymbolicLinks whether to follow symbolic links, default is `true`
|
|
402
|
+
* @param opts.ignore additional glob patterns to ignore
|
|
403
|
+
* @returns sorted array of absolute file paths
|
|
401
404
|
*/
|
|
402
405
|
declare function resolveFiles(path: string, pattern: string | string[], opts?: {
|
|
403
406
|
followSymbolicLinks?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -594,6 +594,7 @@ async function installModules(modulesToInstall, resolvedModulePaths, nuxt = useN
|
|
|
594
594
|
if (value.optional === true) {
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
+
nuxt.options.typescript.hoist.push(name);
|
|
597
598
|
if (resolvedModule && !modulesToInstall.has(resolvedModule.module) && (!resolvedModule.resolvedPath || !resolvedModulePaths.has(resolvedModule.resolvedPath))) {
|
|
598
599
|
if (typeof resolvedModule.module === "string" && inlineConfigKeys.has(resolvedModule.module)) {
|
|
599
600
|
continue;
|
|
@@ -935,7 +936,10 @@ async function loadNuxt(opts) {
|
|
|
935
936
|
opts.cwd = resolve(opts.cwd || opts.rootDir || ".");
|
|
936
937
|
opts.overrides ||= opts.config || {};
|
|
937
938
|
opts.overrides.dev = !!opts.dev;
|
|
938
|
-
const resolvedPath = ["nuxt-nightly", "nuxt"].
|
|
939
|
+
const resolvedPath = ["nuxt-nightly", "nuxt"].reduce((resolvedPath2, pkg) => {
|
|
940
|
+
const path = resolveModulePath(pkg, { try: true, from: [directoryToURL(opts.cwd)] });
|
|
941
|
+
return path && path.length > resolvedPath2.length ? path : resolvedPath2;
|
|
942
|
+
}, "");
|
|
939
943
|
if (!resolvedPath) {
|
|
940
944
|
throw new Error(`Cannot find any nuxt version from ${opts.cwd}`);
|
|
941
945
|
}
|
|
@@ -1245,7 +1249,7 @@ function normalizeComponent(opts) {
|
|
|
1245
1249
|
function addTemplate(_template) {
|
|
1246
1250
|
const nuxt = useNuxt();
|
|
1247
1251
|
const template = normalizeTemplate(_template);
|
|
1248
|
-
filterInPlace(nuxt.options.build.templates, (p) => normalizeTemplate(p).dst !== template.dst);
|
|
1252
|
+
filterInPlace(nuxt.options.build.templates, (p) => (p.dst || normalizeTemplate(p).dst) !== template.dst);
|
|
1249
1253
|
try {
|
|
1250
1254
|
const distDir = distDirURL.toString();
|
|
1251
1255
|
const { source } = captureStackTrace().find((e) => e.source && !e.source.startsWith(distDir)) ?? {};
|
|
@@ -1273,18 +1277,21 @@ function addTypeTemplate(_template, context) {
|
|
|
1273
1277
|
throw new Error(`Invalid type template. Filename must end with .d.ts : "${template.filename}"`);
|
|
1274
1278
|
}
|
|
1275
1279
|
if (!context || context.nuxt) {
|
|
1276
|
-
nuxt.hook("prepare:types", (
|
|
1277
|
-
references
|
|
1280
|
+
nuxt.hook("prepare:types", (payload) => {
|
|
1281
|
+
payload.references ||= [];
|
|
1282
|
+
payload.references.push({ path: template.dst });
|
|
1278
1283
|
});
|
|
1279
1284
|
}
|
|
1280
1285
|
if (context?.node) {
|
|
1281
|
-
nuxt.hook("prepare:types", (
|
|
1282
|
-
nodeReferences
|
|
1286
|
+
nuxt.hook("prepare:types", (payload) => {
|
|
1287
|
+
payload.nodeReferences ||= [];
|
|
1288
|
+
payload.nodeReferences.push({ path: template.dst });
|
|
1283
1289
|
});
|
|
1284
1290
|
}
|
|
1285
1291
|
if (context?.shared) {
|
|
1286
|
-
nuxt.hook("prepare:types", (
|
|
1287
|
-
sharedReferences
|
|
1292
|
+
nuxt.hook("prepare:types", (payload) => {
|
|
1293
|
+
payload.sharedReferences ||= [];
|
|
1294
|
+
payload.sharedReferences.push({ path: template.dst });
|
|
1288
1295
|
});
|
|
1289
1296
|
}
|
|
1290
1297
|
if (!context || context.nuxt || context.shared) {
|
|
@@ -1295,8 +1302,9 @@ function addTypeTemplate(_template, context) {
|
|
|
1295
1302
|
});
|
|
1296
1303
|
}
|
|
1297
1304
|
if (context?.nitro) {
|
|
1298
|
-
nuxt.hook("nitro:prepare:types", (
|
|
1299
|
-
references
|
|
1305
|
+
nuxt.hook("nitro:prepare:types", (payload) => {
|
|
1306
|
+
payload.references ||= [];
|
|
1307
|
+
payload.references.push({ path: template.dst });
|
|
1300
1308
|
});
|
|
1301
1309
|
}
|
|
1302
1310
|
return template;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/kit",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
7
7
|
"directory": "packages/kit"
|
|
8
8
|
},
|
|
9
|
-
"homepage": "https://nuxt.com/docs/api/kit",
|
|
9
|
+
"homepage": "https://nuxt.com/docs/4.x/api/kit",
|
|
10
10
|
"description": "Toolkit for authoring modules and interacting with Nuxt",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"type": "module",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"c12": "^3.
|
|
26
|
+
"c12": "^3.3.0",
|
|
27
27
|
"consola": "^3.4.2",
|
|
28
28
|
"defu": "^6.1.4",
|
|
29
29
|
"destr": "^2.0.5",
|
|
30
30
|
"errx": "^0.1.0",
|
|
31
31
|
"exsolve": "^1.0.7",
|
|
32
32
|
"ignore": "^7.0.5",
|
|
33
|
-
"jiti": "^2.
|
|
33
|
+
"jiti": "^2.6.1",
|
|
34
34
|
"klona": "^2.0.6",
|
|
35
35
|
"mlly": "^1.8.0",
|
|
36
36
|
"ohash": "^2.0.11",
|
|
@@ -40,22 +40,22 @@
|
|
|
40
40
|
"scule": "^1.3.0",
|
|
41
41
|
"semver": "^7.7.2",
|
|
42
42
|
"std-env": "^3.9.0",
|
|
43
|
-
"tinyglobby": "^0.2.
|
|
43
|
+
"tinyglobby": "^0.2.15",
|
|
44
44
|
"ufo": "^1.6.1",
|
|
45
45
|
"unctx": "^2.4.1",
|
|
46
|
-
"unimport": "^5.
|
|
46
|
+
"unimport": "^5.4.1",
|
|
47
47
|
"untyped": "^2.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@rspack/core": "1.5.
|
|
51
|
-
"@types/semver": "7.7.
|
|
50
|
+
"@rspack/core": "1.5.8",
|
|
51
|
+
"@types/semver": "7.7.1",
|
|
52
52
|
"hookable": "5.5.3",
|
|
53
|
-
"nitropack": "2.12.
|
|
53
|
+
"nitropack": "2.12.6",
|
|
54
54
|
"unbuild": "3.6.1",
|
|
55
|
-
"vite": "7.1.
|
|
55
|
+
"vite": "7.1.9",
|
|
56
56
|
"vitest": "3.2.4",
|
|
57
|
-
"webpack": "5.
|
|
58
|
-
"@nuxt/schema": "4.1.
|
|
57
|
+
"webpack": "5.102.0",
|
|
58
|
+
"@nuxt/schema": "4.1.3"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"node": ">=18.12.0"
|