Skip to content

Commit

Permalink
Upgrade monorepo and docs to npm@7 and enable engine-strict (#5162)
Browse files Browse the repository at this point in the history
Inspired by apollographql/federation#708 as well
as the Netlify change in
apollographql/federation#713

This also fixes engines declarations in the individual packages which
should have been done in #5137.

Also fix a weird problem related to `@apollo/protobufjs`. For some reason, Node 12 and 14 with npm 7 (but not Node 16!) was running into an issue where the fact that `@apollo/protobufjs` doesn't actually depend on a bunch of packages like `espree` that its CLI needs caused the `apollo-pbjs` calls to fail. I think when we forked, protobuf.js was midway through a refactor to make the CLI into a separate package, but we haven't set that up to work in our fork.  Adding all those big packages as dependencies of `@apollo/protobufjs` didn't seem great because that would make them non-dev dependencies of apollo-server themselves. Splitting the packages (and making the CLI package a devDep of apollo-reporting-protobuf) is the best long-term solution but for now adding the CLI deps as devDependencies of apollo-reporting-protobuf appears to work?
  • Loading branch information
glasser committed May 3, 2021
1 parent e71c0b2 commit 92e688d
Show file tree
Hide file tree
Showing 33 changed files with 47,106 additions and 389 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ orbs:
# `oss` is a local reference to the package. The source for Apollo Orbs can
# be found at http://github.com/apollographql/CircleCI-Orbs/.
# We could use Renovate to bump this version via PR, but that's not setup now.
oss: apollo/[email protected].17
oss: apollo/[email protected].18

commands:
# These are the steps used for each version of Node which we're testing
Expand All @@ -17,7 +17,8 @@ commands:
common_test_steps:
description: "Commands to run on every Node.js environment"
steps:
- oss/install_specific_npm_version
- oss/install_specific_npm_version:
version: '7'
- checkout
- oss/npm_clean_install_with_caching
- run:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions docs/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
2 changes: 1 addition & 1 deletion docs/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14
16
24,475 changes: 24,239 additions & 236 deletions docs/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"engines": {
"node": ">=16 <17",
"npm": "6.x"
"npm": "7.x"
},
"scripts": {
"prestart": "gatsby clean",
Expand Down
5 changes: 4 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
base = "docs/"
publish = "docs/public/"
command = "gatsby build --prefix-paths && mkdir -p docs/apollo-server && mv public/* docs/apollo-server && mv docs public/ && mv public/docs/apollo-server/_redirects public"


[build.environment]
NODE_VERSION = "16"
NPM_VERSION = "7"
Loading

0 comments on commit 92e688d

Please sign in to comment.