-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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: add another early exit to dirname #57058
base: main
Are you sure you want to change the base?
Conversation
lib/path.js
Outdated
const code = StringPrototypeCharCodeAt(path, 0); | ||
if (len === 1) return isPathSeparator(code) ? path : '.'; | ||
if (len === 2 && isPathSeparator(StringPrototypeCharCodeAt(path, 1))) return path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not equivalent to the original code. Let's wait for the CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I just read the description, please add a test case for this new behavior.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57058 +/- ##
==========================================
+ Coverage 90.26% 90.27% +0.01%
==========================================
Files 630 630
Lines 184634 184631 -3
Branches 36137 36130 -7
==========================================
+ Hits 166654 166681 +27
- Misses 11022 11023 +1
+ Partials 6958 6927 -31
|
@lpinca is it normal that it still hasn't got merged? |
Yes, this needs more approvals or more wait time. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Rebased and fixed commit message @lpinca |
And adds another early exit to
len === 2