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(devs-infra): minimum node version at 10.21.0 #1793

Merged
merged 2 commits into from Jul 12, 2020
Merged

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Jul 11, 2020

Summary

Not all node 10 versions are supported by Jest, better we set minimum version node 10 at latest node 10 which is 10.21.0

This change only affects to development but not end users

Test plan

Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

@ahnpnl ahnpnl requested a review from kulshekhar as a code owner July 11, 2020 16:30
@coveralls
Copy link

coveralls commented Jul 11, 2020

Pull Request Test Coverage Report for Build 5328

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.721%

Totals Coverage Status
Change from base Build 5326: 0.0%
Covered Lines: 1056
Relevant Lines: 1091

💛 - Coveralls

@@ -130,6 +130,6 @@
]
},
"engines": {
"node": ">= 10"
"node": ">= 10.21.0"
Copy link
Owner

Choose a reason for hiding this comment

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

If a user has the engine-strict flag set to true, they won't be able to use ts-jest with node versions < 10.21.0, right?
Do we want that behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this change doesn't impact to end users unless we distribute ts-jest with engineStrict: true in our package.json. I've tested the scenario that end users set engineStrict: true but it doesn't prevent from installing ts-jest. Only when we explicitly set in our package.json, then end users won't be able to install.

So this change is safe, only for local ts-jest development.

@ahnpnl ahnpnl merged commit d9b62e3 into master Jul 12, 2020
@ahnpnl ahnpnl deleted the ahnpnl-patch-1 branch July 12, 2020 11:24
@lookfirst
Copy link

Sadly, this just broke my build on Google Cloud Functions.

Build failed: error ts-jest@26.1.2: The engine "node" is incompatible with this module. Expected version ">= 10.21.0".
error Found incompatible module; Error ID:

I have no idea why it has this requirement, but GCF won't allow me to specify anything other than node 10

Error: package.json in functions directory has an engines field which is unsupported. The only valid choices are: {"node": "8"} and {"node": "10"}.

ahnpnl added a commit that referenced this pull request Jul 14, 2020
@ahnpnl ahnpnl mentioned this pull request Jul 14, 2020
@ahnpnl
Copy link
Collaborator Author

ahnpnl commented Jul 14, 2020

I think it's safer to revert this change, this will make sure all environments work. There is a configuration on GCF which cannot reproduce your problem with local machine.

ahnpnl added a commit that referenced this pull request Jul 14, 2020
@ahnpnl
Copy link
Collaborator Author

ahnpnl commented Jul 14, 2020

@lookfirst will be fixed in 26.1.3 , probably in a week or so because we want to see if any other things pop up.

@lookfirst
Copy link

Thank you for the fast response. I didn't test heavily because it was late, but I had a very quick workaround which was to pin to 26.1.1 and added "engineStrict": false to my own package.json. I'm not sure which one worked. =) I'll try unpinning on my next deployment.

@ahnpnl
Copy link
Collaborator Author

ahnpnl commented Jul 14, 2020

I think engineStrict: false should be enough.

@medington
Copy link

Setting engineStrict: false doesn't help with Yarn (just tested). It's also removed in npm > 3.0.

Even using yarn install --production which should exclude devDependencies is now giving an error which seems wrong but 🤷 who knows?

FYI, Google Cloud Functions are currently using Node 10.18

If some earlier versions of node 10 have issues, it would be good to identify the truly incompatible ones and use that value instead of just choosing the latest version (10.21).

Thanks for getting the change reverted.

@ahnpnl
Copy link
Collaborator Author

ahnpnl commented Jul 17, 2020

26.1.3 is out with the revert fix

@lookfirst
Copy link

@ahnpnl thank you for your hard work on this and for the fast fix.

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.

None yet

5 participants