Skip to content

Breaking change in path normalizeString in node 9.9.0 #19519

Closed
@xPaw

Description

@xPaw

I believe #19237 to be the culprit of this change.

I believe that PR unintentionally changed the behaviour of at least path.resolve which was not documented in the changelog.

We have a specific test around path.resolve and it started failing after 9.9.0 was released. See https://travis-ci.org/thelounge/thelounge/jobs/356475798#L582

https://github.com/thelounge/thelounge/blob/844ca1fbe602aa291b54085a6cf69198ea4a5390/test/src/helperTest.js#L14-L16

On 9.8.0 this happens:

> require("path").resolve("a\\b")
'/home/xpaw/a\\b'

But on 9.9.0 it seems that separator is changed to the OS specific one.

> require("path").resolve("a\\b")
'/home/xpaw/a/b'

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.pathIssues and PRs related to the path subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions