Skip to content
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

Version 5 #7515

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
716e00b
initial commit - drop support for node v14
trevor-scheer Mar 28, 2023
4a6f43c
changeset
trevor-scheer Apr 17, 2023
4a9dd74
Specify target of ES2015 (required by lru-cache major which uses priv…
trevor-scheer Apr 17, 2023
13f0ee1
Stop testing Node 14, start testing Node 20
trevor-scheer Apr 17, 2023
ec0862d
missed a target
trevor-scheer Apr 17, 2023
ed04d99
Remove config option
trevor-scheer Apr 18, 2023
440b97b
changeset
trevor-scheer Apr 18, 2023
229ffee
migration guide
trevor-scheer Apr 18, 2023
4022320
v4 docs should no longer redirect to main (which is now v5)
trevor-scheer Apr 18, 2023
f884c9e
clean up references to AS4 + misc docs cleanup
trevor-scheer Apr 18, 2023
9a19cd5
pick the highest npm version compatible with CS:CI
trevor-scheer Apr 18, 2023
2827286
lockfile
trevor-scheer Apr 18, 2023
8cca0cc
update node version
trevor-scheer Apr 18, 2023
1c538de
Revert a few things
trevor-scheer Apr 28, 2023
c2ea69b
update test
trevor-scheer Apr 28, 2023
106fc66
node 20 test updates
trevor-scheer Apr 28, 2023
c7cedc1
update previously blocked major versions
trevor-scheer Jul 24, 2023
a09145c
remove precomputedNonce
trevor-scheer Jul 24, 2023
4b99b26
target es2015 for smoke tests
trevor-scheer Jul 24, 2023
5d939f3
cleanup unused imports
trevor-scheer Jul 24, 2023
1c4dd18
Merge branch 'main' into version-5
trevor-scheer Jul 28, 2023
04d8f07
remove a couple fixmes
trevor-scheer Jul 28, 2023
be62ec0
drop node 16 as well (eol in ~6 weeks)
trevor-scheer Jul 28, 2023
5753454
Remove node-abort-controller
trevor-scheer Jul 28, 2023
4716838
allow npm@8 for csci
trevor-scheer Jul 28, 2023
bca644d
Update docs/source/migration.mdx
trevor-scheer Jul 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/curvy-crabs-play.md
Expand Up @@ -5,4 +5,4 @@
'@apollo/server': major
---

Drop support for Node 14
Drop support for Node 14 and Node 16
1 change: 0 additions & 1 deletion .circleci/config.yml
Expand Up @@ -139,7 +139,6 @@ workflows:
matrix:
parameters:
node-version:
- "16"
- "18"
- "20"
- "Check for FIXM\x45"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/getting-started.mdx
Expand Up @@ -10,7 +10,7 @@ This tutorial helps you:
- Run an instance of Apollo Server that lets you execute queries against your schema

This tutorial assumes that you are familiar with the command line and
JavaScript and have installed a recent Node.js (v16.14.0+) version. Additionally, for those interested, this tutorial includes an optional section describing how to set up Apollo Server with TypeScript.
JavaScript and have installed a recent Node.js (v18.0.0+) version. Additionally, for those interested, this tutorial includes an optional section describing how to set up Apollo Server with TypeScript.

## Step 1: Create a new project

Expand Down
6 changes: 2 additions & 4 deletions docs/source/migration.mdx
Expand Up @@ -14,13 +14,11 @@ While Apollo Server v4 came with numerous breaking changes, the Apollo Server te

### Node.js

Apollo Server 5 supports Node.js 16.14.0 and later. (Apollo Server 4 supports Node.js 14.16.0.) This includes all LTS and Current major versions at the time of release.
Apollo Server 5 supports Node.js 18.0.0 and later. (Apollo Server 4 supports Node.js 14.16.0.) This includes all LTS and Current major versions at the time of release.

If you're using Node.js 14, upgrade your runtime before upgrading to Apollo Server 5.

(Apollo Server 5 specifically requires v16.14.0 instead of v16.0.0, because that is the minimum version of Node.js 16 supported by the transitive [`lru-cache` dependency](https://github.com/isaacs/node-lru-cache/commit/c237c1d64ebc2142da4f8324adb3ef300b0428bd), which makes use of `AbortController`.)

If upgrading to Node.js 16 is not possible, you can upgrade to or continue to use Apollo Server 4 without issue.
If upgrading to Node.js 18 is not possible, you can upgrade to or continue to use Apollo Server 4 without issue.
trevor-scheer marked this conversation as resolved.
Show resolved Hide resolved

## Default behavior change

Expand Down
2 changes: 1 addition & 1 deletion docs/source/using-federation/apollo-gateway-setup.mdx
Expand Up @@ -17,7 +17,7 @@ Regardless of which graph router library you start with, you can swap to the oth

## Node.js gateway setup

This section walks through setting up a basic graph router using Apollo Server and the `@apollo/gateway` library. It currently requires [Node.js version 14 or 16](https://nodejs.org/en/download/).
This section walks through setting up a basic graph router using Apollo Server and the `@apollo/gateway` library. It currently requires [Node.js version >=14.15.0](https://nodejs.org/en/download/).

Create a new Node.js project with `npm init`, then install the necessary packages:

Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -34,8 +34,8 @@
"packages/*"
],
"engines": {
"node": ">=16.14.0",
"npm": ">=8.19.2"
"node": ">=18",
"npm": ">=9"
},
"devDependencies": {
"@apollo/client": "3.7.17",
Expand All @@ -60,7 +60,7 @@
"@types/lodash.sumby": "4.6.7",
"@types/lodash.xorby": "4.7.7",
"@types/negotiator": "0.6.1",
"@types/node": "16.18.21",
"@types/node": "18.17.1",
"@types/node-fetch": "2.6.4",
"@types/qs-middleware": "1.0.1",
"@types/retry": "0.12.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/integration-testsuite/package.json
Expand Up @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/apollographql/apollo-server#readme",
"engines": {
"node": ">=16.14.0"
"node": ">=18"
},
"dependencies": {
"@apollo/cache-control-types": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-response-cache/package.json
Expand Up @@ -29,7 +29,7 @@
},
"homepage": "https://github.com/apollographql/apollo-server#readme",
"engines": {
"node": ">=16.14.0"
"node": ">=18"
},
"dependencies": {
"@apollo/utils.createhash": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Expand Up @@ -122,7 +122,7 @@
},
"homepage": "https://github.com/apollographql/apollo-server#readme",
"engines": {
"node": ">=16.14.0"
"node": ">=18"
},
"dependencies": {
"@apollo/cache-control-types": "^1.0.3",
Expand Down
1 change: 1 addition & 0 deletions packages/server/src/plugin/drainHttpServer/index.ts
Expand Up @@ -32,6 +32,7 @@ export function ApolloServerPluginDrainHttpServer(
async serverWillStart() {
return {
async drainServer() {
// FIXME: with Node 18 can we resolve this?
// Note: we don't use `AbortSignal.timeout()` here because our
// polyfill doesn't support it (and even once we drop Node v14
// support, if we don't require at least Node v16.14 then the built-in
Expand Down
1 change: 1 addition & 0 deletions packages/server/src/plugin/usageReporting/plugin.ts
Expand Up @@ -313,6 +313,7 @@ export function ApolloServerPluginUsageReporting<TContext extends BaseContext>(
// Retry on network errors and 5xx HTTP
// responses.
async () => {
// FIXME: resolve this with Node 18
// Note that once we require Node v16 we can use its global
// AbortController instead of the one from `node-abort-controller`.
const controller = new AbortController();
Expand Down
6 changes: 3 additions & 3 deletions renovate.json5
Expand Up @@ -48,11 +48,11 @@
matchPaths: ["packages/integration-testsuite/package.json"],
rangeStrategy: "pin",
},
// We need to support Node v16, so we don't allow ourselves to use type definitions
// that would let us write >v16-specific code.
// We need to support Node v18, so we don't allow ourselves to use type definitions
// that would let us write >v18-specific code.
{
matchPackageNames: ["@types/node"],
allowedVersions: "16.x"
allowedVersions: "18.x"
},
// node-fetch v3 only ships as ESM. We currently build as both CommonJS and
// ESM and we're not going to go ESM-only for a while. So let's stay on v2.
Expand Down