Skip to content

Commit 1ec8203

Browse files
authored
fix: add AsyncLocalStorage to globalThis (#1907)
* chore: update Next.js * chore: add appDir edge page to default demo * fix: add AsyncLocalStorage to globalThis * chore: snapidoo ✨ * chore: update to prod version of `AsyncLocalStorage` * chore: bump next version * chore: sync test from upstream
1 parent c3e0cb4 commit 1ec8203

File tree

19 files changed

+457
-402
lines changed

19 files changed

+457
-402
lines changed

demos/base-path/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"typescript": "^4.6.3"
1515
},
1616
"dependencies": {
17-
"next": "^13.0.7"
17+
"next": "^13.1.6"
1818
},
1919
"scripts": {
2020
"test": "echo \"Error: no test specified\" && exit 1"

demos/canary/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/canary/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"nanoid": "^3.3.4",
13-
"next": "^13.0.7",
13+
"next": "^13.1.6",
1414
"react": "latest",
1515
"react-dom": "latest",
1616
"sass": "latest",

demos/custom-routes/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"typescript": "^4.7.4"
1616
},
1717
"dependencies": {
18-
"next": "^13.0.7"
18+
"next": "^13.1.6"
1919
},
2020
"scripts": {
2121
"build": "next build",

demos/default/app/app-edge/layout.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
'use client'
2+
3+
// TODO-APP: support typing for useSelectedLayoutSegment
4+
// @ts-ignore
5+
import { useSelectedLayoutSegments } from 'next/navigation'
6+
7+
export default function Layout({ children }: { children: React.ReactNode }) {
8+
// useSelectedLayoutSegment should not be thrown
9+
useSelectedLayoutSegments()
10+
return children
11+
}

demos/default/app/app-edge/page.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default function Page() {
2+
if ('EdgeRuntime' in globalThis) {
3+
return <p>Edge!</p>
4+
}
5+
return <p>Node!</p>
6+
}
7+
8+
export const runtime = 'experimental-edge'

demos/default/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@reach/dialog": "^0.16.2",
2323
"@reach/visually-hidden": "^0.16.0",
2424
"@vercel/og": "^0.0.27",
25-
"next": "^13.0.7",
25+
"next": "^13.1.6",
2626
"react": "^18.2.0",
2727
"react-dom": "^18.2.0"
2828
},

demos/middleware/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@netlify/next": "*",
1313
"@netlify/plugin-nextjs": "*",
1414
"isomorphic-unfetch": "^3.1.0",
15-
"next": "^13.0.7",
15+
"next": "^13.1.6",
1616
"react": "^18.2.0",
1717
"react-dom": "^18.2.0"
1818
},

demos/next-auth/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
],
2424
"license": "MIT",
2525
"dependencies": {
26-
"next": "^13.0.7",
26+
"next": "^13.1.6",
2727
"next-auth": "^4.15.0",
2828
"nodemailer": "^6.6.3",
2929
"react": "^18.2.0",

demos/next-export/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "",
55
"dependencies": {
6-
"next": "^13.0.7"
6+
"next": "^13.1.6"
77
},
88
"devDependencies": {
99
"@netlify/next": "*",

demos/next-with-edge-functions/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "next start"
88
},
99
"dependencies": {
10-
"next": "^13.0.7",
10+
"next": "^13.1.6",
1111
"react": "^18.0.2",
1212
"react-dom": "^18.0.2"
1313
}

demos/static-root/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "",
55
"dependencies": {
6-
"next": "^13.0.7"
6+
"next": "^13.1.6"
77
},
88
"devDependencies": {
99
"@netlify/next": "*",

0 commit comments

Comments
 (0)