Repository navigation
Keep the CLI error snapshots stable on Node.js 26 - #19926
Closed
Kjubikstronk wants to merge 1 commit into
Closed
Kjubikstronk wants to merge 1 commit into
Kjubikstronk wants to merge 1 commit into
Conversation
Node.js 26 appends the offending path to the `read` error raised when reading a directory, so `config-invalid` and `invalid-ignore` fail their snapshots there while passing on 14 through 22. Strip the appended path in runCli, which leaves the existing snapshots valid on every version rather than pinning them to one.
commit: |
✅ Deploy Preview for prettier ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
Thanks for the work, I'll fix with #19927 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
config-invalidandinvalid-ignorefail on Node.js 26 and pass on 14 through 22:Node.js 26 appends the offending path to the
readerror raised when reading a directory. Earlier versions stop at the syscall name, which is what the snapshots record.This is not specific to any branch — every PR whose CI has run on the current Node 26 image hits it, including #19916 and #19908, with the same two suites and the same diff.
runClialready normalises\rbefore snapshotting, so the appended path is stripped in the same place. That keeps the existing snapshots valid on every supported version, rather than updating them to Node 26 and breaking 14 through 22.The pattern is deliberately narrow. Node has always included the path for errors like
ENOENT ... open '/foo'; what changed in 26 is thatreadincludes it too. Matching every errno message would strip paths that snapshots legitimately record, so this only touches theEISDIR ... readcase. No snapshot files change.Verified by transforming the exact strings from the failing CI logs and confirming they equal the committed snapshots, and that Node ≤ 25 output passes through unchanged. Locally (Node 24) the full
tests/integrationsuite is unaffected: 507 passed, 334 snapshots passed.Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.This is test-only and not user-facing, so no changelog entry or docs change. It adds no new test — the two existing suites are the coverage, and they are what currently fails on Node 26. I used AI assistance and reviewed everything before submitting.