Skip to content

fix: add AsyncLocalStorage to globalThis #1907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a Next.js demo site, not our code

// @ts-ignore
import { useSelectedLayoutSegments } from 'next/navigation'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


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