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

Update node version requirement #646

Merged
merged 2 commits into from Jul 2, 2019
Merged

Update node version requirement #646

merged 2 commits into from Jul 2, 2019

Conversation

iiroj
Copy link
Member

@iiroj iiroj commented Jul 2, 2019

PR adds the lowest required node version to package.json's engines.node to the bin entrypoint. The requirement currently comes from execa.

It also updates the CI environments to test with node versions 8, 10 and 12, because version 9 isn't really supported.

Replaces PR #525 as stale.

@codecov
Copy link

codecov bot commented Jul 2, 2019

Codecov Report

Merging #646 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #646   +/-   ##
=======================================
  Coverage   98.69%   98.69%           
=======================================
  Files          11       11           
  Lines         306      306           
  Branches       59       59           
=======================================
  Hits          302      302           
  Misses          4        4

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e24aaf2...47d5322. Read the comment docs.

@iiroj iiroj requested a review from okonet July 2, 2019 05:36
DanielRuf
DanielRuf previously approved these changes Jul 2, 2019
@okonet
Copy link
Collaborator

okonet commented Jul 2, 2019

We removed that some time ago to support users with Node 6 on the CI where the package would fail the installation. We do the node version validation with “please-upgrade-node”.

@DanielRuf
Copy link

But is NodeJS 6 even tested on CI currently? Normally this should live in package.json.

@iiroj
Copy link
Member Author

iiroj commented Jul 2, 2019

@okonet Would something like this work then?

require('please-upgrade-node')(pkg, {
  exitCode: process.env.CI ? 0 : 1 // Do not fail with exit code 1 on CI
})

Although I'm not really sure why we wouldn't fail, given how that package doesn't really support Node v6.

@iiroj
Copy link
Member Author

iiroj commented Jul 2, 2019

Ah, so if this package is a dev-dependency, running npm install might fail on the CI when dev-dependencies are also installed, when CI runs on Node v6.

With yarn, there's yarn --ignore-engines, but on npm there's nothing similar (See issue).

Maybe I'll move the engines field back to index.js.

Iiro Jäppinen added 2 commits July 2, 2019 09:50
The lowest version of node required by explicit dependencies is ^8.12.0 specified by Execa
@iiroj iiroj changed the title Specify node version requirement in package.json Update node version requirement Jul 2, 2019
@okonet
Copy link
Collaborator

okonet commented Jul 2, 2019

if this package is a dev-dependency, running npm install might fail on the CI when dev-dependencies are also installed, when CI runs on Node v6.

Exactly.

@okonet
Copy link
Collaborator

okonet commented Jul 2, 2019

Related issue #515

@iiroj
Copy link
Member Author

iiroj commented Jul 2, 2019

I edited the commits to keep the current behaviour. The other changes are still valid, though, and required before updating devDependencies.

@okonet okonet merged commit 6c1e42f into master Jul 2, 2019
@okonet
Copy link
Collaborator

okonet commented Jul 2, 2019

🎉 This PR is included in version 9.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@okonet okonet added the released label Jul 2, 2019
@iiroj iiroj deleted the engines-specification branch July 2, 2019 12:43
@IgnusG
Copy link

IgnusG commented Jul 5, 2019

Too bad, breaks legacy aws builds which require 8.10

@iiroj
Copy link
Member Author

iiroj commented Jul 5, 2019

@IgnusG: if it’s possible for you to test this package manually and confirm it still works, we can downgrade the requirement. It’s just that execa specifies this version in their package.json, so even if lint-stage didn’t it might still not work.

@DanielRuf
Copy link

Should be ok that it requires a newer NodeJS version.

This PR is included in version 9.0.1

Not directly a major version but you should be fine with 8.x.x.

@IgnusG
Copy link

IgnusG commented Jul 6, 2019

9.0.0 works fine for me

@DanielRuf
Copy link

9.0.0 works fine for me

Sure but then you should make sure that you pin it to this version in package.json as the default SemVer selectors ^ and ~ will pull a newer version when it is not properly pinned.

@IgnusG
Copy link

IgnusG commented Jul 6, 2019

9.0.0 works fine for me

Sure but then you should make sure that you pin it to this version in package.json as the default SemVer selectors ^ and ~ will pull a newer version when it is not properly pinned.

Yap, already done ;)

@artem-zakharchenko
Copy link

artem-zakharchenko commented Jul 9, 2019

Imho bumping a required version of Node is at least a breaking change, and should've been communicated as such (warnings in previous release, deprecation in the next one). As lint-staged begins to throw in applications operating with the < 8.12 version of Node, while being updated to the next patch version.

@iiroj
Copy link
Member Author

iiroj commented Jul 9, 2019

@artem-zakharchenko I agree on principle, but figured this just syncing to the correct requirement based on dependencies.

If execa works on lower version, should we also open an issue there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

5 participants