Skip to content

fix: use name of level instead of label for logging prefixes#7414

Merged
wraithgar merged 1 commit into
latestfrom
lk/log-labels
Apr 24, 2024
Merged

fix: use name of level instead of label for logging prefixes#7414
wraithgar merged 1 commit into
latestfrom
lk/log-labels

Conversation

@lukekarrys

Copy link
Copy Markdown
Contributor

No description provided.

@lukekarrys
lukekarrys requested a review from a team as a code owner April 24, 2024 21:44
@wraithgar
wraithgar merged commit 0708b3b into latest Apr 24, 2024
@wraithgar
wraithgar deleted the lk/log-labels branch April 24, 2024 22:02
@github-actions github-actions Bot mentioned this pull request Apr 24, 2024
@ljharb

ljharb commented May 22, 2024

Copy link
Copy Markdown
Contributor

Just a heads up for future explorers and myself - this PR (released in v10.6.0) changed the error log prefix from npm ERR! to npm error, which broke tests on one of my packages. Luckily it didn’t affect the implementation, so i don’t consider it a breaking change :-)

Apollon77 added a commit to ioBroker/ioBroker.js-controller that referenced this pull request Jul 17, 2026
…-heal (#3416)

* fix(cli): recognise npm >=10.6.0 "npm error" prefix in ENOTEMPTY self-heal

handleNpmNotEmptyError() reads the failed destination path from stderr via
`startsWith('npm ERR! dest')`. Since npm/cli#7414 (npm v10.6.0) npm prints the
log-level name, so the line is `npm error dest ...`. The path is never
extracted, the temp-dir deletion + retry is skipped, and the install aborts
with "Could not handle ENOTEMPTY, because no deletable files were found".
Match both the old and current prefix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Update CHANGELOG.md

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Ingo Fischer <github@fischer-ka.de>
Apollon77 added a commit to ioBroker/ioBroker.js-controller that referenced this pull request Jul 17, 2026
…l (npm >=10.6.0) (#3417)

* fix(cli): treat npm exit-code 1 with an error line as a failed install (npm >=10.6.0)

On exit code 1 the install was treated as successful unless result.stderr
started with `npm ERR!`. Since npm/cli#7414 (npm v10.6.0) npm prints errors as
`npm error`, so on modern npm a genuinely failed install passed the check and,
when the target dir already existed (an upgrade), was reported as installed
while the old version stayed in place. Also match the current `npm error`
prefix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Update CHANGELOG.md

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Ingo Fischer <github@fischer-ka.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants