nuxt-nightly 4.1.1-29282072.39113ab4 → 4.1.1-29283054.32d56553
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/app/composables/router.d.ts +19 -1
- package/dist/index.mjs +7 -2
- package/package.json +4 -4
|
@@ -53,12 +53,30 @@ export type OpenOptions = {
|
|
|
53
53
|
windowFeatures?: OpenWindowFeatures;
|
|
54
54
|
};
|
|
55
55
|
export interface NavigateToOptions {
|
|
56
|
+
/**
|
|
57
|
+
* Whether or not the given route should replace the current route in the navigation history, rather than push it.
|
|
58
|
+
*/
|
|
56
59
|
replace?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* The status code to emit with the navigation. Defaults to `302 Found` when used on server side redirects.
|
|
62
|
+
*/
|
|
57
63
|
redirectCode?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Whether or not the given route is a website/resource from a different origin. By default, navigating to external resources without setting `external: true` would result in an error.
|
|
66
|
+
*/
|
|
58
67
|
external?: boolean;
|
|
59
68
|
open?: OpenOptions;
|
|
60
69
|
}
|
|
61
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* A helper that aids in programmatic navigation within your Nuxt application.
|
|
72
|
+
*
|
|
73
|
+
* Can be called on the server and on the client, within pages, route middleware, plugins, and more.
|
|
74
|
+
* @param {RouteLocationRaw | undefined | null} [to] - The route to navigate to. Accepts a route object, string path, `undefined`, or `null`. Defaults to '/'.
|
|
75
|
+
* @param {NavigateToOptions} [options] - Optional customization for controlling the behavior of the navigation.
|
|
76
|
+
* @returns {Promise<void | NavigationFailure | false> | false | void | RouteLocationRaw} The navigation result, which varies depending on context and options.
|
|
77
|
+
* @see https://nuxt.com/docs/api/utils/navigate-to
|
|
78
|
+
* @since 3.0.0
|
|
79
|
+
*/
|
|
62
80
|
export declare const navigateTo: (to: RouteLocationRaw | undefined | null, options?: NavigateToOptions) => Promise<void | NavigationFailure | false> | false | void | RouteLocationRaw;
|
|
63
81
|
/**
|
|
64
82
|
* This will abort navigation within a Nuxt route middleware handler.
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { dirname, resolve, normalize, basename, extname, relative, isAbsolute, j
|
|
|
6
6
|
import { createHooks, createDebugger } from 'hookable';
|
|
7
7
|
import ignore from 'ignore';
|
|
8
8
|
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, resolveNuxtModule, resolveIgnorePatterns, logger as logger$1, createResolver, importModule, tryImportModule, runWithNuxtContext, nuxtCtx, loadNuxtConfig, addWebpackPlugin, addServerPlugin, installModules, addServerTemplate, addServerHandler, addRouteMiddleware, resolveModuleWithOptions, normalizeTemplate, normalizePlugin } from '@nuxt/kit';
|
|
9
|
-
import { resolvePackageJSON, readPackageJSON } from 'pkg-types';
|
|
9
|
+
import { resolvePackageJSON, readPackage, readPackageJSON } from 'pkg-types';
|
|
10
10
|
import { hash, isEqual, serialize } from 'ohash';
|
|
11
11
|
import consola, { consola as consola$1 } from 'consola';
|
|
12
12
|
import onChange from 'on-change';
|
|
@@ -39,6 +39,7 @@ import { unheadVueComposablesImports } from '@unhead/vue';
|
|
|
39
39
|
import { defineUnimportPreset, createUnimport, toExports, scanDirExports } from 'unimport';
|
|
40
40
|
import { glob } from 'tinyglobby';
|
|
41
41
|
import { parse, walk as walk$1, ELEMENT_NODE } from 'ultrahtml';
|
|
42
|
+
import { isObject } from '@vue/shared';
|
|
42
43
|
import { parseQuery as parseQuery$1 } from 'vue-router';
|
|
43
44
|
import { createTransformer } from 'unctx/transform';
|
|
44
45
|
import { cpus } from 'node:os';
|
|
@@ -2802,6 +2803,10 @@ function TransformPlugin$1(nuxt, options) {
|
|
|
2802
2803
|
if (!code.includes("#components")) {
|
|
2803
2804
|
return;
|
|
2804
2805
|
}
|
|
2806
|
+
const pkg = isAbsolute(id) && id.includes("node_modules") ? await readPackage(id, { try: true }) : void 0;
|
|
2807
|
+
if (isObject(pkg) && isObject(pkg.imports) && Object.hasOwn(pkg.imports, "#components")) {
|
|
2808
|
+
return;
|
|
2809
|
+
}
|
|
2805
2810
|
componentUnimport.modifyDynamicImports((imports) => {
|
|
2806
2811
|
imports.length = 0;
|
|
2807
2812
|
imports.push(...getComponentsImports());
|
|
@@ -3755,7 +3760,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3755
3760
|
});
|
|
3756
3761
|
}
|
|
3757
3762
|
|
|
3758
|
-
const version = "4.1.1-
|
|
3763
|
+
const version = "4.1.1-29283054.32d56553";
|
|
3759
3764
|
|
|
3760
3765
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3761
3766
|
const patterns = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.1.1-
|
|
3
|
+
"version": "4.1.1-29283054.32d56553",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
"@nuxt/cli": "npm:@nuxt/cli-nightly@latest",
|
|
68
68
|
"@nuxt/devalue": "^2.0.2",
|
|
69
69
|
"@nuxt/devtools": "^2.6.3",
|
|
70
|
-
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.1-
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.1-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.1-29283054.32d56553",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.1-29283054.32d56553",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.1-
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.1-29283054.32d56553",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.20",
|
|
76
76
|
"c12": "^3.2.0",
|