Skip to content

feat(node-builtins): add support data for Node.js 22.20–22.21 and 24.0–24.12#496

Merged
aladdin-add merged 4 commits into
eslint-community:masterfrom
scagood:update-supported
Apr 30, 2026
Merged

feat(node-builtins): add support data for Node.js 22.20–22.21 and 24.0–24.12#496
aladdin-add merged 4 commits into
eslint-community:masterfrom
scagood:update-supported

Conversation

@scagood
Copy link
Copy Markdown

@scagood scagood commented Dec 29, 2025

Updates the built-in support/experimental version data to cover new Node.js releases:

  • Node 22 to 22.21.0
  • Node 24 to 24.12.0

@scagood
Copy link
Copy Markdown
Author

scagood commented Dec 29, 2025

I am starting to think this needs something like:
https://eslint-plugin-command.antfu.me/commands/keep-sorted#keep-sorted

@scagood scagood changed the title feat: Add more node versions to the supported list feat(node-builtins): add support data for Node.js 22.20–22.21 and 24.0–24.12 Apr 13, 2026
@scagood scagood linked an issue Apr 13, 2026 that may be closed by this pull request
…mport.meta.dirname and import.meta.filename

These properties were added as experimental in v21.2.0 and v20.11.0,
and stabilised in v22.16.0 (LTS backport) and v24.0.0. Node 23.x never
received the stabilisation backport.

Previously all four versions were lumped into `supported`, causing false
negatives for users on v21.2.0–v22.15.x and v23.x (treated as stable
when they are only experimental).

BREAKING CHANGE: Users on v21.2.0–v22.15.x and v23.x will now receive
a `not-supported-till` error instead of no error. Use `allowExperimental: true`
to restore the previous behaviour on those versions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scagood
Copy link
Copy Markdown
Author

scagood commented Apr 13, 2026

I think we need to mark this as breaking.

import.meta.dirname was checked both in the docs and in node.

Extracting doc info:

{
  META_DIRNAME='
  .properties
    | map(select((.name == "meta") or (.textRaw? | contains("`meta`"))))[]
    | .properties
    | map(select((.name == "dirname") or (.textRaw? | contains("`dirname`"))))[]
  '

  for major in $(seq 18 25); do
    echo "latest-v$major";
    curl -sS "https://nodejs.org/docs/latest-v$major.x/api/esm.json" | jq "$META_DIRNAME"
  done
}

Checking node for the properties existance:

{
  for major in $(seq 18 25); do
    for version in $(npm --silent exec --yes -- n lsr --quiet --all "$major" | cut -f1,2 -d'.' | uniq | sort -V); do
      result=$(volta run --node=$version node --input-type=module --eval 'try { console.info(Boolean(import.meta.dirname)) } catch (_) { console.info(false) }' 2>&1 | head -1)
      echo "$version -> $result"
    done
  done
}

@scagood scagood marked this pull request as ready for review April 13, 2026 13:02
@scagood scagood requested a review from a team April 14, 2026 15:19
@aladdin-add
Copy link
Copy Markdown

I think we need to mark this as breaking.

I don't really get it—it seems like it just added support for new Node.js features, right?

@scagood
Copy link
Copy Markdown
Author

scagood commented Apr 15, 2026

I don't really get it—it seems like it just added support for new Node.js features, right?

I mean this commit: 1a924a2

import.meta.dirname and import.meta.filename are now:

experimental: ["21.2.0", "20.11.0"],

Before they were

supported: ["21.2.0", "20.11.0"],

Comment on lines +20 to +21
[READ]: { supported: ["0.3.4"] },
[CALL]: { deprecated: ["24.2.0"] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Taking #359 into account, how did you decide to keep READ as supported, but deprecate CALL?

Copy link
Copy Markdown
Author

@scagood scagood Apr 15, 2026

Choose a reason for hiding this comment

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

This is because only the call signature is deprecated, you can still use the Agent etc 👀

The specific PR was nodejs/node#58518

@aladdin-add
Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

@aladdin-add aladdin-add merged commit e8e0b00 into eslint-community:master Apr 30, 2026
31 checks passed
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.

✨ Node v24.x support

3 participants