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

fix(deps): update node.js to v22 #2983

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix(deps): update node.js to v22 #2983

wants to merge 2 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 4, 2024

This PR contains the following updates:

Package Type Update Change Age Adoption Passing Confidence
node (source) major 18 -> 22 age adoption passing confidence
node (source) engines major >=18 <19 -> <23 age adoption passing confidence
@types/node (source) devDependencies major 18.19.68 -> 22.10.2 age adoption passing confidence
@types/node (source) dependencies major 18.19.68 -> 22.10.2 age adoption passing confidence

Release Notes

nodejs/node (node)

v22.12.0

Compare Source

v22.11.0

Compare Source

v22.10.0: 2024-10-16, Version 22.10.0 (Current), @​aduh95

Compare Source

Notable Changes
New "module-sync" exports condition

This release introduces a "module-sync" exports condition that's enabled when
require(esm) is enabled, so packages can supply a synchronous ES module to the
Node.js module loader, no matter if it's being required or imported. This is
similar to the "module" condition that bundlers have been using to support
require(esm) in Node.js, and allows dual-package authors to opt into ESM-first
only on newer versions of Node.js that supports require(esm) to avoid the
dual-package hazard.

{
  "type": "module",
  "exports": {
    "node": {
      // On new version of Node.js, both require() and import get
      // the ESM version
      "module-sync": "./index.js",
      // On older version of Node.js, where "module-sync" and require(esm) are
      // not supported, use the CJS version to avoid dual-package hazard.
      // When package authors think it's time to drop support for older versions of
      // Node.js, they can remove the exports conditions and just use "main": "index.js".
      "default": "./dist/index.cjs"
    },
    // On any other environment, use the ESM version.
    "default": "./index.js"
  }
}

Or if the package is only meant to be run on Node.js and wants to fallback to
CJS on older versions that don't have require(esm):

{
  "type": "module",
  "exports": {
    // On new version of Node.js, both require() and import get the ESM version
    "module-sync": "./index.js",
    // On older version of Node.js, where "module-sync" and require(esm) are
    // not supported, use the CJS version to avoid dual-package hazard.
    // When package authors think it's time to drop support for older versions of
    // Node.js, they can remove the exports conditions and just use "main": "index.js".
    "default": "./dist/index.cjs"
  }
}

For package authors: this only serves as a feature-detection mechanism for
packages that wish to support both CJS and ESM users during the period when some
active Node.js LTS versions support require(esm) while some older ones don't.
When all active Node.js LTS lines support require(esm), packages can simplify
their distributions by bumping the major version, dropping their CJS exports,
and removing the module-sync exports condition (with only main or default
targetting the ESM exports). If the package needs to support both bundlers and
being run unbundled on Node.js during the transition period, use both
module-sync and module and point them to the same ESM file. If the package
already doesn't want to support older versions of Node.js that doesn't support
require(esm), don't use this export condition.

For bundlers/tools: they should avoid implementing this stop-gap condition.
Most existing bundlers implement the de-facto bundler standard
module
exports condition, and that should be enough to support users who want to bundle
ESM from CJS consumers. Users who want both bundlers and Node.js to recognize
the ESM exports can use both module/module-sync conditions during the
transition period, and can drop module-sync+module when they no longer need
to support older versions of Node.js. If tools do want to support this
condition, it's recommended to make the resolution rules in the graph pointed by
this condition match the Node.js native ESM rules to avoid divergence.

We ended up implementing a condition with a different name instead of reusing
"module", because existing code in the ecosystem using the "module"
condition sometimes also expect the module resolution for these ESM files to
work in CJS style, which is supported by bundlers, but the native Node.js loader
has intentionally made ESM resolution different from CJS resolution (e.g.
forbidding import './noext' or import './directory'), so it would be
breaking to implement a "module" condition without implementing the forbidden
ESM resolution rules. For now, this just implements a new condition as
semver-minor so it can be backported to older LTS.

Contributed by Joyee Cheung in #​54648.

node --run is now stable

This CLI flag runs a specified command from a package.json's "scripts" object.

For the following package.json:

{
  "scripts": {
    "test": "node --test-reporter junit --test ./test"
  }
}

You can run node --run test and that would start the test suite.

Contributed by Yagiz Nizipli in #​53763.

Other notable changes
  • [f0b441230a] - (SEMVER-MINOR) crypto: add KeyObject.prototype.toCryptoKey (Filip Skokan) #​55262
  • [349d2ed07b] - (SEMVER-MINOR) crypto: add Date fields for validTo and validFrom (Andrew Moon) #​54159
  • [bebc95ed58] - doc: add abmusse to collaborators (Abdirahim Musse) #​55086
  • [914db60159] - (SEMVER-MINOR) http2: expose nghttp2_option_set_stream_reset_rate_limit as an option (Maël Nison) #​54875
  • [f7c3b03759] - (SEMVER-MINOR) lib: propagate aborted state to dependent signals before firing events (jazelly) #​54826
  • [32261fc98a] - (SEMVER-MINOR) module: support loading entrypoint as url (RedYetiDev) #​54933
  • [06957ff355] - (SEMVER-MINOR) module: implement flushCompileCache() (Joyee Cheung) #​54971
  • [2dcf70c347] - (SEMVER-MINOR) module: throw when invalid argument is passed to enableCompileCache() (Joyee Cheung) #​54971
  • [f9b19d7c44] - (SEMVER-MINOR) module: write compile cache to temporary file and then rename it (Joyee Cheung) #​54971
  • [e95163b170] - (SEMVER-MINOR) process: add process.features.require_module (Joyee Cheung) #​55241
  • [4050f68e5d] - (SEMVER-MINOR) process: add process.features.typescript (Aviv Keller) #​54295
  • [86f7cb802d] - (SEMVER-MINOR) test_runner: support custom arguments in run() (Aviv Keller) #​55126
  • [b62f2f8259] - (SEMVER-MINOR) test_runner: add 'test:summary' event (Colin Ihrig) #​54851
  • [d7c708aec5] - (SEMVER-MINOR) test_runner: add support for coverage via run() (Chemi Atlow) #​53937
  • [5fda4a1498] - (SEMVER-MINOR) worker: add markAsUncloneable api (Jason Zhang) #​55234
Commits

Configuration

📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner November 4, 2024 02:23
@renovate renovate bot requested review from stephsprinkle, jaikamat, ddouglasz, tylermorrisford, ByronDWall and misama-ct and removed request for a team November 4, 2024 02:23
@renovate renovate bot added the 🤖 Type: Dependencies Dependency updates or something similar label Nov 4, 2024
Copy link

changeset-bot bot commented Nov 4, 2024

⚠️ No Changeset found

Latest commit: 2276c49

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Nov 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ui-kit 🛑 Canceled (Inspect) Dec 13, 2024 8:48pm

@renovate renovate bot force-pushed the renovate/node-22.x branch from cbe64a7 to 5355796 Compare November 5, 2024 04:18
@renovate renovate bot force-pushed the renovate/node-22.x branch from 5355796 to 18aceec Compare November 5, 2024 10:28
@renovate renovate bot force-pushed the renovate/node-22.x branch from 18aceec to f8bf63a Compare November 7, 2024 13:35
@renovate renovate bot force-pushed the renovate/node-22.x branch from f8bf63a to 8c38ce6 Compare November 7, 2024 15:54
@renovate renovate bot force-pushed the renovate/node-22.x branch from 8c38ce6 to add9d29 Compare November 7, 2024 16:55
@renovate renovate bot force-pushed the renovate/node-22.x branch from add9d29 to e4eae88 Compare November 7, 2024 17:06
@renovate renovate bot force-pushed the renovate/node-22.x branch from e4eae88 to e42e718 Compare November 11, 2024 11:08
@renovate renovate bot changed the title chore(deps): update dependency node to v22 chore(deps): update node.js to v22 Nov 13, 2024
@renovate renovate bot force-pushed the renovate/node-22.x branch from e42e718 to 7e2c09b Compare November 14, 2024 14:42
@renovate renovate bot force-pushed the renovate/node-22.x branch from 7e2c09b to f4c30e8 Compare November 14, 2024 14:54
@renovate renovate bot force-pushed the renovate/node-22.x branch from e9fff9f to fb97027 Compare December 4, 2024 19:08
@renovate renovate bot force-pushed the renovate/node-22.x branch from fb97027 to 529ae53 Compare December 4, 2024 19:18
@renovate renovate bot force-pushed the renovate/node-22.x branch from 529ae53 to 91f957f Compare December 4, 2024 19:33
@renovate renovate bot force-pushed the renovate/node-22.x branch from 91f957f to 2bdd350 Compare December 4, 2024 20:24
@renovate renovate bot force-pushed the renovate/node-22.x branch from 2bdd350 to 0dd979e Compare December 5, 2024 09:55
@renovate renovate bot force-pushed the renovate/node-22.x branch from 0dd979e to 2c9ba48 Compare December 5, 2024 12:42
@renovate renovate bot force-pushed the renovate/node-22.x branch from 2c9ba48 to f2b78be Compare December 6, 2024 11:21
@renovate renovate bot changed the title chore(deps): update node.js to v22 fix(deps): update node.js to v22 Dec 10, 2024
@renovate renovate bot force-pushed the renovate/node-22.x branch from f2b78be to ff4bac7 Compare December 10, 2024 17:33
@renovate renovate bot force-pushed the renovate/node-22.x branch from ff4bac7 to 9ab62e6 Compare December 10, 2024 17:44
@renovate renovate bot force-pushed the renovate/node-22.x branch from 9ab62e6 to b4f227a Compare December 11, 2024 15:41
@renovate renovate bot force-pushed the renovate/node-22.x branch from b4f227a to bb72f9f Compare December 13, 2024 20:23
@renovate renovate bot force-pushed the renovate/node-22.x branch from bb72f9f to c601b6d Compare December 13, 2024 20:40
@ByronDWall
Copy link
Contributor

putting this on hold because I am not sure whether we have an MC-wide node version to support or not.

Copy link
Contributor Author

renovate bot commented Dec 13, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖐 Status: On Hold 🤖 Type: Dependencies Dependency updates or something similar
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant