@depup/nuxt 4.3.0-depup.0 → 4.4.2-depup.1
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 +24 -107
- package/dist/app/components/nuxt-announcer.d.ts +26 -0
- package/dist/app/components/nuxt-announcer.js +59 -0
- package/dist/app/components/nuxt-island.js +7 -1
- package/dist/app/components/nuxt-layout.js +44 -21
- package/dist/app/components/nuxt-link.js +29 -15
- package/dist/app/components/nuxt-root.vue +1 -1
- package/dist/app/components/nuxt-route-announcer.js +11 -2
- package/dist/app/components/nuxt-time.vue +13 -2
- package/dist/app/components/test-component-wrapper.js +10 -2
- package/dist/app/components/utils.d.ts +7 -1
- package/dist/app/components/utils.js +18 -0
- package/dist/app/components/welcome.vue +1 -1
- package/dist/app/composables/announcer.d.ts +23 -0
- package/dist/app/composables/announcer.js +47 -0
- package/dist/app/composables/asyncData.d.ts +18 -36
- package/dist/app/composables/asyncData.js +214 -186
- package/dist/app/composables/chunk.js +1 -2
- package/dist/app/composables/cookie.d.ts +14 -0
- package/dist/app/composables/cookie.js +66 -17
- package/dist/app/composables/error.d.ts +2 -2
- package/dist/app/composables/error.js +11 -1
- package/dist/app/composables/fetch.d.ts +11 -16
- package/dist/app/composables/fetch.js +79 -76
- package/dist/app/composables/index.d.ts +2 -0
- package/dist/app/composables/index.js +1 -0
- package/dist/app/composables/manifest.d.ts +1 -1
- package/dist/app/composables/manifest.js +1 -4
- package/dist/app/composables/pages.d.ts +2 -0
- package/dist/app/composables/pages.js +1 -0
- package/dist/app/composables/payload.js +14 -5
- package/dist/app/composables/preload.js +1 -1
- package/dist/app/composables/route-announcer.d.ts +2 -2
- package/dist/app/composables/route-announcer.js +6 -6
- package/dist/app/composables/router.d.ts +7 -0
- package/dist/app/composables/router.js +8 -3
- package/dist/app/composables/ssr.d.ts +1 -1
- package/dist/app/composables/ssr.js +1 -1
- package/dist/app/composables/state.d.ts +11 -1
- package/dist/app/composables/state.js +11 -2
- package/dist/app/composables/url.d.ts +1 -1
- package/dist/app/composables/url.js +1 -1
- package/dist/app/config.d.ts +1 -2
- package/dist/app/index.d.ts +2 -2
- package/dist/app/index.js +1 -1
- package/dist/app/nuxt.d.ts +46 -31
- package/dist/app/nuxt.js +6 -2
- package/dist/app/plugins/restore-state.client.js +1 -2
- package/dist/app/plugins/revive-payload.client.js +9 -3
- package/dist/app/plugins/router.js +2 -2
- package/dist/app/plugins/view-transitions.client.js +39 -4
- package/dist/compiler/runtime/index.d.ts +14 -0
- package/dist/compiler/runtime/index.js +14 -0
- package/dist/index.mjs +2592 -1365
- package/dist/pages/runtime/page.js +11 -21
- package/dist/pages/runtime/plugins/router.js +20 -8
- package/dist/pages/runtime/router.options.js +12 -6
- package/meta.js +2 -1
- package/package.json +77 -37
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Fragment, Suspense, defineComponent, h, inject, nextTick, onBeforeUnmount, ref, watch } from "vue";
|
|
2
2
|
import { RouterView } from "vue-router";
|
|
3
|
-
import {
|
|
4
|
-
import { generateRouteKey, toArray, wrapInKeepAlive } from "./utils.js";
|
|
3
|
+
import { generateRouteKey, wrapInKeepAlive } from "./utils.js";
|
|
5
4
|
import { RouteProvider, defineRouteProvider } from "#app/components/route-provider";
|
|
6
5
|
import { useNuxtApp } from "#app/nuxt";
|
|
7
6
|
import { useRouter } from "#app/composables/router";
|
|
8
|
-
import { _wrapInTransition } from "#app/components/utils";
|
|
7
|
+
import { _mergeTransitionProps, _wrapInTransition } from "#app/components/utils";
|
|
9
8
|
import { LayoutMetaSymbol, PageRouteSymbol } from "#app/components/injections";
|
|
10
9
|
import { appKeepalive as defaultKeepaliveConfig, appPageTransition as defaultPageTransition } from "#build/nuxt.config.mjs";
|
|
11
10
|
const _routeProviders = import.meta.dev ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new WeakMap();
|
|
@@ -64,6 +63,7 @@ export default defineComponent({
|
|
|
64
63
|
});
|
|
65
64
|
onBeforeUnmount(() => {
|
|
66
65
|
unsub();
|
|
66
|
+
done();
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
return () => {
|
|
@@ -92,7 +92,7 @@ export default defineComponent({
|
|
|
92
92
|
return vnode;
|
|
93
93
|
}
|
|
94
94
|
if (isRenderingNewRouteInOldFork && forkRoute && (!_layoutMeta || _layoutMeta?.isCurrent(forkRoute))) {
|
|
95
|
-
if (hasSameChildren) {
|
|
95
|
+
if (hasSameChildren || vnode) {
|
|
96
96
|
return vnode;
|
|
97
97
|
}
|
|
98
98
|
return null;
|
|
@@ -118,7 +118,9 @@ export default defineComponent({
|
|
|
118
118
|
defaultPageTransition,
|
|
119
119
|
{
|
|
120
120
|
onAfterLeave() {
|
|
121
|
-
|
|
121
|
+
nuxtApp["~transitionFinish"]?.();
|
|
122
|
+
delete nuxtApp["~transitionFinish"];
|
|
123
|
+
delete nuxtApp["~transitionPromise"];
|
|
122
124
|
nuxtApp.callHook("page:transition:finish", routeProps.Component);
|
|
123
125
|
}
|
|
124
126
|
}
|
|
@@ -133,8 +135,10 @@ export default defineComponent({
|
|
|
133
135
|
suspensible: true,
|
|
134
136
|
onPending: () => {
|
|
135
137
|
isSuspensePending = true;
|
|
136
|
-
if (hasTransition) {
|
|
137
|
-
nuxtApp
|
|
138
|
+
if (hasTransition && !nuxtApp["~transitionPromise"]) {
|
|
139
|
+
nuxtApp["~transitionPromise"] = new Promise((resolve) => {
|
|
140
|
+
nuxtApp["~transitionFinish"] = resolve;
|
|
141
|
+
});
|
|
138
142
|
}
|
|
139
143
|
nuxtApp.callHook("page:start", routeProps.Component);
|
|
140
144
|
},
|
|
@@ -144,7 +148,6 @@ export default defineComponent({
|
|
|
144
148
|
await nextTick();
|
|
145
149
|
nuxtApp._route.sync?.();
|
|
146
150
|
await nuxtApp.callHook("page:finish", routeProps.Component);
|
|
147
|
-
delete nuxtApp._runningTransition;
|
|
148
151
|
if (!pageLoadingEndHookAlreadyCalled && !willRenderAnotherChild) {
|
|
149
152
|
pageLoadingEndHookAlreadyCalled = true;
|
|
150
153
|
await nuxtApp.callHook("page:loading:end");
|
|
@@ -184,19 +187,6 @@ export default defineComponent({
|
|
|
184
187
|
};
|
|
185
188
|
}
|
|
186
189
|
});
|
|
187
|
-
function _mergeTransitionProps(routeProps) {
|
|
188
|
-
const _props = [];
|
|
189
|
-
for (const prop of routeProps) {
|
|
190
|
-
if (!prop) {
|
|
191
|
-
continue;
|
|
192
|
-
}
|
|
193
|
-
_props.push({
|
|
194
|
-
...prop,
|
|
195
|
-
onAfterLeave: prop.onAfterLeave ? toArray(prop.onAfterLeave) : void 0
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
return defu(..._props);
|
|
199
|
-
}
|
|
200
190
|
function haveParentRoutesRendered(fork, newRoute, Component) {
|
|
201
191
|
if (!fork) {
|
|
202
192
|
return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isReadonly, reactive, shallowReactive, shallowRef } from "vue";
|
|
2
2
|
import { START_LOCATION, createMemoryHistory, createRouter, createWebHashHistory, createWebHistory } from "vue-router";
|
|
3
|
-
import {
|
|
3
|
+
import { isSamePath, withoutBase } from "ufo";
|
|
4
4
|
import { toArray } from "../utils.js";
|
|
5
5
|
import { getRouteRules } from "#app/composables/manifest";
|
|
6
6
|
import { defineNuxtPlugin, useRuntimeConfig } from "#app/nuxt";
|
|
@@ -18,9 +18,9 @@ function createCurrentLocation(base, location, renderedPath) {
|
|
|
18
18
|
if (pathFromHash[0] !== "/") {
|
|
19
19
|
pathFromHash = "/" + pathFromHash;
|
|
20
20
|
}
|
|
21
|
-
return
|
|
21
|
+
return withoutBase(pathFromHash, "");
|
|
22
22
|
}
|
|
23
|
-
const displayedPath =
|
|
23
|
+
const displayedPath = withoutBase(pathname, base);
|
|
24
24
|
const path = !renderedPath || isSamePath(displayedPath, renderedPath) ? displayedPath : renderedPath;
|
|
25
25
|
return path + (path.includes("?") ? "" : search) + hash;
|
|
26
26
|
}
|
|
@@ -119,6 +119,7 @@ const plugin = defineNuxtPlugin({
|
|
|
119
119
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
120
120
|
}
|
|
121
121
|
const resolvedInitialRoute = import.meta.client && initialURL !== router.currentRoute.value.fullPath ? router.resolve(initialURL) : router.currentRoute.value;
|
|
122
|
+
const hasDeferredRoute = import.meta.client && nuxtApp.isHydrating && nuxtApp.payload.prerenderedAt && nuxtApp.payload.path && initialURL !== nuxtApp.payload.path && isSamePath(router.currentRoute.value.path, nuxtApp.payload.path);
|
|
122
123
|
syncCurrentRoute();
|
|
123
124
|
if (import.meta.server && nuxtApp.ssrContext?.islandContext) {
|
|
124
125
|
return { provide: { router } };
|
|
@@ -202,7 +203,7 @@ const plugin = defineNuxtPlugin({
|
|
|
202
203
|
await nuxtApp.callHook("page:loading:end");
|
|
203
204
|
});
|
|
204
205
|
router.afterEach((to) => {
|
|
205
|
-
if (to.matched.length === 0) {
|
|
206
|
+
if (to.matched.length === 0 && !error.value) {
|
|
206
207
|
return nuxtApp.runWithContext(() => showError(createError({
|
|
207
208
|
status: 404,
|
|
208
209
|
fatal: false,
|
|
@@ -218,10 +219,21 @@ const plugin = defineNuxtPlugin({
|
|
|
218
219
|
if ("name" in resolvedInitialRoute) {
|
|
219
220
|
resolvedInitialRoute.name = void 0;
|
|
220
221
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
if (hasDeferredRoute) {
|
|
223
|
+
const payloadRoute = router.resolve(nuxtApp.payload.path);
|
|
224
|
+
if ("name" in payloadRoute) {
|
|
225
|
+
payloadRoute.name = void 0;
|
|
226
|
+
}
|
|
227
|
+
await router.replace({ ...payloadRoute, force: true });
|
|
228
|
+
nuxtApp.hooks.hookOnce("app:suspense:resolve", async () => {
|
|
229
|
+
await router.replace({ ...resolvedInitialRoute, force: true });
|
|
230
|
+
});
|
|
231
|
+
} else {
|
|
232
|
+
await router.replace({
|
|
233
|
+
...resolvedInitialRoute,
|
|
234
|
+
force: true
|
|
235
|
+
});
|
|
236
|
+
}
|
|
225
237
|
router.options.scrollBehavior = routerOptions.scrollBehavior;
|
|
226
238
|
} catch (error2) {
|
|
227
239
|
await nuxtApp.runWithContext(() => showError(error2));
|
|
@@ -19,14 +19,20 @@ export default {
|
|
|
19
19
|
if (routeAllowsScrollToTop === false) {
|
|
20
20
|
return false;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
if (from === START_LOCATION) {
|
|
23
|
+
return _calculatePosition(to, from, savedPosition, hashScrollBehaviour);
|
|
24
|
+
}
|
|
23
25
|
return new Promise((resolve) => {
|
|
24
|
-
|
|
25
|
-
resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour));
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
nuxtApp.hooks.hookOnce(hookToWait, () => {
|
|
26
|
+
const doScroll = () => {
|
|
29
27
|
requestAnimationFrame(() => resolve(_calculatePosition(to, from, savedPosition, hashScrollBehaviour)));
|
|
28
|
+
};
|
|
29
|
+
nuxtApp.hooks.hookOnce("page:loading:end", () => {
|
|
30
|
+
const transitionPromise = nuxtApp["~transitionPromise"];
|
|
31
|
+
if (transitionPromise) {
|
|
32
|
+
transitionPromise.then(doScroll);
|
|
33
|
+
} else {
|
|
34
|
+
doScroll();
|
|
35
|
+
}
|
|
30
36
|
});
|
|
31
37
|
});
|
|
32
38
|
}
|
package/meta.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/nuxt",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.2-depup.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/nuxt/nuxt.git",
|
|
7
7
|
"directory": "packages/nuxt"
|
|
8
8
|
},
|
|
9
9
|
"homepage": "https://nuxt.com",
|
|
10
|
-
"description": "Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.",
|
|
10
|
+
"description": "[DepUp] Nuxt is a free and open-source framework with an intuitive and extendable way to create type-safe, performant and production-grade full-stack web applications and websites with Vue.js.",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"type": "module",
|
|
13
13
|
"types": "./types.d.ts",
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"imports": {
|
|
35
35
|
"#app": "./dist/app/index.js",
|
|
36
36
|
"#app/nuxt": "./dist/app/nuxt.js",
|
|
37
|
-
"#unhead/composables": "./dist/head/runtime/composables.js"
|
|
37
|
+
"#unhead/composables": "./dist/head/runtime/composables.js",
|
|
38
|
+
"#pages/composables": "./dist/pages/runtime/composables.js"
|
|
38
39
|
},
|
|
39
40
|
"files": [
|
|
40
41
|
"app.d.ts",
|
|
@@ -48,74 +49,74 @@
|
|
|
48
49
|
"schema.*"
|
|
49
50
|
],
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"@dxup/nuxt": "^0.
|
|
52
|
-
"@nuxt/cli": "^3.
|
|
53
|
-
"@nuxt/devtools": "^3.
|
|
54
|
-
"@nuxt/telemetry": "^2.
|
|
55
|
-
"@unhead/vue": "^2.1.
|
|
56
|
-
"@vue/shared": "^3.5.
|
|
57
|
-
"c12": "^
|
|
52
|
+
"@dxup/nuxt": "^0.4.0",
|
|
53
|
+
"@nuxt/cli": "^3.34.0",
|
|
54
|
+
"@nuxt/devtools": "^3.2.3",
|
|
55
|
+
"@nuxt/telemetry": "^2.7.0",
|
|
56
|
+
"@unhead/vue": "^2.1.12",
|
|
57
|
+
"@vue/shared": "^3.5.30",
|
|
58
|
+
"c12": "^4.0.0-beta.3",
|
|
58
59
|
"chokidar": "^5.0.0",
|
|
59
60
|
"compatx": "^0.2.0",
|
|
60
61
|
"consola": "^3.4.2",
|
|
61
62
|
"cookie-es": "^2.0.0",
|
|
62
63
|
"defu": "^6.1.4",
|
|
63
|
-
"
|
|
64
|
-
"devalue": "^5.6.2",
|
|
64
|
+
"devalue": "^5.6.4",
|
|
65
65
|
"errx": "^0.1.0",
|
|
66
66
|
"escape-string-regexp": "^5.0.0",
|
|
67
67
|
"exsolve": "^1.0.8",
|
|
68
|
-
"h3": "^2.0.1-rc.11",
|
|
69
68
|
"hookable": "^6.0.1",
|
|
70
69
|
"ignore": "^7.0.5",
|
|
71
|
-
"impound": "^1.
|
|
70
|
+
"impound": "^1.1.5",
|
|
72
71
|
"jiti": "^2.6.1",
|
|
73
72
|
"klona": "^2.0.6",
|
|
74
73
|
"knitwork": "^1.3.0",
|
|
75
74
|
"magic-string": "^0.30.21",
|
|
76
|
-
"mlly": "^1.8.
|
|
77
|
-
"nanotar": "^0.
|
|
78
|
-
"nypm": "^0.6.
|
|
75
|
+
"mlly": "^1.8.1",
|
|
76
|
+
"nanotar": "^0.3.0",
|
|
77
|
+
"nypm": "^0.6.5",
|
|
79
78
|
"ofetch": "^1.5.1",
|
|
80
79
|
"ohash": "^2.0.11",
|
|
81
|
-
"on-change": "^6.0.
|
|
82
|
-
"oxc-minify": "^0.
|
|
83
|
-
"oxc-parser": "^0.
|
|
84
|
-
"oxc-transform": "^0.
|
|
80
|
+
"on-change": "^6.0.2",
|
|
81
|
+
"oxc-minify": "^0.119.0",
|
|
82
|
+
"oxc-parser": "^0.119.0",
|
|
83
|
+
"oxc-transform": "^0.119.0",
|
|
85
84
|
"oxc-walker": "^0.7.0",
|
|
86
85
|
"pathe": "^2.0.3",
|
|
87
86
|
"perfect-debounce": "^2.1.0",
|
|
87
|
+
"picomatch": "^4.0.3",
|
|
88
88
|
"pkg-types": "^2.3.0",
|
|
89
|
-
"rou3": "^0.
|
|
89
|
+
"rou3": "^0.8.1",
|
|
90
90
|
"scule": "^1.3.0",
|
|
91
|
-
"semver": "^7.7.
|
|
92
|
-
"std-env": "^
|
|
91
|
+
"semver": "^7.7.4",
|
|
92
|
+
"std-env": "^4.0.0",
|
|
93
93
|
"tinyglobby": "^0.2.15",
|
|
94
94
|
"ufo": "^1.6.3",
|
|
95
95
|
"ultrahtml": "^1.6.0",
|
|
96
96
|
"uncrypto": "^0.1.3",
|
|
97
97
|
"unctx": "^2.5.0",
|
|
98
|
-
"unimport": "^
|
|
98
|
+
"unimport": "^6.0.1",
|
|
99
99
|
"unplugin": "^3.0.0",
|
|
100
|
-
"
|
|
100
|
+
"unrouting": "^0.1.7",
|
|
101
101
|
"untyped": "^2.0.0",
|
|
102
|
-
"vue": "^3.5.
|
|
103
|
-
"vue-router": "^
|
|
104
|
-
"@nuxt/
|
|
105
|
-
"@nuxt/
|
|
106
|
-
"@nuxt/
|
|
107
|
-
"@nuxt/
|
|
102
|
+
"vue": "^3.5.30",
|
|
103
|
+
"vue-router": "^5.0.3",
|
|
104
|
+
"@nuxt/nitro-server": "4.4.2",
|
|
105
|
+
"@nuxt/vite-builder": "4.4.2",
|
|
106
|
+
"@nuxt/kit": "4.4.2",
|
|
107
|
+
"@nuxt/schema": "4.4.2"
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@nuxt/scripts": "0.13.2",
|
|
111
|
-
"@parcel/watcher": "2.5.
|
|
111
|
+
"@parcel/watcher": "2.5.6",
|
|
112
112
|
"@types/estree": "1.0.8",
|
|
113
|
-
"@
|
|
114
|
-
"@vitejs/plugin-vue
|
|
115
|
-
"@
|
|
113
|
+
"@types/picomatch": "4.0.2",
|
|
114
|
+
"@vitejs/plugin-vue": "6.0.4",
|
|
115
|
+
"@vitejs/plugin-vue-jsx": "5.1.4",
|
|
116
|
+
"@vue/compiler-sfc": "3.5.30",
|
|
116
117
|
"unbuild": "3.6.1",
|
|
117
118
|
"vite": "7.3.1",
|
|
118
|
-
"vitest": "
|
|
119
|
+
"vitest": "4.0.18",
|
|
119
120
|
"vue-bundle-renderer": "2.2.0",
|
|
120
121
|
"vue-sfc-transformer": "0.1.17"
|
|
121
122
|
},
|
|
@@ -137,5 +138,44 @@
|
|
|
137
138
|
"scripts": {
|
|
138
139
|
"build:stub": "unbuild --stub",
|
|
139
140
|
"test:attw": "attw --pack"
|
|
141
|
+
},
|
|
142
|
+
"keywords": [
|
|
143
|
+
"depup",
|
|
144
|
+
"dependency-bumped",
|
|
145
|
+
"updated-deps",
|
|
146
|
+
"nuxt"
|
|
147
|
+
],
|
|
148
|
+
"depup": {
|
|
149
|
+
"changes": {
|
|
150
|
+
"c12": {
|
|
151
|
+
"from": "^3.3.3",
|
|
152
|
+
"to": "^4.0.0-beta.3"
|
|
153
|
+
},
|
|
154
|
+
"devalue": {
|
|
155
|
+
"from": "^5.6.3",
|
|
156
|
+
"to": "^5.6.4"
|
|
157
|
+
},
|
|
158
|
+
"oxc-minify": {
|
|
159
|
+
"from": "^0.117.0",
|
|
160
|
+
"to": "^0.119.0"
|
|
161
|
+
},
|
|
162
|
+
"oxc-parser": {
|
|
163
|
+
"from": "^0.117.0",
|
|
164
|
+
"to": "^0.119.0"
|
|
165
|
+
},
|
|
166
|
+
"oxc-transform": {
|
|
167
|
+
"from": "^0.117.0",
|
|
168
|
+
"to": "^0.119.0"
|
|
169
|
+
},
|
|
170
|
+
"unrouting": {
|
|
171
|
+
"from": "^0.1.5",
|
|
172
|
+
"to": "^0.1.7"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"depsUpdated": 6,
|
|
176
|
+
"originalPackage": "nuxt",
|
|
177
|
+
"originalVersion": "4.4.2",
|
|
178
|
+
"processedAt": "2026-03-14T20:57:23.920Z",
|
|
179
|
+
"smokeTest": "passed"
|
|
140
180
|
}
|
|
141
181
|
}
|