-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[GENERAL] Add .nvmrc + fix node version for eslint 5 compat #20109
Conversation
Generated by 🚫 dangerJS |
not sure exactly why ios e2e tests are failing on CI, any idea? |
Tests are currently broken on master, sorry about that. I think if we change this we'd have to bump the minimum node version from 8 to 8.10. There might be some docs to update as well as https://github.com/facebook/react-native/blob/master/local-cli/server/checkNodeVersion.js#L17. We actually require 8.3 anyway because of some use of object destructuring. |
Ok thanks, I'll update my PR with doc + checkNodeVersion to 8.10 soon |
# Conflicts: # package.json
@janicduplessis actually not sure if I should make the changes you wanted ReactNative can actually work for node >= 8.3, it's just ESLint which requires 8.10. So it may be a good idea to have a .nvmrc 8.10 for contributors, but not necessary to force end users to use 8.10 as they won't run ESLint anyway. I don't think the engines attribute allow that granularity between distinct version requirement for devtools and consumer code. Maybe it's better to let engine >= 8.3 and only add nvmrc for a recommended contributor version to use? cc @hramos who changed the version recently: https://github.com/facebook/react-native/pull/20236/files |
@slorber that approach sounds good - let's use engine for end-user minimum required Node version, .nvmrc for contributors. |
ok, I've reverted the PR's code to only add a .nvmrc and let the engine >= 8.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This pull request was closed by @slorber in 30b9d81. Once this commit is added to a release, you will see the corresponding version tag below the description at 30b9d81. If the commit has a single |
A .nvmrc file is practical when working on many node projects with different version requirements.
Also, the current required node engine is incompatible with eslint5 requirements:
It produces the following warning on install:
I made the requirement compatible with eslint5 requirements
Test Plan:
yarn test
is still passingRelease Notes:
[GENERAL] [ENHANCEMENT] Add .nvmrc and ensure node version required is compatible with ESLint 5