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: bump node min version to 10.13.0 #22400

Merged
merged 14 commits into from
Mar 20, 2020
Merged

chore: bump node min version to 10.13.0 #22400

merged 14 commits into from
Mar 20, 2020

Conversation

freiksenet
Copy link
Contributor

@freiksenet freiksenet commented Mar 19, 2020

Node 8 reached end of life in December of 2019. There were deprecation warnings about it in previous Gatsby versions. Less than 3% of Gatsby users are still using Node 8. Some libraries that Gatsby or Gatsby plugins depend on have dropped Node 8. This meant that we were locked into using an older version of packages and couldn’t apply the latest bugfixes (that was a case with, e.g., sharp or got). Some performance and memory improvements were only possible with newer versions of Node too.

Evaluating all those factors, we decided that it’s better to drop Node 8 support in a minor version, rather than wait further.

@freiksenet freiksenet requested review from a team as code owners March 19, 2020 12:31
@wardpeet
Copy link
Contributor

Can we explicitly set circleci to test 10.13 so we don't have regressions when upgrading packages.

@wardpeet
Copy link
Contributor

Sorry mostly talking about

default: "10"

@pvdz
Copy link
Contributor

pvdz commented Mar 19, 2020

The changes lgtm. I think this PR is more about what's missing but I think we're looking good...

Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need .yarn/releases/yarn-1.21.0.js in our repo? It's an extra 5mb

@freiksenet
Copy link
Contributor Author

@wardpeet Yes if we want to make sure Yarn is of correct version.

@wardpeet wardpeet changed the title Drop node 8 chore: bump node min version to 10.13.0 Mar 20, 2020
@wardpeet
Copy link
Contributor

why don't we install it in circleci instead?

Co-Authored-By: Dan Kirkham <herecy@live.co.uk>
Copy link
Contributor

@wardpeet wardpeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Added a few typo fixes and @herecydev also caught one.

docs/blog/2020-03-20-dropping-support-for-node-8/index.md Outdated Show resolved Hide resolved
docs/blog/2020-03-20-dropping-support-for-node-8/index.md Outdated Show resolved Hide resolved
Co-Authored-By: Ward Peeters <ward@coding-tech.com>
@NickColley
Copy link

NickColley commented May 13, 2020

Heya folks (cc @freiksenet, @wardpeet),

We have a project that depends on on Gatsby version ^2.9.8 with Node.js version 8, which in turn depends on gatsby-cli ^2.6.11, since the caret (^) updates minor/patch versions it has resolved to version 2.12.18 which means it has broken our build.

Should have this bump been in a major version (3.0.0) for gatsby-cli? If so it would be helpful if you could publish some new versions to address it.

I will look into the possibility of having a locked version by modifying a package-lock, and of course upgrading the project. This project is something that we're maintaining without active feature development so you can imagine this is not trivial.

Just raising in case this is helpful, I may be mistaken, let me know if you'd like any more information.

@herecydev
Copy link
Contributor

@NickColley See https://www.gatsbyjs.org/docs/upgrading-node-js/ for some further explanation. A lockfile (either yarn or npm) and constraining the version using a tilda would solve this for you, i.e. ~2.9.8

@freiksenet
Copy link
Contributor Author

@NickColley Thanks for the heads up!

We are very sorry for this situation, we are always trying to not do changes like that during minor releases. Unfortunately we didn't have a proper major version release process, which forced us to do this kind of change because of Node deprecation. We are changing the process so that we have a regular major version release cadence and this will let us be more stable in between those releases.

I recommend locking the version in package-lock.json for now or upgrading Node - there shouldn't be any breaking changes except for node version between those versions of Gatsby.

@NickColley
Copy link

NickColley commented May 13, 2020

It would be really helpful if you could commit to your stance here:

Gatsby takes backwards compatibility seriously

As soon as you realize that you’ve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backwards compatibility. Even under this circumstance, it is unacceptable to modify versioned releases. If it’s appropriate, document the offending version and inform your users of the problem so that they are aware of the offending version.

In the meantime I'll attempt to upgrade our applications dependencies as pinning the version in the package-lock is not working out. Thanks for the reply, good luck. 👍

NickColley pushed a commit to Financial-Times/x-dash that referenced this pull request May 13, 2020
Gatsby has made a breaking change in a minor version so we need to update to avoid the build breaking.

gatsbyjs/gatsby#22400 (comment)
@pieh pieh mentioned this pull request Dec 9, 2020
rowanbeentje pushed a commit to Financial-Times/x-dash that referenced this pull request Nov 24, 2021
Gatsby has made a breaking change in a minor version so we need to update to avoid the build breaking.

gatsbyjs/gatsby#22400 (comment)
mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
Drop node 8 support and bump min version to 10.13.0

Co-Authored-By: Dan Kirkham <herecy@live.co.uk>
Co-Authored-By: Ward Peeters <ward@coding-tech.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
Co-authored-by: Dan Kirkham <herecy@live.co.uk>
Co-authored-by: Ward Peeters <ward@coding-tech.com>
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.

6 participants