denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
93.06k stars 5.14k forks source link

windows fs node compat regression: await open(os.devNull) fails on 1.43 #23721

Closed chrisdickinson closed 1 week ago

chrisdickinson commented 1 week ago

Version: Deno v1.43.1

The cross-platform library I maintain[^ref], which tests against the latest Deno, started reporting errors on Windows builds after 1.43 launched.

This appears to fail with NotFound: entity not found: open '\\.\nul' as of Deno v1.43, but passes on Deno v1.42.4. I have not tested Deno v1.43.0.

A reduced case would be:

import { devNull } from 'node:os';
import { open } from 'node:fs/promises';
await open(devNull, 'r');
error: Uncaught (in promise) NotFound: entity not found: open '\\.\nul'
await open(devNull, 'r');
      ^
    at Object.open (ext:deno_fs/30_fs.js:633:21)
    at open (ext:deno_node/_fs/_fs_open.ts:76:10)
    at ext:deno_node/_fs/_fs_open.ts:81:5
    at new Promise (<anonymous>)
    at openPromise (ext:deno_node/_fs/_fs_open.ts:80:10)
    at file:///.../main.ts:3:7

[^ref]: The Extism JS SDK, a Wasm framework. (This is kind of to the side of the bug report, but we miss the WASI bindings!)