chore(federation)!: Drop support for Node.js 8 and Node.js 10. #311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGE: This PR drops support for versions of Node.js prior to v12 that were still supported in the
@apollo/federation
package, leaving only support for Node.js 12+ LTS (Long-Term Support) versions.This aligns the supported versions of
@apollo/federation
with those supported by@apollo/gateway
, which first received this treatment in apollographql/apollo-server#4031 for performance gains. Conversely to the motivation for that PR, performance gains are NOT expected from this change for the@apollo/federation
package since it's not invoked per-request and has limited runtime computational cycles.Aside from the impending end-of-life (EOL) cycle for Node.js 10 that is coming in April 2021, and dropping support for Node.js 8 which lapsed at the end of 2019, the motivating reason for releasing this change now is to remove the need for the
@apollo/federation
package to continue to leverageapollo-server-env
, which brings globally-loaded polyfills fromcore-js
and afetch
polyfill in Node.js environments that causes additional struggles when trying to package the@apollo/federation
with bundling tools like Webpack or Rollup.If this change proves to be problematic for any users of
@apollo/federation
, I'm happy to reconsider this and possibly revert it until the end of April 2021 (again, when Node.js 10 is completely end-of-life), but I would strongly suggest that users update their Node.js runtimes to a newer version of Node.js prior to that time, as once it is end-of-life'd continuing to support old Node.js versions won't continue to be an option.