On Windows, Bun's fs.mkdir(path, { recursive: true }) throws EEXIST or ENOENT for an existing directory when a relative path points above the current directory or names the current directory itself, compared with Node.js and Deno
With recursive: true, fs.mkdir must return without an error when the directory already exists. On Windows, Bun throws EEXIST when a relative path points above the current directory (../x, ./../x, a/../../x), and ENOENT when it names the current directory itself (./, a/..). This project records the measurements against Node.js and Deno, and the comment posted on the existing Bun issue #17332.
To run the tests on Windows (node, deno and bun must be on PATH): tools\40_test\run-tests.cmd
oven-sh/bun#17332 — Bun crashes when creating duplicate directory in path starting with ../
oven-sh/bun#42014 — sys(windows): resolve . and .. path components in mkdirat, unlinkat, renameat and exists_at (the fix)
oven-sh/bun#45059 — Windows: recursive mkdir of ./, .\ or sub/.. throws ENOENT with an empty path (filed from this project)
oven-sh/bun#44576 — node:fs: recursive mkdir of "." or ".." throws EEXIST on Windows
oven-sh/bun#45410 — node:fs: resolve a relative path that normalizes to nothing to the cwd on Windows (Fixes #45059. Its build passes the ENOENT cases and ., but the paths above the cwd still throw EEXIST)
oven-sh/bun#42635 — fix(node:fs): preserve Win32 semantics in recursive mkdir checks (says the child\.. ENOENT remains)
oven-sh/bun#40536 — node:fs: return the namespaced absolute first path created for a relative recursive mkdir on Windows (its build passes every case, including the ENOENT ones)