module: add findNearestPackageJSON utility#55173
module: add findNearestPackageJSON utility#55173JakobJingleheimer wants to merge 2 commits intonodejs:mainfrom
findNearestPackageJSON utility#55173Conversation
|
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.
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.
| * @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.
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.
This change seems to be unrelated
There was a problem hiding this comment.
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