From 30ad639d163147841a096211e1db2c9f10c34cb7 Mon Sep 17 00:00:00 2001 From: Nico Miebach Date: Mon, 31 Oct 2022 07:54:16 +0100 Subject: [PATCH] fix: Add support for Node 18 (#5656) * add support for Node 18 * update node engines in packages/next-auth Co-authored-by: Thang Vu --- .github/version-pr/action.yml | 2 +- .github/workflows/release.yml | 6 +++--- .nvmrc | 2 +- CONTRIBUTING.md | 2 +- docs/docs/tutorials/corporate-proxy.md | 2 +- .../guides/07-corporate-proxies/corporate-proxy.md | 4 ++-- package.json | 2 +- packages/next-auth/package.json | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/version-pr/action.yml b/.github/version-pr/action.yml index 9e82caeba2..8bec4f9efe 100644 --- a/.github/version-pr/action.yml +++ b/.github/version-pr/action.yml @@ -4,5 +4,5 @@ outputs: version: description: "npm package version" runs: - using: "node16" + using: "node18" main: "index.js" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4380fd75e..846c31792c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: "pnpm" - name: Install dependencies run: pnpm install @@ -59,7 +59,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: "pnpm" - name: Install dependencies run: pnpm install @@ -89,7 +89,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 cache: "pnpm" - name: Install dependencies run: pnpm install diff --git a/.nvmrc b/.nvmrc index 19c7bdba7b..25bf17fc5a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16 \ No newline at end of file +18 \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7683bc5361..815747436a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,7 +41,7 @@ corepack enable pnpm (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)) -3. Install packages. Developing requires Node.js v16: +3. Install packages. Developing requires Node.js v18: ```sh pnpm install diff --git a/docs/docs/tutorials/corporate-proxy.md b/docs/docs/tutorials/corporate-proxy.md index b658d165af..66b313f053 100644 --- a/docs/docs/tutorials/corporate-proxy.md +++ b/docs/docs/tutorials/corporate-proxy.md @@ -3,7 +3,7 @@ id: corporate-proxy title: Add support for HTTP Proxy -- -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)). +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)). 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). diff --git a/docs/versioned_docs/version-beta/guides/07-corporate-proxies/corporate-proxy.md b/docs/versioned_docs/version-beta/guides/07-corporate-proxies/corporate-proxy.md index bf14a5b712..ce7e8444d2 100644 --- a/docs/versioned_docs/version-beta/guides/07-corporate-proxies/corporate-proxy.md +++ b/docs/versioned_docs/version-beta/guides/07-corporate-proxies/corporate-proxy.md @@ -1,8 +1,8 @@ # Corporate proxy 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: -- [`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) +- [`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) Therefore, we'll need to add an additional proxy agent to the http client, such as `https-proxy-agent`. diff --git a/package.json b/package.json index 574147927b..044b9898ff 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "typescript": "4.8.4" }, "engines": { - "node": "^12.19.0 || ^14.15.0 || ^16.13.0" + "node": "^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0" }, "prettier": { "semi": false, diff --git a/packages/next-auth/package.json b/packages/next-auth/package.json index 2ce3181f5f..8233686e08 100644 --- a/packages/next-auth/package.json +++ b/packages/next-auth/package.json @@ -129,6 +129,6 @@ "whatwg-fetch": "^3.6.2" }, "engines": { - "node": "^12.19.0 || ^14.15.0 || ^16.13.0" + "node": "^12.19.0 || ^14.15.0 || ^16.13.0 || ^18.12.0" } }