Skip to content

Commit f6269e9

Browse files
authored
chore: fix next-auth demo (#1551)
1 parent 7ab09cb commit f6269e9

File tree

7 files changed

+79
-128
lines changed

7 files changed

+79
-128
lines changed

.github/workflows/pre-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions/setup-node@v2
1313
with:
14-
node-version: '*'
14+
node-version: 'lts/*'
1515
cache: 'npm'
1616
check-latest: true
1717
registry-url: 'https://registry.npmjs.org'

.github/workflows/release-please.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
if: ${{ steps.release.outputs.releases_created }}
2222
- uses: actions/setup-node@v2
2323
with:
24-
node-version: '*'
24+
node-version: 'lts/*'
2525
cache: 'npm'
2626
check-latest: true
2727
registry-url: 'https://registry.npmjs.org'

.github/workflows/test.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ jobs:
2525

2626
steps:
2727
- uses: actions/checkout@v2
28-
- name: Installing with latest Node.js
28+
- name: Installing with LTS Node.js
2929
uses: actions/setup-node@v2
3030
with:
31-
node-version: '*'
31+
node-version: 'lts/*'
3232
check-latest: true
3333
- name: NPM Install
3434
run: npm install
3535
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
3636
uses: actions/setup-node@v2
37-
if: "${{ matrix.node-version != '*' }}"
37+
if: "${{ matrix.node-version != 'lts/*' }}"
3838
with:
3939
node-version: ${{ matrix.node-version }}
4040
check-latest: true
4141
- name: Linting
4242
run: npm run format:ci
43-
if: "${{ matrix.node-version == '*' }}"
43+
if: "${{ matrix.node-version == 'lts/*' }}"
4444
- name: Run tests against next@latest
4545
run: npm test
4646
canary:
@@ -61,18 +61,18 @@ jobs:
6161
if: github.ref_name == 'main'
6262
steps:
6363
- uses: actions/checkout@v2
64-
- name: Installing with latest Node.js
64+
- name: Installing with LTS Node.js
6565
uses: actions/setup-node@v2
6666
with:
67-
node-version: '*'
67+
node-version: 'lts/*'
6868
check-latest: true
6969
- name: NPM Install
7070
run: npm install
7171
- name: Install Next.js Canary
7272
run: npm install -D next@canary --legacy-peer-deps
7373
- name: Switching to Node.js ${{ matrix.node-version }} to run tests
7474
uses: actions/setup-node@v2
75-
if: "${{ matrix.node-version != '*' }}"
75+
if: "${{ matrix.node-version != 'lts/*' }}"
7676
with:
7777
node-version: ${{ matrix.node-version }}
7878
check-latest: true

demos/next-auth/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
"next": "^12.2.0",
2727
"next-auth": "^4.7.0",
2828
"nodemailer": "^6.6.3",
29-
"react": "^17.0.2",
30-
"react-dom": "^17.0.2"
29+
"react": "^18.0.0",
30+
"react-dom": "^18.0.0"
3131
},
3232
"devDependencies": {
33-
"@netlify/next-runtime": "*",
33+
"@netlify/plugin-nextjs": "*",
3434
"@types/fs-extra": "^9.0.13",
3535
"@types/jest": "^27.4.1",
3636
"@types/node": "^17.0.14",
37-
"@types/react": "^17.0.39",
37+
"@types/react": "^18.0.0",
3838
"husky": "^7.0.4",
3939
"npm-run-all": "^4.1.5",
4040
"typescript": "^4.5.5"
@@ -45,4 +45,4 @@
4545
"engines": {
4646
"node": ">=16.0.0"
4747
}
48-
}
48+
}

demos/next-auth/pages/_app.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { SessionProvider } from "next-auth/react"
2-
import type { AppProps } from "next/app"
32
import "./styles.css"
43

54
// Use of the <SessionProvider> is mandatory to allow components that call
65
// `useSession()` anywhere in your application to access the `session` object.
7-
export default function App({ Component, pageProps }: AppProps) {
6+
export default function App({ Component, pageProps }) {
87
return (
98
<SessionProvider session={pageProps.session} refetchInterval={0}>
109
<Component {...pageProps} />

demos/next-auth/tsconfig.json

+17-14
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
11
{
2+
"extends": "../../tsconfig.json",
23
"compilerOptions": {
3-
"target": "es5",
44
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
5+
"es2019",
6+
"dom"
87
],
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"strict": true,
12-
"forceConsistentCasingInFileNames": true,
8+
"strict": false,
139
"noEmit": true,
14-
"esModuleInterop": true,
15-
"module": "esnext",
10+
"incremental": true,
1611
"moduleResolution": "node",
1712
"resolveJsonModule": true,
1813
"isolatedModules": true,
19-
"jsx": "preserve",
20-
"incremental": true
14+
"jsx": "preserve"
2115
},
22-
"include": ["process.d.ts", "next-env.d.ts", "next-auth.d.ts", "**/*.ts", "**/*.tsx"],
23-
"exclude": ["node_modules"]
16+
"include": [
17+
"process.d.ts",
18+
"next-env.d.ts",
19+
"next-auth.d.ts",
20+
"**/*.ts",
21+
"**/*.tsx",
22+
"pages/_app.js"
23+
],
24+
"exclude": [
25+
"node_modules"
26+
]
2427
}

0 commit comments

Comments
 (0)