* refactor(manager/npm): extract function for resolving `.npmrc`
As part of future changes in #41215 and/or #41216, we will resolve the
`.npmrc`, if it can be found, in multiple places.
Before we do this, we can prefactor this logic to extract this out into
its own function that can be used independently.
Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>
* test(manager/npm): add missing test coverage
This is coverage that we've never had on this function, and was reported
by CodeCov.
---------
Co-authored-by: Claude Sonnet 4.5 <jamie.tanna+github-copilot@mend.io>