Skip to content

Commit 848faee

Browse files
committed
Merge branch 'main' into mk/dev-watch
2 parents b94f132 + 70cabe1 commit 848faee

File tree

11 files changed

+244
-239
lines changed

11 files changed

+244
-239
lines changed

demos/custom-routes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@types/fs-extra": "^9.0.13",
99
"@types/jest": "^27.4.1",
1010
"@types/node": "^17.0.25",
11-
"@types/react": "^17.0.47",
11+
"@types/react": "^18.0.25",
1212
"husky": "^7.0.4",
1313
"if-env": "^1.0.4",
1414
"npm-run-all": "^4.1.5",

demos/middleware/middleware.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { NextResponse } from 'next/server'
22
import { MiddlewareRequest, NextRequest } from '@netlify/next'
33

4+
// Next.js replaces this with a stub polyfill. This import is just to test that stub.
5+
import pointlessFetch from 'isomorphic-unfetch'
6+
47
export async function middleware(req: NextRequest) {
58
let response
69
const { pathname } = req.nextUrl
@@ -58,6 +61,12 @@ export async function middleware(req: NextRequest) {
5861
}
5962

6063
if (pathname.startsWith('/shows')) {
64+
if (pathname.startsWith('/shows/222')) {
65+
response = NextResponse.next()
66+
const res = await pointlessFetch('http://www.example.com/')
67+
response.headers.set('x-example-server', res.headers.get('server'))
68+
}
69+
6170
if (pathname.startsWith('/shows/rewrite-absolute')) {
6271
response = NextResponse.rewrite(new URL('/shows/100', req.url))
6372
response.headers.set('x-modified-in-rewrite', 'true')

demos/middleware/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"dependencies": {
1212
"@netlify/next": "*",
1313
"@netlify/plugin-nextjs": "*",
14+
"isomorphic-unfetch": "^3.1.0",
1415
"next": "^13.0.3",
1516
"react": "^18.2.0",
1617
"react-dom": "^18.2.0"
@@ -19,9 +20,9 @@
1920
"@types/fs-extra": "^9.0.13",
2021
"@types/jest": "^27.4.1",
2122
"@types/node": "^17.0.25",
22-
"@types/react": "^17.0.43",
23+
"@types/react": "^18.0.25",
2324
"husky": "^7.0.4",
2425
"npm-run-all": "^4.1.5",
2526
"typescript": "^4.6.3"
2627
}
27-
}
28+
}

demos/nx-next-monorepo-demo/package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/nx-next-monorepo-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@testing-library/react": "13.4.0",
3131
"@types/jest": "28.1.8",
3232
"@types/node": "16.11.7",
33-
"@types/react": "18.0.25",
33+
"@types/react": "18.0.26",
3434
"@types/react-dom": "18.0.6",
3535
"@typescript-eslint/eslint-plugin": "^5.36.1",
3636
"@typescript-eslint/parser": "^5.36.1",

demos/turborepo-next-monorepo-demo/apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"next-transpile-modules": "9.0.0",
2222
"tsconfig": "*",
2323
"@types/node": "^17.0.12",
24-
"@types/react": "18.0.25",
24+
"@types/react": "18.0.26",
2525
"typescript": "^4.5.3"
2626
}
2727
}

demos/turborepo-next-monorepo-demo/apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"next-transpile-modules": "9.0.0",
2222
"tsconfig": "*",
2323
"@types/node": "^17.0.12",
24-
"@types/react": "18.0.25",
24+
"@types/react": "18.0.26",
2525
"typescript": "^4.5.3"
2626
}
2727
}

0 commit comments

Comments
 (0)