Commit Graph

3 Commits

Author SHA1 Message Date
Sergei Zharinov 2ee9a26675 fix(manager/npm): Harden .npmrc sanitization (#44652)
* fix(manager/npm): Parse npmrc settings before sanitizing

* Refactor NPMRC parsing and sanitization

* fix(manager/npm): Restore npmrc after artifact updates

* test(manager/npm): cover npmrc failure paths

* refactor(manager/npm): simplify npmrc parsing

* Update npmrc-parser.spec.ts

* refactor(manager/npm): clarify npmrc parsing

* refactor(manager/npm): make npmrc regexes RE2-compatible

* chore: retrigger CI

* Update lib/modules/manager/npm/npmrc-parser.ts

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* fix(manager/npm): preserve captured npmrc line endings

---------

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-09-08 07:05:39 +00:00
Michael Kriese 440e353145 chore: use ts extension (#42300) 2026-04-01 07:46:34 +00:00
Jamie Tanna d9f8972156 refactor(manager/npm): extract function for resolving .npmrc (#41245)
* 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>
2026-02-17 12:49:49 +00:00