-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
path: remove StringPrototypeCharCodeAt from some methods of posix
#54668
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
base: main
Are you sure you want to change the base?
Conversation
avivkeller
left a comment
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.
IMO the commit message / title is a bit misleading, as this isn't removing the primordial everywhere, maybe reword?
lib/path.js
Outdated
| for (; i >= start; --i) { | ||
| const code = StringPrototypeCharCodeAt(path, i); | ||
| if (code === CHAR_FORWARD_SLASH) { | ||
| const code = path[i]; |
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.
Maybe rename this variable to char?
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.
I applied it!
StringPrototypeCharCodeAt from lib/pathStringPrototypeCharCodeAt from some methods of posix
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #54668 +/- ##
==========================================
+ Coverage 88.53% 88.54% +0.01%
==========================================
Files 703 703
Lines 208598 208595 -3
Branches 40227 40235 +8
==========================================
+ Hits 184674 184700 +26
+ Misses 15951 15908 -43
- Partials 7973 7987 +14
🚀 New features to boost your workflow:
|
|
CI: https://ci.nodejs.org/job/node-test-pull-request/61752/ Benchmark CI ( Results |
ljharb
left a comment
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.
not sure why we have the constants if we're not going to use them, but the primordial conversion is good
Remove `StringPrototypeCharCodeAt` from `posix.resolve`, `posix.normalize`, `posix.parse`
Refs: #54546