-
Notifications
You must be signed in to change notification settings - Fork 4.1k
small optimization #7176
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
small optimization #7176
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| const { cleanUrl } = require('npm-registry-fetch') | ||
| const cleanUrl = require('npm-registry-fetch/lib/clean-url') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We tend not to do this as it unnecessarily couples to the layout of the code, and not its exports.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The layout of internal files is already part of the api and subject to semver, unless the exports field is used to encapsulate them.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so that the future refactor does not introduce destructive changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something like that would have to be a larger decision/discussion than just one repo, it falls under how we build all of our software. Currently we define a
The line as it is now was done very intentionally, and adding that function to
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To clarify, you suggest leaving If the only problem is that you are just starting to migrate to declaring
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes leave it. A pr to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 38 milliseconds (15% of 256) for |
||
| const isString = (v) => typeof v === 'string' | ||
|
|
||
| // split on \s|= similar to how nopt parses options | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.