nuxt-nightly 4.1.3-29321816.9bebe27b → 4.1.3-29323298.7c979010
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasProtocol, joinURL
|
|
1
|
+
import { hasProtocol, joinURL } from "ufo";
|
|
2
2
|
import { parse } from "devalue";
|
|
3
3
|
import { getCurrentInstance, onServerPrefetch, reactive } from "vue";
|
|
4
4
|
import { useNuxtApp, useRuntimeConfig } from "../nuxt.js";
|
|
@@ -85,7 +85,7 @@ export async function isPrerendered(url = useRoute().path) {
|
|
|
85
85
|
if (!appManifest) {
|
|
86
86
|
return !!nuxtApp.payload.prerenderedAt;
|
|
87
87
|
}
|
|
88
|
-
url =
|
|
88
|
+
url = url.replace(/\/$/, "");
|
|
89
89
|
const manifest = await getAppManifest();
|
|
90
90
|
if (manifest.prerendered.includes(url)) {
|
|
91
91
|
return true;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
renderResourceHeaders
|
|
7
7
|
} from "vue-bundle-renderer/runtime";
|
|
8
8
|
import { appendResponseHeader, createError, getQuery, getResponseStatus, getResponseStatusText, writeEarlyHints } from "h3";
|
|
9
|
-
import { getQuery as getURLQuery, joinURL
|
|
9
|
+
import { getQuery as getURLQuery, joinURL } from "ufo";
|
|
10
10
|
import { propsToString, renderSSRHead } from "@unhead/vue/server";
|
|
11
11
|
import destr from "destr";
|
|
12
12
|
import { defineRenderHandler, getRouteRules, useNitroApp } from "nitropack/runtime";
|
|
@@ -106,7 +106,7 @@ export default defineRenderHandler(async (event) => {
|
|
|
106
106
|
}
|
|
107
107
|
if (_PAYLOAD_EXTRACTION) {
|
|
108
108
|
appendResponseHeader(event, "x-nitro-prerender", joinURL(ssrContext.url.replace(/\?.*$/, ""), PAYLOAD_FILENAME));
|
|
109
|
-
await payloadCache.setItem(
|
|
109
|
+
await payloadCache.setItem(ssrContext.url.replace(/\/$/, ""), renderPayloadResponse(ssrContext));
|
|
110
110
|
}
|
|
111
111
|
const NO_SCRIPTS = process.env.NUXT_NO_SCRIPTS || routeOptions.noScripts;
|
|
112
112
|
const { styles, scripts } = getRequestDependencies(ssrContext, renderer.rendererContext);
|
package/dist/index.mjs
CHANGED
|
@@ -3778,11 +3778,11 @@ const importsModule = defineNuxtModule({
|
|
|
3778
3778
|
function addDeclarationTemplates(ctx, options) {
|
|
3779
3779
|
const nuxt = useNuxt();
|
|
3780
3780
|
const resolvedImportPathMap = /* @__PURE__ */ new Map();
|
|
3781
|
-
const r = (
|
|
3782
|
-
const SUPPORTED_EXTENSION_RE = new RegExp(`\\.(
|
|
3781
|
+
const r = (i) => resolvedImportPathMap.get(i.typeFrom || i.from);
|
|
3782
|
+
const SUPPORTED_EXTENSION_RE = new RegExp(`\\.(?:${nuxt.options.extensions.map((i) => i.replace(".", "")).join("|")})$`);
|
|
3783
3783
|
const importPaths = nuxt.options.modulesDir.map((dir) => directoryToURL(dir));
|
|
3784
3784
|
async function cacheImportPaths(imports) {
|
|
3785
|
-
const importSource = Array.from(new Set(imports.map((i) => i.from)));
|
|
3785
|
+
const importSource = Array.from(new Set(imports.map((i) => i.typeFrom || i.from)));
|
|
3786
3786
|
await Promise.all(importSource.map(async (from) => {
|
|
3787
3787
|
if (resolvedImportPathMap.has(from) || nuxt._dependencies?.has(from)) {
|
|
3788
3788
|
return;
|
|
@@ -3827,7 +3827,7 @@ function addDeclarationTemplates(ctx, options) {
|
|
|
3827
3827
|
});
|
|
3828
3828
|
}
|
|
3829
3829
|
|
|
3830
|
-
const version = "4.1.3-
|
|
3830
|
+
const version = "4.1.3-29323298.7c979010";
|
|
3831
3831
|
|
|
3832
3832
|
const createImportProtectionPatterns = (nuxt, options) => {
|
|
3833
3833
|
const patterns = [];
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
scrollBehavior(to, from, savedPosition) {
|
|
7
7
|
const nuxtApp = useNuxtApp();
|
|
8
8
|
const hashScrollBehaviour = useRouter().options?.scrollBehaviorType ?? "auto";
|
|
9
|
-
if (to.path === from.path) {
|
|
9
|
+
if (to.path.replace(/\/$/, "") === from.path.replace(/\/$/, "")) {
|
|
10
10
|
if (from.hash && !to.hash) {
|
|
11
11
|
return { left: 0, top: 0 };
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-nightly",
|
|
3
|
-
"version": "4.1.3-
|
|
3
|
+
"version": "4.1.3-29323298.7c979010",
|
|
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.3-
|
|
71
|
-
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.3-
|
|
70
|
+
"@nuxt/kit": "npm:@nuxt/kit-nightly@4.1.3-29323298.7c979010",
|
|
71
|
+
"@nuxt/schema": "npm:@nuxt/schema-nightly@4.1.3-29323298.7c979010",
|
|
72
72
|
"@nuxt/telemetry": "^2.6.6",
|
|
73
|
-
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.3-
|
|
73
|
+
"@nuxt/vite-builder": "npm:@nuxt/vite-builder-nightly@4.1.3-29323298.7c979010",
|
|
74
74
|
"@unhead/vue": "^2.0.14",
|
|
75
75
|
"@vue/shared": "^3.5.21",
|
|
76
76
|
"c12": "^3.3.0",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"ultrahtml": "^1.6.0",
|
|
119
119
|
"uncrypto": "^0.1.3",
|
|
120
120
|
"unctx": "^2.4.1",
|
|
121
|
-
"unimport": "^5.
|
|
121
|
+
"unimport": "^5.4.1",
|
|
122
122
|
"unplugin": "^2.3.10",
|
|
123
123
|
"unplugin-vue-router": "^0.15.0",
|
|
124
124
|
"unstorage": "^1.17.1",
|