Skip to content

Commit

Permalink
fix: add AsyncLocalStorage to globalThis (#1907)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ascorbic committed Feb 2, 2023
1 parent c3e0cb4 commit 1ec8203
Show file tree
Hide file tree
Showing 19 changed files with 457 additions and 402 deletions.
2 changes: 1 addition & 1 deletion demos/base-path/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"typescript": "^4.6.3"
},
"dependencies": {
"next": "^13.0.7"
"next": "^13.1.6"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion demos/canary/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion demos/canary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"nanoid": "^3.3.4",
"next": "^13.0.7",
"next": "^13.1.6",
"react": "latest",
"react-dom": "latest",
"sass": "latest",
Expand Down
2 changes: 1 addition & 1 deletion demos/custom-routes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"typescript": "^4.7.4"
},
"dependencies": {
"next": "^13.0.7"
"next": "^13.1.6"
},
"scripts": {
"build": "next build",
Expand Down
11 changes: 11 additions & 0 deletions demos/default/app/app-edge/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use client'

// TODO-APP: support typing for useSelectedLayoutSegment
// @ts-ignore
import { useSelectedLayoutSegments } from 'next/navigation'

export default function Layout({ children }: { children: React.ReactNode }) {
// useSelectedLayoutSegment should not be thrown
useSelectedLayoutSegments()
return children
}
8 changes: 8 additions & 0 deletions demos/default/app/app-edge/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default function Page() {
if ('EdgeRuntime' in globalThis) {
return <p>Edge!</p>
}
return <p>Node!</p>
}

export const runtime = 'experimental-edge'
2 changes: 1 addition & 1 deletion demos/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@reach/dialog": "^0.16.2",
"@reach/visually-hidden": "^0.16.0",
"@vercel/og": "^0.0.27",
"next": "^13.0.7",
"next": "^13.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion demos/middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@netlify/next": "*",
"@netlify/plugin-nextjs": "*",
"isomorphic-unfetch": "^3.1.0",
"next": "^13.0.7",
"next": "^13.1.6",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion demos/next-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"license": "MIT",
"dependencies": {
"next": "^13.0.7",
"next": "^13.1.6",
"next-auth": "^4.15.0",
"nodemailer": "^6.6.3",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion demos/next-export/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "",
"dependencies": {
"next": "^13.0.7"
"next": "^13.1.6"
},
"devDependencies": {
"@netlify/next": "*",
Expand Down
2 changes: 1 addition & 1 deletion demos/next-with-edge-functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "next start"
},
"dependencies": {
"next": "^13.0.7",
"next": "^13.1.6",
"react": "^18.0.2",
"react-dom": "^18.0.2"
}
Expand Down
2 changes: 1 addition & 1 deletion demos/static-root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "",
"dependencies": {
"next": "^13.0.7"
"next": "^13.1.6"
},
"devDependencies": {
"@netlify/next": "*",
Expand Down
Loading

0 comments on commit 1ec8203

Please sign in to comment.