module: expose getPackageScopeConfig & add findNearestPackageJSON#54992
module: expose getPackageScopeConfig & add findNearestPackageJSON#54992JakobJingleheimer wants to merge 1 commit intonodejs:mainfrom
getPackageScopeConfig & add findNearestPackageJSON#54992Conversation
|
Review requested:
|
| ObjectDefineProperty(this, 'exports', { __proto__: null, value }); | ||
| return this.exports; | ||
| }, | ||
| ...(everything && contents[6]), |
There was a problem hiding this comment.
Can we be explicit? Depending on the package.json this can overwrite existing values in this object
There was a problem hiding this comment.
No, we can't be explicit because we don't know what the keys are—that's the point of this feature ;) also, we don't need to worry about overwriting because this is a rest spread.
4f9cfc4 to
3fdbcd2
Compare
|
I'm planning to adjust
Side-note: I haven't worked in c++ in ~20 years, so I can't remember if there is potentially a performance implication here. I'm thinking extracting those avoids re-constructed on each loop (but that may be offset by the cost of function call(s)). |
|
Splitting this into atomic PRs: |
This draft is not ready for review. Opening it in its current state for visibility.