Skip to content

chore: fix broken next-auth demo #1551

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 1 commit into from
Aug 18, 2022
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 .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '*'
node-version: 'lts/*'
cache: 'npm'
check-latest: true
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
if: ${{ steps.release.outputs.releases_created }}
- uses: actions/setup-node@v2
with:
node-version: '*'
node-version: 'lts/*'
cache: 'npm'
check-latest: true
registry-url: 'https://registry.npmjs.org'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Installing with latest Node.js
- name: Installing with LTS Node.js
uses: actions/setup-node@v2
with:
node-version: '*'
node-version: 'lts/*'
check-latest: true
- name: NPM Install
run: npm install
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
uses: actions/setup-node@v2
if: "${{ matrix.node-version != '*' }}"
if: "${{ matrix.node-version != 'lts/*' }}"
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Linting
run: npm run format:ci
if: "${{ matrix.node-version == '*' }}"
if: "${{ matrix.node-version == 'lts/*' }}"
- name: Run tests against next@latest
run: npm test
canary:
Expand All @@ -61,18 +61,18 @@ jobs:
if: github.ref_name == 'main'
steps:
- uses: actions/checkout@v2
- name: Installing with latest Node.js
- name: Installing with LTS Node.js
uses: actions/setup-node@v2
with:
node-version: '*'
node-version: 'lts/*'
check-latest: true
- name: NPM Install
run: npm install
- name: Install Next.js Canary
run: npm install -D next@canary --legacy-peer-deps
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
uses: actions/setup-node@v2
if: "${{ matrix.node-version != '*' }}"
if: "${{ matrix.node-version != 'lts/*' }}"
with:
node-version: ${{ matrix.node-version }}
check-latest: true
Expand Down
10 changes: 5 additions & 5 deletions demos/next-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"next": "^12.2.0",
"next-auth": "^4.7.0",
"nodemailer": "^6.6.3",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@netlify/next-runtime": "*",
"@netlify/plugin-nextjs": "*",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.14",
"@types/react": "^17.0.39",
"@types/react": "^18.0.0",
"husky": "^7.0.4",
"npm-run-all": "^4.1.5",
"typescript": "^4.5.5"
Expand All @@ -45,4 +45,4 @@
"engines": {
"node": ">=16.0.0"
}
}
}
3 changes: 1 addition & 2 deletions demos/next-auth/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { SessionProvider } from "next-auth/react"
import type { AppProps } from "next/app"
import "./styles.css"

// Use of the <SessionProvider> is mandatory to allow components that call
// `useSession()` anywhere in your application to access the `session` object.
export default function App({ Component, pageProps }: AppProps) {

Choose a reason for hiding this comment

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

Big sads the props are gone, any reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Something weird with Next types that are not important to fix today!

export default function App({ Component, pageProps }) {
return (
<SessionProvider session={pageProps.session} refetchInterval={0}>
<Component {...pageProps} />
Expand Down
31 changes: 17 additions & 14 deletions demos/next-auth/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
"es2019",
"dom"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"strict": false,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"incremental": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"jsx": "preserve"
},
"include": ["process.d.ts", "next-env.d.ts", "next-auth.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
"include": [
"process.d.ts",
"next-env.d.ts",
"next-auth.d.ts",
"**/*.ts",
"**/*.tsx",
"pages/_app.js"
],
"exclude": [
"node_modules"
]
}
Loading