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

Align node 'engines' tag with our pre-requisite documentation #5966

Merged
merged 1 commit into from
Aug 19, 2019

Conversation

vince-fugnitto
Copy link
Member

What it does

Fixes #2887

  • align our engines tag in package.json found at the root
    of the repository with the prerequisites. This will fail to compile
    the code if there is an unsupported node version being used.

Documentation: https://docs.npmjs.com/files/package.json#engines

How to test

  1. compile the application with a node version within the ranges of the prerequisites - this should work normally as expected.
  2. compile the application with an unsupported node version. (ex: nvm install 12 then nvm use 12 and yarn) - this should fail the compilation early.

Example:

$ nvm install 12
$ nvm use 12
$ yarn

yarn install v1.12.3
$ node-gyp install
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.8.1 | darwin | x64
gyp http GET https://nodejs.org/download/release/v12.8.1/node-v12.8.1-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v12.8.1/node-v12.8.1-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v12.8.1/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v12.8.1/SHASUMS256.txt
12.8.1
gyp info ok
[1/5] 🔍  Validating package.json...
error parent@0.0.0: The engine "node" is incompatible with this module. Expected version ">=10.2.0 && <12". Got "12.8.1"
error Found incompatible module
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

Review checklist

Reminder for reviewers

Signed-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com

Fixes #2887

- align our `engines` tag in `package.json` found at the root
of the repository with the prerequisites. This will fail to compile
the code if there is an unsupported node version being used.

Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto vince-fugnitto self-assigned this Aug 16, 2019
@akosyakov akosyakov added the ci issues related to CI / tests label Aug 17, 2019
Copy link
Contributor

@lmcbout lmcbout left a comment

Choose a reason for hiding this comment

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

LGTM, works fine

@vince-fugnitto
Copy link
Member Author

Thank you @lmcbout for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci issues related to CI / tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use "engines" in package.json to specify Node version
3 participants