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

chore(federation)!: Drop support for Node.js 8 and Node.js 10. #311

Merged
merged 5 commits into from
Jan 13, 2021

Conversation

abernix
Copy link
Member

@abernix abernix commented Dec 30, 2020

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 leverage apollo-server-env, which brings globally-loaded polyfills from core-js and a fetch 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.

This commit reverts e93d8d4, which was once
necessary (as its own description notes) for Node.js 6, which is no longer
a supported runtime of this package (it is far outside Node.js LTS support).
@abernix abernix changed the title chore(federation): Drop support for Node.js 8 and Node.js 10. chore(federation)!: Drop support for Node.js 8 and Node.js 10. Dec 30, 2020
federation-js/jest.config.js Outdated Show resolved Hide resolved
federation-js/package.json Show resolved Hide resolved
federation-js/package.json Show resolved Hide resolved
@abernix abernix merged commit d7ca0bc into main Jan 13, 2021
@abernix abernix deleted the abernix/drop-federation-node-8-and-10 branch January 13, 2021 20:45
glasser added a commit that referenced this pull request Apr 26, 2021
I believe this was only needed for compatibility with old versions of
Node and hasn't been required since #311. That PR removed the explicit
dependency on core-js from federation-js/package.json, but didn't remove
this import, which breaks build scenarios that are more strict about
dependency declaration.

Fixes #692.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants