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

Increase default node and npm versions #226

Closed
pelletier197 opened this issue Apr 11, 2022 · 9 comments
Closed

Increase default node and npm versions #226

pelletier197 opened this issue Apr 11, 2022 · 9 comments
Milestone

Comments

@pelletier197
Copy link

The current default node and npm versions are quite outdated. In fact, the current default node version (14.15.4) does not even have a build for arm64 (the new macs), so we are forced to override the version in every project we have. Source: this file

Also, node 16 is the current LTS version according to this, until september 2022.

My proposition is simply to bump default node, npm (and potentially yarn and pnpm as well) to version

  • node 16.14.2
  • npm 8.6.0 (latest)
  • etc

Is there any opposition to doing that?

@deepy
Copy link
Member

deepy commented Apr 11, 2022

Bumping to latest node LTS and changing npms default to match the one bundled with node (or an LTS) sounds great to me

I think there's some tests relying on the npm version though

@pelletier197
Copy link
Author

pelletier197 commented Apr 11, 2022

Okay. I can try to do that when I get some time. I just wanted to get the approval of someone before I do it 😄 Thank you

@deepy
Copy link
Member

deepy commented Apr 11, 2022

What makes npm tricky is that in the src/test/resources/fixtures there's some package.json and package-lock.jsons that also need to get upgraded.

And then there's some references in tests like NpmRule_integTest where you see things like: def versionPattern = Pattern.compile(".*Version\\s+6.12.0.*", Pattern.DOTALL)

And finally there's also the tests that do things like: result4.output.contains("> Task :version${System.lineSeparator()}6.12.0")

@pelletier197
Copy link
Author

pelletier197 commented Apr 11, 2022

Seems good. I'll try to figure out a way. If I really can't get around npm, I'll check if updating node alone is doable, at least to have it work under arm64.

Thank you!

@deepy
Copy link
Member

deepy commented Apr 21, 2022

yarn is tricky to upgrade since yarn2 works very differently (and I don't know of a good way to support it with the current state, with the toolchain-esque setup it should be fairly simple however)
pnpm is not merged yet so that one is simple to upgrade

But next version is getting Node 16.14.2 and npm 8.5.0 as defaults

@pelletier197
Copy link
Author

pelletier197 commented Apr 22, 2022

I see you did it. Sorry, I didn't take the time to do it. Been pretty busy with a project of mine. But thank you very much!

For yarn, you shouldn't update to yarn2 imo. They brought some annoying breaking changes. Most projects I see still use yarn 1. 😅

@pelletier197
Copy link
Author

Yarn 2 was actually not that well received by the community. It's basically a completely different package manager than V1 and is incompatible with many projects.

https://njbmartin.medium.com/whats-the-problem-with-yarn-2-ca59e3fabc9f

@deepy
Copy link
Member

deepy commented Apr 22, 2022

I've no plans to upgrade to yarn2, I find their distribution model bonkers :-)

But I'd like to add support for it in the future though that's tracked in #176

@pelletier197
Copy link
Author

That's good to have both then, for sure!

@deepy deepy added this to the 3.3 milestone May 14, 2022
@deepy deepy closed this as completed May 14, 2022
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

No branches or pull requests

2 participants