Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path: fix posix.relative() on Windows #37747

Merged
merged 1 commit into from
Apr 3, 2021
Merged

Conversation

Trott
Copy link
Member

@Trott Trott commented Mar 14, 2021

First commit is #37744. Second commit will be rebased to be the only commit in this PR once that other pull request lands.

Fixes: #13683

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem. labels Mar 14, 2021
@nodejs-github-bot

This comment has been minimized.

@Trott Trott marked this pull request as draft March 14, 2021 03:04
@Trott

This comment has been minimized.

@Trott Trott marked this pull request as ready for review March 14, 2021 03:57
@nodejs-github-bot

This comment has been minimized.

@Trott Trott marked this pull request as draft March 14, 2021 04:41
@Trott Trott marked this pull request as ready for review March 14, 2021 05:03
@nodejs-github-bot

This comment has been minimized.

@Trott
Copy link
Member Author

Trott commented Mar 14, 2021

The change to test-path-resolve is, in my opinion, a bugfix and not a semver-major change. In all other cases, calling path.posix.resolve() returns a POSIX-y path. In these two (really one) edge cases in the test, it results in a Windows-y path on Windows and a POSIX-y path elsewhere. I think path.posix.resolve() should always return a POSIX-y path and the fact that it doesn't in some cases is surprising and a bug.

@Trott
Copy link
Member Author

Trott commented Mar 14, 2021

@nodejs/path @nodejs/platform-windows

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

lib/path.js Outdated Show resolved Hide resolved
lib/path.js Outdated Show resolved Hide resolved
@nodejs-github-bot

This comment has been minimized.

@Trott
Copy link
Member Author

Trott commented Mar 18, 2021

@nodejs/path @nodejs/platform-windows @nodejs/tsc This could use some reviews.

@nodejs-github-bot

This comment has been minimized.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good minus one nit.

lib/path.js Outdated Show resolved Hide resolved
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot
Copy link
Collaborator

@Trott Trott requested a review from mcollina March 22, 2021 13:52
@Trott
Copy link
Member Author

Trott commented Mar 26, 2021

@mcollina I believe your request for changes has been addressed. Can you take a look?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Fixes: nodejs#13683

PR-URL: nodejs#37747
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@Trott
Copy link
Member Author

Trott commented Apr 3, 2021

Landed in b0d5e03

@Trott Trott merged commit b0d5e03 into nodejs:master Apr 3, 2021
@Trott Trott deleted the fix-for-13683 branch April 3, 2021 02:31
MylesBorins pushed a commit that referenced this pull request Apr 4, 2021
Fixes: #13683

PR-URL: #37747
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. path Issues and PRs related to the path subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

path.posix.relative returns different results for *nix and Windows versions of node
5 participants