From 0eb1a9aa5ca6497ca2c8daa647b2e7dee70a523a Mon Sep 17 00:00:00 2001 From: David Gamero Date: Sat, 29 Aug 2026 23:04:14 -0400 Subject: [PATCH] ci: pin the Node 26 matrix entry to 26.7 Node 26.8.0 rewrote fs.readFile (nodejs/node#65327) to do open, fstat, read and close in a single thread pool round trip, so binding.open is no longer called from JS. mock-fs recovers the ReadFileContext prototype by intercepting binding.open during a dummy readFile, so it now gets undefined and throws at require time: TypeError: Cannot read properties of undefined (reading 'read') at exports.patchReadFileContext (mock-fs/lib/readfilecontext.js:40:30) Because it throws on require rather than in a test, it takes out config_test.ts and file_auth_test.ts in full. The matrix entries are floating majors, so setup-node resolves '26' to whatever the newest 26.x is at run time. That is why main went red on the merge of #3022 without any change to the code under test: the branch last ran CI on 26.7.0, and by the time it merged five days later the runner had picked up 26.8.1. Pinning to 26.7 restores a green build. It is a stopgap: mock-fs has had no functional release since February 2025 and the upstream report (tschaub/mock-fs#447) is unanswered, so the durable fix is to stop depending on it. --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4351d4f47e7..04d2e70fe95 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,10 @@ jobs: contents: read strategy: matrix: - node: ['26', '25', '24', '22'] + # Pinned to 26.7: Node 26.8.0 rewrote fs.readFile + # (nodejs/node#65327) so that binding.open is no longer called + # from JS, which breaks mock-fs at require time + node: ['26.7', '25', '24', '22'] name: Node ${{ matrix.node }} validation steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1