From 95db0d1199c4c71294ff5c4fda4de51a5fc59e06 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:11:39 -0700 Subject: [PATCH 1/8] Expand support for node@18 --- .circleci/config.yml | 12 ++++++------ composition-js/package.json | 2 +- gateway-js/package.json | 2 +- internals-js/package.json | 2 +- package.json | 2 +- query-graphs-js/package.json | 2 +- query-planner-js/package.json | 2 +- subgraph-js/package.json | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c0c2337e9..79f092c00 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,9 +64,9 @@ jobs: steps: - common_test_steps - NodeJS 17: + NodeJS 18: docker: - - image: cimg/node:17.0.0 + - image: cimg/node:18.0.0 steps: - common_test_steps @@ -138,8 +138,8 @@ workflows: - NodeJS 16: name: "JS: Node 16" <<: *common_non_publish_filters - - NodeJS 17: - name: "JS: Node 17" + - NodeJS 18: + name: "JS: Node 18" <<: *common_non_publish_filters - GraphQL Types: name: "GraphQL Types (up to date)" @@ -157,7 +157,7 @@ workflows: - "JS: Node 12" - "JS: Node 14" - "JS: Node 16" - - "JS: Node 17" + - "JS: Node 18" - "GraphQL Types (up to date)" - "Error code Doc (up to date)" - oss/dry_run: @@ -167,7 +167,7 @@ workflows: - "JS: Node 12" - "JS: Node 14" - "JS: Node 16" - - "JS: Node 17" + - "JS: Node 18" - "GraphQL Types (up to date)" - "Error code Doc (up to date)" - oss/confirmation: diff --git a/composition-js/package.json b/composition-js/package.json index a95629155..470bfaaa3 100644 --- a/composition-js/package.json +++ b/composition-js/package.json @@ -21,7 +21,7 @@ "author": "Apollo ", "license": "SEE LICENSE IN ./LICENSE", "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "publishConfig": { "access": "public" diff --git a/gateway-js/package.json b/gateway-js/package.json index 70fb0fff5..dc20acf27 100644 --- a/gateway-js/package.json +++ b/gateway-js/package.json @@ -18,7 +18,7 @@ "apollo" ], "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "license": "SEE LICENSE IN ./LICENSE", "publishConfig": { diff --git a/internals-js/package.json b/internals-js/package.json index d6c85c501..0ede64216 100644 --- a/internals-js/package.json +++ b/internals-js/package.json @@ -20,7 +20,7 @@ "author": "Apollo ", "license": "SEE LICENSE IN ./LICENSE", "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "dependencies": { "@apollo/core-schema": "~0.3.0", diff --git a/package.json b/package.json index cf05e9ea4..79e587fb8 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "hints-doc:check": "npm run hints-doc && git diff --exit-code" }, "engines": { - "node": ">=12.13.0 <18.0", + "node": ">=12.13.0", "npm": ">=7 <9" }, "dependencies": { diff --git a/query-graphs-js/package.json b/query-graphs-js/package.json index ba0d830fc..0ff764a72 100644 --- a/query-graphs-js/package.json +++ b/query-graphs-js/package.json @@ -20,7 +20,7 @@ "author": "Apollo ", "license": "SEE LICENSE IN ./LICENSE", "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "dependencies": { "@apollo/federation-internals": "file:../internals-js", diff --git a/query-planner-js/package.json b/query-planner-js/package.json index cd99f4252..8f050f6ec 100644 --- a/query-planner-js/package.json +++ b/query-planner-js/package.json @@ -18,7 +18,7 @@ "apollo" ], "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "license": "SEE LICENSE IN ./LICENSE", "publishConfig": { diff --git a/subgraph-js/package.json b/subgraph-js/package.json index 22e58d773..e27992bb1 100644 --- a/subgraph-js/package.json +++ b/subgraph-js/package.json @@ -18,7 +18,7 @@ "author": "Apollo ", "license": "MIT", "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "publishConfig": { "access": "public" From 7e694efdd0a645aebf3c36fb31164d859b663fe9 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:20:38 -0700 Subject: [PATCH 2/8] Install npm@8 for node@18 tests --- .circleci/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79f092c00..9b35dcc83 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -68,7 +68,18 @@ jobs: docker: - image: cimg/node:18.0.0 steps: - - common_test_steps + - oss/install_specific_npm_version: + version: '8' + - checkout + - oss/npm_clean_install_with_caching + - run: + command: npm run test:ci + environment: + JEST_JUNIT_OUTPUT_DIR: "reports/junit/" + - store_test_results: + path: reports/junit + - store_artifacts: + path: reports/junit GraphQL Types: description: "Assert generated GraphQL types are up to date" From 734480a2c9ec0271a4c3352a4f57bcdee4d30beb Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:24:34 -0700 Subject: [PATCH 3/8] Use params for npm version --- .circleci/config.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b35dcc83..7adbf69c6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,9 +16,13 @@ commands: # something different. Probably best to avoid that, out of principle, though. common_test_steps: description: "Commands run on each Node.js job" + parameters: + npm_version: + default: '7' + type: string steps: - oss/install_specific_npm_version: - version: '7' + version: '<>' - checkout - oss/npm_clean_install_with_caching - run: @@ -68,18 +72,8 @@ jobs: docker: - image: cimg/node:18.0.0 steps: - - oss/install_specific_npm_version: - version: '8' - - checkout - - oss/npm_clean_install_with_caching - - run: - command: npm run test:ci - environment: - JEST_JUNIT_OUTPUT_DIR: "reports/junit/" - - store_test_results: - path: reports/junit - - store_artifacts: - path: reports/junit + - common_test_steps: + npm_version: '8' GraphQL Types: description: "Assert generated GraphQL types are up to date" From 86575c2d1480ad4e2b3e55040da30eb464b5d4df Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:27:50 -0700 Subject: [PATCH 4/8] Update node image --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7adbf69c6..8524f3f81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,7 +70,7 @@ jobs: NodeJS 18: docker: - - image: cimg/node:18.0.0 + - image: cimg/node:18.2.0 steps: - common_test_steps: npm_version: '8' From 9e65f9860609618400e5b359bce3925a37655b2e Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:33:04 -0700 Subject: [PATCH 5/8] Is 'specific npm version' still needed? --- .circleci/config.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8524f3f81..0b4591b23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,13 +16,7 @@ commands: # something different. Probably best to avoid that, out of principle, though. common_test_steps: description: "Commands run on each Node.js job" - parameters: - npm_version: - default: '7' - type: string steps: - - oss/install_specific_npm_version: - version: '<>' - checkout - oss/npm_clean_install_with_caching - run: @@ -72,8 +66,7 @@ jobs: docker: - image: cimg/node:18.2.0 steps: - - common_test_steps: - npm_version: '8' + - common_test_steps GraphQL Types: description: "Assert generated GraphQL types are up to date" From cb997e59815f977aa0fa1fd02e847aa11f3049b6 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:35:26 -0700 Subject: [PATCH 6/8] Update utils deps which allow node 18 --- gateway-js/package.json | 4 +-- package-lock.json | 54 ++++++++++++++++++++--------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/gateway-js/package.json b/gateway-js/package.json index dc20acf27..2084b6ad9 100644 --- a/gateway-js/package.json +++ b/gateway-js/package.json @@ -29,9 +29,9 @@ "@apollo/core-schema": "~0.3.0", "@apollo/federation-internals": "file:../internals-js", "@apollo/query-planner": "file:../query-planner-js", - "@apollo/utils.createhash": "^1.0.0", + "@apollo/utils.createhash": "^1.1.0", "@apollo/utils.fetcher": "^1.0.0", - "@apollo/utils.isnodelike": "^1.0.0", + "@apollo/utils.isnodelike": "^1.1.0", "@apollo/utils.logger": "^1.0.0", "@josephg/resolvable": "^1.0.1", "@opentelemetry/api": "^1.0.1", diff --git a/package-lock.json b/package-lock.json index caf71f131..abd66d7b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,7 +61,7 @@ "winston-transport": "4.5.0" }, "engines": { - "node": ">=12.13.0 <18.0", + "node": ">=12.13.0", "npm": ">=7 <9" } }, @@ -74,7 +74,7 @@ "@apollo/query-graphs": "file:../query-graphs-js" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "peerDependencies": { "graphql": "^16.0.0" @@ -98,9 +98,9 @@ "@apollo/core-schema": "~0.3.0", "@apollo/federation-internals": "file:../internals-js", "@apollo/query-planner": "file:../query-planner-js", - "@apollo/utils.createhash": "^1.0.0", + "@apollo/utils.createhash": "^1.1.0", "@apollo/utils.fetcher": "^1.0.0", - "@apollo/utils.isnodelike": "^1.0.0", + "@apollo/utils.isnodelike": "^1.1.0", "@apollo/utils.logger": "^1.0.0", "@josephg/resolvable": "^1.0.1", "@opentelemetry/api": "^1.0.1", @@ -116,7 +116,7 @@ "pretty-format": "^27.0.0" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "peerDependencies": { "graphql": "^16.0.0" @@ -304,7 +304,7 @@ "js-levenshtein": "^1.1.6" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "peerDependencies": { "graphql": "^16.0.0" @@ -414,15 +414,15 @@ "link": true }, "node_modules/@apollo/utils.createhash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-1.0.0.tgz", - "integrity": "sha512-FsijruGzaD+mNdelqXKgO+PCvdxD16rbN275oHGcVbhQixvdXfUSgqwfjUJSPFJAQoW/QvyoNaVf7M51gJNiTw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-1.1.0.tgz", + "integrity": "sha512-5fT4ZiW75515OlikWpIQzaVDws1yy9VgYSoHoJCrvI2UH6/7YNKXQjbjT5qVYu6ytch2wBxFMfFfYWMn/2bSCQ==", "dependencies": { - "@apollo/utils.isnodelike": "^1.0.0", + "@apollo/utils.isnodelike": "^1.1.0", "sha.js": "^2.4.11" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" } }, "node_modules/@apollo/utils.fetcher": { @@ -431,11 +431,11 @@ "integrity": "sha512-SpJH69ffk91BoYSVb12Dt/jFQKVOrm4NE59XUeHXRsha1xBmxjvZNN6qvYySAcGjloW4TtFZYlPkBpwjMRWymw==" }, "node_modules/@apollo/utils.isnodelike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-1.0.0.tgz", - "integrity": "sha512-uS0TNODZXYDiKp5r+OXUtqLcjgcJ7s0GyY8m+TGnYOLu6CpqL4BiJSR54o4gXK+oxFGWy7Fs2NjVJtjFVt8ifg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-1.1.0.tgz", + "integrity": "sha512-q/Q82kBUSEcx1ED11JO1TYBY781mWluUnBD8NvhjHVsu1K1C5R9BZVUxShyK/V8XcePcRUB5fdWOcBMGwS0KOA==", "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" } }, "node_modules/@apollo/utils.logger": { @@ -19241,7 +19241,7 @@ "ts-graphviz": "^0.16.0" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "peerDependencies": { "graphql": "^16.0.0" @@ -19259,7 +19259,7 @@ "pretty-format": "^27.0.0" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "peerDependencies": { "graphql": "^16.0.0" @@ -19273,7 +19273,7 @@ "@apollo/federation-internals": "file:../internals-js" }, "engines": { - "node": ">=12.13.0 <18.0" + "node": ">=12.13.0" }, "peerDependencies": { "graphql": "^16.0.0" @@ -19331,9 +19331,9 @@ "@apollo/core-schema": "~0.3.0", "@apollo/federation-internals": "file:../internals-js", "@apollo/query-planner": "file:../query-planner-js", - "@apollo/utils.createhash": "^1.0.0", + "@apollo/utils.createhash": "^1.1.0", "@apollo/utils.fetcher": "^1.0.0", - "@apollo/utils.isnodelike": "^1.0.0", + "@apollo/utils.isnodelike": "^1.1.0", "@apollo/utils.logger": "^1.0.0", "@josephg/resolvable": "^1.0.1", "@opentelemetry/api": "^1.0.1", @@ -19533,11 +19533,11 @@ } }, "@apollo/utils.createhash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-1.0.0.tgz", - "integrity": "sha512-FsijruGzaD+mNdelqXKgO+PCvdxD16rbN275oHGcVbhQixvdXfUSgqwfjUJSPFJAQoW/QvyoNaVf7M51gJNiTw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.createhash/-/utils.createhash-1.1.0.tgz", + "integrity": "sha512-5fT4ZiW75515OlikWpIQzaVDws1yy9VgYSoHoJCrvI2UH6/7YNKXQjbjT5qVYu6ytch2wBxFMfFfYWMn/2bSCQ==", "requires": { - "@apollo/utils.isnodelike": "^1.0.0", + "@apollo/utils.isnodelike": "^1.1.0", "sha.js": "^2.4.11" } }, @@ -19547,9 +19547,9 @@ "integrity": "sha512-SpJH69ffk91BoYSVb12Dt/jFQKVOrm4NE59XUeHXRsha1xBmxjvZNN6qvYySAcGjloW4TtFZYlPkBpwjMRWymw==" }, "@apollo/utils.isnodelike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-1.0.0.tgz", - "integrity": "sha512-uS0TNODZXYDiKp5r+OXUtqLcjgcJ7s0GyY8m+TGnYOLu6CpqL4BiJSR54o4gXK+oxFGWy7Fs2NjVJtjFVt8ifg==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@apollo/utils.isnodelike/-/utils.isnodelike-1.1.0.tgz", + "integrity": "sha512-q/Q82kBUSEcx1ED11JO1TYBY781mWluUnBD8NvhjHVsu1K1C5R9BZVUxShyK/V8XcePcRUB5fdWOcBMGwS0KOA==" }, "@apollo/utils.logger": { "version": "1.0.0", From 75fdfc27445ce951eaecdfea1d68bc147df96a2b Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:40:17 -0700 Subject: [PATCH 7/8] Additional cleanup / updating of node image versions --- .circleci/config.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0b4591b23..90d593fc1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,7 @@ jobs: NodeJS 12: docker: - - image: cimg/node:12.22.1 + - image: cimg/node:12.22 steps: - common_test_steps # We will save the results of this one particular invocation to use in @@ -52,13 +52,13 @@ jobs: NodeJS 14: docker: - - image: cimg/node:14.18.1 + - image: cimg/node:14.19 steps: - common_test_steps NodeJS 16: docker: - - image: cimg/node:16.0.0 + - image: cimg/node:16.15 steps: - common_test_steps @@ -71,10 +71,8 @@ jobs: GraphQL Types: description: "Assert generated GraphQL types are up to date" docker: - - image: cimg/node:14.18.1 + - image: cimg/node:16.15 steps: - - oss/install_specific_npm_version: - version: '7' - checkout - oss/npm_clean_install_with_caching - run: @@ -83,10 +81,8 @@ jobs: Error code Doc: description: "Ensure the error code documentation is up to date" docker: - - image: cimg/node:14.18.1 + - image: cimg/node:16.15 steps: - - oss/install_specific_npm_version: - version: '7' - checkout - oss/npm_clean_install_with_caching - run: @@ -95,10 +91,8 @@ jobs: Hints code Doc: description: "Ensure the hints code documentation is up to date" docker: - - image: cimg/node:14.18.1 + - image: cimg/node:16.15 steps: - - oss/install_specific_npm_version: - version: '7' - checkout - oss/npm_clean_install_with_caching - run: From a93d47f68e3837e1de498b91230d6ebdaccaaa02 Mon Sep 17 00:00:00 2001 From: Trevor Scheer Date: Mon, 23 May 2022 10:43:25 -0700 Subject: [PATCH 8/8] CHANGELOG updates --- composition-js/CHANGELOG.md | 2 ++ gateway-js/CHANGELOG.md | 2 ++ internals-js/CHANGELOG.md | 2 ++ query-graphs-js/CHANGELOG.md | 2 ++ query-planner-js/CHANGELOG.md | 2 ++ subgraph-js/CHANGELOG.md | 2 ++ 6 files changed, 12 insertions(+) diff --git a/composition-js/CHANGELOG.md b/composition-js/CHANGELOG.md index 603ffd03f..92db22e06 100644 --- a/composition-js/CHANGELOG.md +++ b/composition-js/CHANGELOG.md @@ -2,6 +2,8 @@ This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found [here](https://github.com/apollographql/federation/blob/version-0.x/federation-js/CHANGELOG.md) on the `version-0.x` branch of this repo. +- Expand support for Node.js v18 [PR #1884](https://github.com/apollographql/federation/pull/1884) + ## v2.0.1 - Use `for: SECURITY` in the core/link directive application in the supergraph for `@inaccessible` [PR #1715](https://github.com/apollographql/federation/pull/1715) diff --git a/gateway-js/CHANGELOG.md b/gateway-js/CHANGELOG.md index 88e863c3d..747309196 100644 --- a/gateway-js/CHANGELOG.md +++ b/gateway-js/CHANGELOG.md @@ -2,6 +2,8 @@ This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found [here](https://github.com/apollographql/federation/blob/version-0.x/gateway-js/CHANGELOG.md) on the `version-0.x` branch of this repo. +- Expand support for Node.js v18 [PR #1884](https://github.com/apollographql/federation/pull/1884) + ## 2.0.3 - Fix bug with type extension of empty type definition [PR #1821](https://github.com/apollographql/federation/pull/1821) diff --git a/internals-js/CHANGELOG.md b/internals-js/CHANGELOG.md index aec62f589..a8e65ca29 100644 --- a/internals-js/CHANGELOG.md +++ b/internals-js/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG for `@apollo/federation-internals` +- Expand support for Node.js v18 [PR #1884](https://github.com/apollographql/federation/pull/1884) + ## 2.0.3 - Fix bug with type extension of empty type definition [PR #1821](https://github.com/apollographql/federation/pull/1821) diff --git a/query-graphs-js/CHANGELOG.md b/query-graphs-js/CHANGELOG.md index 23bde76b8..6b5bf5c93 100644 --- a/query-graphs-js/CHANGELOG.md +++ b/query-graphs-js/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG for `@apollo/query-graphs` +- Expand support for Node.js v18 [PR #1884](https://github.com/apollographql/federation/pull/1884) + ## 2.0.2 - Fix bug where planning a query with `@require` impacts the plans of followup queries [PR #1783](https://github.com/apollographql/federation/pull/1783). diff --git a/query-planner-js/CHANGELOG.md b/query-planner-js/CHANGELOG.md index ad3bf4646..46bc24393 100644 --- a/query-planner-js/CHANGELOG.md +++ b/query-planner-js/CHANGELOG.md @@ -2,6 +2,8 @@ This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found [here](https://github.com/apollographql/federation/blob/version-0.x/query-planner-js/CHANGELOG.md) on the `version-0.x` branch of this repo. +- Expand support for Node.js v18 [PR #1884](https://github.com/apollographql/federation/pull/1884) + ## 2.0.3 - Fix issue with `@requires` and conditional queries (`@include`/`@skip`) [1835](https://github.com/apollographql/federation/pull/1835). diff --git a/subgraph-js/CHANGELOG.md b/subgraph-js/CHANGELOG.md index 2696ab564..fedfebd5e 100644 --- a/subgraph-js/CHANGELOG.md +++ b/subgraph-js/CHANGELOG.md @@ -2,6 +2,8 @@ This CHANGELOG pertains only to Apollo Federation packages in the 2.x range. The Federation v0.x equivalent for this package can be found [here](https://github.com/apollographql/federation/blob/version-0.x/subgraph-js/CHANGELOG.md) on the `version-0.x` branch of this repo. +- Expand support for Node.js v18 [PR #1884](https://github.com/apollographql/federation/pull/1884) + ## 2.0.3 - Fix output of `printSubgraphSchema` method, ensuring it can be read back by composition and `buildSubgraphSchema` [PR #1831](https://github.com/apollographql/federation/pull/1831).