Skip to content

Commit 30ad639

Browse files
ncmbchThangHuuVu
andauthored
fix: Add support for Node 18 (nextauthjs#5656)
* add support for Node 18 * update node engines in packages/next-auth Co-authored-by: Thang Vu <[email protected]>
1 parent 777da43 commit 30ad639

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

.github/version-pr/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ outputs:
44
version:
55
description: "npm package version"
66
runs:
7-
using: "node16"
7+
using: "node18"
88
main: "index.js"

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup Node
2626
uses: actions/setup-node@v3
2727
with:
28-
node-version: 16
28+
node-version: 18
2929
cache: "pnpm"
3030
- name: Install dependencies
3131
run: pnpm install
@@ -59,7 +59,7 @@ jobs:
5959
- name: Setup Node
6060
uses: actions/setup-node@v3
6161
with:
62-
node-version: 16
62+
node-version: 18
6363
cache: "pnpm"
6464
- name: Install dependencies
6565
run: pnpm install
@@ -89,7 +89,7 @@ jobs:
8989
- name: Setup Node
9090
uses: actions/setup-node@v3
9191
with:
92-
node-version: 16
92+
node-version: 18
9393
cache: "pnpm"
9494
- name: Install dependencies
9595
run: pnpm install

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ corepack enable pnpm
4141

4242
(Now, if you run `pnpm --version`, it should print the same verion as the `packageManager` property in the [`package.json` file](https://github.com/nextauthjs/next-auth/blob/main/package.json))
4343

44-
3. Install packages. Developing requires Node.js v16:
44+
3. Install packages. Developing requires Node.js v18:
4545

4646
```sh
4747
pnpm install

docs/docs/tutorials/corporate-proxy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: corporate-proxy
33
title: Add support for HTTP Proxy
44
--
55

6-
Using NextAuth.js behind a corporate proxy is not supported out of the box. This is due to the fact that the underlying library we use, [`openid-client`](https://npm.im/openid-client), uses the built-in Node.js `http` / `https` libraries, which do not support proxys by default. (See: [`http` docs](https://nodejs.org/dist/latest-v16.x/docs/api/http.html), [`https` docs](https://nodejs.org/dist/latest-v16.x/docs/api/https.html)).
6+
Using NextAuth.js behind a corporate proxy is not supported out of the box. This is due to the fact that the underlying library we use, [`openid-client`](https://npm.im/openid-client), uses the built-in Node.js `http` / `https` libraries, which do not support proxys by default. (See: [`http` docs](https://nodejs.org/dist/latest-v18.x/docs/api/http.html), [`https` docs](https://nodejs.org/dist/latest-v18.x/docs/api/https.html)).
77

88
Therefore, we'll need to an additional proxy agent to the http client, such as `https-proxy-agent`. `openid-client` allows the user to set an `agent` for requests ([Source](https://github.com/panva/node-openid-client/blob/main/docs/README.md#customizing-individual-http-requests).
99

docs/versioned_docs/version-beta/guides/07-corporate-proxies/corporate-proxy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Corporate proxy
22

33
Using NextAuth.js behind a corporate proxy is not supported out of the box. This is due to the fact that the underlying library we use, [`openid-client`](https://npm.im/openid-client) which uses the built-in Node.js `http` / `https` libraries, and those do not support proxys by default:
4-
- [`http` docs](https://nodejs.org/dist/latest-v16.x/docs/api/http.html)
5-
- [`https` docs](https://nodejs.org/dist/latest-v16.x/docs/api/https.html)
4+
- [`http` docs](https://nodejs.org/dist/latest-v18.x/docs/api/http.html)
5+
- [`https` docs](https://nodejs.org/dist/latest-v18.x/docs/api/https.html)
66

77
Therefore, we'll need to add an additional proxy agent to the http client, such as `https-proxy-agent`.
88

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"typescript": "4.8.4"
4141
},
4242
"engines": {
43-
"node": "^12.19.0 || ^14.15.0 || ^16.13.0"
43+
"node": "^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0"
4444
},
4545
"prettier": {
4646
"semi": false,

packages/next-auth/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@
129129
"whatwg-fetch": "^3.6.2"
130130
},
131131
"engines": {
132-
"node": "^12.19.0 || ^14.15.0 || ^16.13.0"
132+
"node": "^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0"
133133
}
134134
}

0 commit comments

Comments
 (0)