Skip to content

Conversation

@mscdex
Copy link
Contributor

@mscdex mscdex commented May 5, 2016

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)
  • path
Description of change

This commit fixes a regression in basename() for the case when a supplied extension name completely matches the resulting basename.

Fixes: #6587

@mscdex mscdex added path Issues and PRs related to the path subsystem. land-on-v5.x labels May 5, 2016
@mscdex mscdex force-pushed the path-basename-fix-6587 branch from 1979099 to e3b43c0 Compare May 5, 2016 05:28
@mscdex
Copy link
Contributor Author

mscdex commented May 5, 2016

@jasnell
Copy link
Member

jasnell commented May 5, 2016

@mscdex ... just for purposes of keeping track, was this related to the performance changes that landed in v5 or separate issue? (@nodejs/lts has been keeping an eye on the path changes and related regressions in case we decide to pull those in to v4 at some point)

@jasnell
Copy link
Member

jasnell commented May 5, 2016

Unrelated build bot failure in CI (https://ci.nodejs.org/job/node-test-commit-arm/3146/nodes=armv8-ubuntu1404/console). LGTM otherwise. No specific comments on the commits.

@mscdex
Copy link
Contributor Author

mscdex commented May 5, 2016

@jasnell Yes, this is fixing a regression from the path rewrite I did in node v5.

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a few tests for absolute paths with this case?

Copy link
Contributor Author

@mscdex mscdex May 10, 2016

Choose a reason for hiding this comment

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

I've now added absolute versions of these tests, is that what you meant?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking maybe something more like path.basename('/aaa/bbb') since we have seen regressions for absolute vs relative paths. They may already be there though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I've added that and a couple more.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@evanlucas does this LGTY now?

@mscdex mscdex force-pushed the path-basename-fix-6587 branch 3 times, most recently from b274124 to f1595e1 Compare May 10, 2016 14:38
@evanlucas
Copy link
Contributor

LGTM if CI is happy

@mscdex
Copy link
Contributor Author

mscdex commented May 11, 2016

Copy link
Contributor

Choose a reason for hiding this comment

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

Just wondering, why were these tests removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The TypeError checks are already done later on in the test file
for all path functions.

@mscdex
Copy link
Contributor Author

mscdex commented May 18, 2016

One last CI before landing, just in case: https://ci.nodejs.org/job/node-test-pull-request/2684/

@mscdex mscdex force-pushed the path-basename-fix-6587 branch from f1595e1 to f4a87ab Compare May 18, 2016 06:11
mscdex added 3 commits May 18, 2016 02:12
This commit fixes a regression in basename() for the case when a
supplied extension name completely matches the resulting basename.

Fixes: nodejs#6587
PR-URL: nodejs#6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
The TypeError checks are already done later on in the test file
for all path functions.

PR-URL: nodejs#6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
PR-URL: nodejs#6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
@mscdex mscdex force-pushed the path-basename-fix-6587 branch from f4a87ab to 27549f6 Compare May 18, 2016 06:12
@mscdex mscdex merged commit 27549f6 into nodejs:master May 18, 2016
@mscdex mscdex deleted the path-basename-fix-6587 branch May 18, 2016 06:19
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
This commit fixes a regression in basename() for the case when a
supplied extension name completely matches the resulting basename.

Fixes: #6587
PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
The TypeError checks are already done later on in the test file
for all path functions.

PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
This commit fixes a regression in basename() for the case when a
supplied extension name completely matches the resulting basename.

Fixes: #6587
PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
The TypeError checks are already done later on in the test file
for all path functions.

PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
PR-URL: #6590
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

path Issues and PRs related to the path subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Why path.basename behaves differently by platform?

5 participants