-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
module: add findNearestPackageJSON
utility
#55173
module: add findNearestPackageJSON
utility
#55173
Conversation
Review requested:
|
87d2b59
to
6ddf9ab
Compare
@anonrig what is the difference between |
/** | ||
* Find the nearest package.json | ||
* @param {URL['pathname']} origin Where to start searching. | ||
* @returns {URL['pathname']} The fully resolved location of the package.json file. |
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.
Question: Do we need to also make sure this returns a UNC
path on Windows? UNC path (the result of toNamespacedPath()
is required if the path is extremely long. windows weirdly throws an error if long path feature is not enabled)
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.
* @returns {URL['pathname']} The fully resolved location of the package.json file. | |
* @returns {URL['pathname'] | undefined} The fully resolved location of the package.json file. |
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.
Regarding your question: i have no idea. It sounds like you answered it yourself though (and the answer is "yes").
void BindingData::GetNearestParentPackageJSON( | ||
const v8::FunctionCallbackInfo<v8::Value>& args) { | ||
void BindingData::FindNearestParentPackageJSON( | ||
const v8::FunctionCallbackInfo<v8::Value>& args |
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 change seems to be unrelated
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.
Technically yes, this un-mangling is not required to make the change work.
GetNearestParentPackageJSON:
GetNearestParentPackageJSON
|
This was superfluous 😞 |
This draft is not ready for review. Opening it in its current state for visibility.
Split from #54992