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: update to Node 22, enable corepack to manage yarn versions #4351

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

marcelgerber
Copy link
Member

@marcelgerber marcelgerber commented Dec 22, 2024

Resolves #4085.

I have been running my local Node setup on Node 22 for several months now, and have not noticed any incompatabilities. I'm pretty certain that this upgrade won't cause us any weird and unexpected issues.

Steps for devs

  • Install Node 22, and possibly make it the default on your machine
    • e.g. if you're using nvm: nvm install 22 && nvm alias default 22
  • Enable corepack, which is a Node-inbuilt way of always using the correct version of yarn
    • run corepack enable once
    • this will, going forward, always use the yarn version specified in the package.json's packageManager field

Steps to deploy this

  • Create a PR in https://github.com/owid-grapher/ops to change the install scripts to install node 22, and enable corepack
  • Manually (?) upgrade some non-ephemeral machines
  • It's probably fine to first merge the ops PR, and then merge this PR sometime later - everything should continue to work just fine, even before this here PR

Other notes

The whatwg-url update in here resolves a deprecation notice shown in Node (e.g. when running yarn startAdminServer):

(node:730) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    at node:punycode:3:9
    at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:399:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
    at loadBuiltinModule (node:internal/modules/helpers:112:7)
    at Function._load (node:internal/modules/cjs/loader:1100:17)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:138:16)
    at Object.<anonymous> (/Users/marcel/Code/owid-grapher-2/node_modules/whatwg-url/lib/url-state-machine.js:2:18)

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.

Update Node.js to 22.x
1 participant