@netlify/plugin-nextjs 4.41.3 → 4.41.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "4.41.3",
3
+ "version": "4.41.4",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -39,13 +39,13 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@delucis/if-env": "^1.1.2",
42
- "@netlify/build": "^29.30.0",
42
+ "@netlify/build": "^29.36.3",
43
43
  "@types/fs-extra": "^9.0.13",
44
44
  "@types/jest": "^27.4.1",
45
45
  "@types/merge-stream": "^1.1.2",
46
46
  "@types/node": "^17.0.25",
47
47
  "next": "^13.4.1",
48
- "npm-run-all": "^4.1.5",
48
+ "npm-run-all2": "^5.0.0",
49
49
  "typescript": "^4.6.3"
50
50
  },
51
51
  "scripts": {
@@ -55,7 +55,7 @@
55
55
  "publish:test": "cd .. && npm ci && npm test",
56
56
  "clean": "rimraf lib dist-types",
57
57
  "build": "run-s build:*",
58
- "build:vendor": "rimraf src/templates/vendor && deno vendor src/templates/vendor.ts --output=src/templates/vendor && node patch-import-map.mjs && patch src/templates/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/index.ts html_rewriter.patch",
58
+ "build:vendor": "rimraf src/templates/vendor && curl -fsSL https://deno.land/x/install/install.sh | DENO_INSTALL=./.deno sh -s v1.46.3 && DENO_NO_PACKAGE_JSON=1 ./.deno/bin/deno vendor src/templates/vendor.ts --output=src/templates/vendor && node patch-import-map.mjs && patch src/templates/vendor/deno.land/x/html_rewriter@v0.1.0-pre.17/index.ts html_rewriter.patch",
59
59
  "build:tsc": "tsc",
60
60
  "watch": "tsc --watch",
61
61
  "prepare": "npm run build"
@@ -2,7 +2,7 @@ import type { Context } from 'https://edge.netlify.com'
2
2
  // Available at build time
3
3
  import { _DEFINITION as edgeFunctionDefinition, default as edgeFunction } from './bundle.js'
4
4
  import { buildNextRequest, buildResponse, redirectTrailingSlash } from '../edge-shared/utils.ts'
5
- import nextConfig from '../edge-shared/nextConfig.json' assert { type: 'json' }
5
+ import nextConfig from '../edge-shared/nextConfig.json' with { type: 'json' }
6
6
 
7
7
  const handler = async (req: Request, context: Context) => {
8
8
  const url = new URL(req.url)
@@ -1,5 +1,5 @@
1
1
  import { getHandler } from 'https://ipx-edge-function-layer.netlify.app/mod.ts'
2
2
 
3
- import imageconfig from './imageconfig.json' assert { type: 'json' }
3
+ import imageconfig from './imageconfig.json' with { type: 'json' }
4
4
 
5
5
  export default getHandler({ formats: imageconfig?.formats })
@@ -1,10 +1,10 @@
1
1
  import type { Context } from 'https://edge.netlify.com'
2
2
  // Available at build time
3
- import matchers from './matchers.json' assert { type: 'json' }
3
+ import matchers from './matchers.json' with { type: 'json' }
4
4
  import edgeFunction from './bundle.js'
5
5
  import { buildNextRequest, buildResponse } from '../edge-shared/utils.ts'
6
6
  import { getMiddlewareRouteMatcher, MiddlewareRouteMatch, searchParamsToUrlQuery } from '../edge-shared/next-utils.ts'
7
- import nextConfig from '../edge-shared/nextConfig.json' assert { type: 'json' }
7
+ import nextConfig from '../edge-shared/nextConfig.json' with { type: 'json' }
8
8
 
9
9
  const matchesMiddleware: MiddlewareRouteMatch = getMiddlewareRouteMatcher(matchers || [])
10
10
 
@@ -1,4 +1,4 @@
1
- import prerenderManifest from '../edge-shared/prerender-manifest.json' assert { type: 'json' }
1
+ import prerenderManifest from '../edge-shared/prerender-manifest.json' with { type: 'json' }
2
2
  import { getRscDataRouter, PrerenderManifest } from '../edge-shared/rsc-data.ts'
3
3
 
4
4
  const handler = getRscDataRouter(prerenderManifest as PrerenderManifest)
@@ -265,7 +265,7 @@ export const buildResponse = async ({
265
265
  }
266
266
  if (rewriteUrl.hostname !== baseUrl.hostname) {
267
267
  // Netlify Edge Functions don't support proxying to external domains, but Next middleware does
268
- const proxied = fetch(new Request(rewriteUrl.toString(), request))
268
+ const proxied = fetch(new Request(rewriteUrl.toString(), request), { redirect: 'manual' })
269
269
  return addMiddlewareHeaders(proxied, res)
270
270
  }
271
271
  res.headers.set('x-middleware-rewrite', relativeUrl)