@netlify/plugin-nextjs 5.3.1 → 5.3.2
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/build/content/prerendered.js +1 -1
- package/dist/esm-chunks/{package-JXSICZZN.js → package-NUPTPA44.js} +4 -4
- package/dist/run/handlers/tracing.js +1 -1
- package/edge-runtime/lib/next-request.ts +7 -2
- package/edge-runtime/lib/util.ts +0 -2
- package/edge-runtime/middleware.ts +2 -3
- package/package.json +1 -1
|
@@ -156,7 +156,7 @@ var buildAppCacheValue = async (path) => {
|
|
|
156
156
|
const rsc = await readFile(`${path}.rsc`, "utf-8").catch(
|
|
157
157
|
() => readFile(`${path}.prefetch.rsc`, "utf-8")
|
|
158
158
|
);
|
|
159
|
-
if (!meta.status && rsc.includes("NEXT_NOT_FOUND")) {
|
|
159
|
+
if (!meta.status && rsc.includes("NEXT_NOT_FOUND") && !meta.headers["x-next-cache-tags"].includes("/@")) {
|
|
160
160
|
meta.status = 404;
|
|
161
161
|
}
|
|
162
162
|
return {
|
|
@@ -8,7 +8,7 @@ import "./chunk-OEQOKJGE.js";
|
|
|
8
8
|
|
|
9
9
|
// package.json
|
|
10
10
|
var name = "@netlify/plugin-nextjs";
|
|
11
|
-
var version = "5.3.
|
|
11
|
+
var version = "5.3.2";
|
|
12
12
|
var description = "Run Next.js seamlessly on Netlify";
|
|
13
13
|
var main = "./dist/index.js";
|
|
14
14
|
var type = "module";
|
|
@@ -58,13 +58,13 @@ var homepage = "https://github.com/netlify/next-runtime-minimal#readme";
|
|
|
58
58
|
var devDependencies = {
|
|
59
59
|
"@fastly/http-compute-js": "1.1.4",
|
|
60
60
|
"@netlify/blobs": "^7.3.0",
|
|
61
|
-
"@netlify/build": "^29.
|
|
61
|
+
"@netlify/build": "^29.43.0",
|
|
62
62
|
"@netlify/edge-bundler": "^12.0.1",
|
|
63
63
|
"@netlify/edge-functions": "^2.8.1",
|
|
64
64
|
"@netlify/eslint-config-node": "^7.0.1",
|
|
65
65
|
"@netlify/functions": "^2.7.0",
|
|
66
|
-
"@netlify/serverless-functions-api": "^1.18.
|
|
67
|
-
"@netlify/zip-it-and-ship-it": "^9.33.
|
|
66
|
+
"@netlify/serverless-functions-api": "^1.18.2",
|
|
67
|
+
"@netlify/zip-it-and-ship-it": "^9.33.2",
|
|
68
68
|
"@opentelemetry/api": "^1.8.0",
|
|
69
69
|
"@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
|
|
70
70
|
"@opentelemetry/resources": "^1.24.0",
|
|
@@ -67368,7 +67368,7 @@ var import_semantic_conventions = __toESM(require_src(), 1);
|
|
|
67368
67368
|
import { logger } from "../systemlog.cjs";
|
|
67369
67369
|
var {
|
|
67370
67370
|
default: { version, name }
|
|
67371
|
-
} = await import("../../esm-chunks/package-
|
|
67371
|
+
} = await import("../../esm-chunks/package-NUPTPA44.js");
|
|
67372
67372
|
var sdk = new import_sdk_node.NodeSDK({
|
|
67373
67373
|
resource: new import_resources.Resource({
|
|
67374
67374
|
[import_semantic_conventions.SEMRESATTRS_SERVICE_NAME]: name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Context } from '@netlify/edge-functions'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { addBasePath, normalizeDataUrl, normalizeLocalePath, removeBasePath } from './util.ts'
|
|
4
4
|
|
|
5
5
|
interface I18NConfig {
|
|
6
6
|
defaultLocale: string
|
|
@@ -74,6 +74,11 @@ const normalizeRequestURL = (
|
|
|
74
74
|
url.pathname = addBasePath(url.pathname, nextConfig?.basePath)
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
// keep the locale in the url for request.nextUrl object
|
|
78
|
+
if (detectedLocale) {
|
|
79
|
+
url.pathname = `/${detectedLocale}${url.pathname}`
|
|
80
|
+
}
|
|
81
|
+
|
|
77
82
|
return {
|
|
78
83
|
url: url.toString(),
|
|
79
84
|
detectedLocale,
|
|
@@ -88,9 +93,9 @@ export const buildNextRequest = (
|
|
|
88
93
|
const { url, method, body, headers } = request
|
|
89
94
|
const { country, subdivision, city, latitude, longitude, timezone } = context.geo
|
|
90
95
|
const geo: RequestData['geo'] = {
|
|
96
|
+
city,
|
|
91
97
|
country: country?.code,
|
|
92
98
|
region: subdivision?.code,
|
|
93
|
-
city,
|
|
94
99
|
latitude: latitude?.toString(),
|
|
95
100
|
longitude: longitude?.toString(),
|
|
96
101
|
timezone,
|
package/edge-runtime/lib/util.ts
CHANGED
|
@@ -6,12 +6,11 @@ import nextConfig from './next.config.json' assert { type: 'json' }
|
|
|
6
6
|
import { InternalHeaders } from './lib/headers.ts'
|
|
7
7
|
import { logger, LogLevel } from './lib/logging.ts'
|
|
8
8
|
import { buildNextRequest, RequestData } from './lib/next-request.ts'
|
|
9
|
-
import { buildResponse } from './lib/response.ts'
|
|
10
|
-
import { FetchEventResult } from './lib/response.ts'
|
|
9
|
+
import { buildResponse, FetchEventResult } from './lib/response.ts'
|
|
11
10
|
import {
|
|
12
|
-
type MiddlewareRouteMatch,
|
|
13
11
|
getMiddlewareRouteMatcher,
|
|
14
12
|
searchParamsToUrlQuery,
|
|
13
|
+
type MiddlewareRouteMatch,
|
|
15
14
|
} from './lib/routing.ts'
|
|
16
15
|
|
|
17
16
|
type NextHandler = (params: { request: RequestData }) => Promise<FetchEventResult>
|