Closed adnanel closed 2 hours ago
23.0.0
Darwin REDACTED 23.6.0 Darwin Kernel Version 23.6.0: Thu Sep 12 23:34:49 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_X86_64 x86_64
No response
const path = require("path/posix"); console.log(path.resolve("/Users/"));
always
/Users
In the documentation the following is stated:
The resulting path is normalized and trailing slashes are removed unless the path is resolved to the root directory.
/Users/
In node 22 the trailing backslash was trimmed, starting with node 23 this is no longer the case. This breaks a lot of code.
This seems to have been fixed in 23.1.0, so I assume it was already identified and fixed.
Version
23.0.0
Platform
Subsystem
No response
What steps will reproduce the bug?
const path = require("path/posix"); console.log(path.resolve("/Users/"));
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
/Users
In the documentation the following is stated:
What do you see instead?
/Users/
Additional information
In node 22 the trailing backslash was trimmed, starting with node 23 this is no longer the case. This breaks a lot of code.