Skip to content

Commit 0eb1a9a

Browse files
committed
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.
1 parent f994a0f commit 0eb1a9a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/test.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ jobs:
3333
contents: read
3434
strategy:
3535
matrix:
36-
node: ['26', '25', '24', '22']
36+
# Pinned to 26.7: Node 26.8.0 rewrote fs.readFile
37+
# (nodejs/node#65327) so that binding.open is no longer called
38+
# from JS, which breaks mock-fs at require time
39+
node: ['26.7', '25', '24', '22']
3740
name: Node ${{ matrix.node }} validation
3841
steps:
3942
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

0 commit comments

Comments
 (0)