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: join refactor #25364

Closed
wants to merge 1 commit into from
Closed

path: join refactor #25364

wants to merge 1 commit into from

Conversation

Mnwa
Copy link
Contributor

@Mnwa Mnwa commented Jan 6, 2019

Change variables init from var to let/const, added destructurization to function arguments and change old for to new for of

Local bench tests join
                                                                         confidence improvement accuracy (*)   (**)   (***)
 path/join-posix.js n=1000000 paths='/foo|bar||baz/asdf|quux|..'                         2.42 %       ±7.16% ±9.54% ±12.42%
 path/join-win32.js n=1000000 paths='C:\\\\foo|bar||baz\\\\asdf|quux|..'                -0.92 %       ±5.18% ±6.90%  ±8.98%

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the path Issues and PRs related to the path subsystem. label Jan 6, 2019
@Mnwa
Copy link
Contributor Author

Mnwa commented Jan 9, 2019

ping @nodejs
Can someone review it?

@jasnell jasnell requested a review from mscdex January 9, 2019 17:07
@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 14, 2019
Copy link
Member

@apapirovski apapirovski left a comment

Choose a reason for hiding this comment

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

I’m afraid I don’t quite understand the purpose of this change. It’s functionally equivalent and doesn’t improve performance. It also makes git blame harder going forward. There is nothing fundamentally wrong with var.

@Mnwa
Copy link
Contributor Author

Mnwa commented Jan 14, 2019

Hi, @apapirovski! I was just update path join to actually js standards

@addaleax
Copy link
Member

@apapirovski Do you feel differently about other refactors to using more modern JS patterns? I’m not happy about the effects on git blame myself, but this isn’t the first PR that does a change these lines.

@apapirovski
Copy link
Member

@addaleax I’ve blocked most of them when I see them. I think I’ve been reasonably consistent. I’m happy to remove my objection if someone else wants to approve it.

@gireeshpunathil
Copy link
Member

@apapirovski - pls revisit your position on this PR, in the context of several recent changes in the code base to modernize the variable qualifiers.

@Mnwa - can you pls rebase?

@Mnwa Mnwa force-pushed the mnwa-path-join-update branch from 9e5b54a to ec96ae7 Compare December 29, 2019 11:19
@Mnwa
Copy link
Contributor Author

Mnwa commented Dec 29, 2019

@gireeshpunathil Hey! I do it

@Mnwa
Copy link
Contributor Author

Mnwa commented Dec 29, 2019

But after rebase there is too small changes. I think we can close it becouse someone did a most my changes before

@Mnwa Mnwa closed this Jan 3, 2020
@Mnwa Mnwa deleted the mnwa-path-join-update branch January 3, 2020 20:32
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.

5 participants