Skip to content
This repository was archived by the owner on Feb 19, 2026. It is now read-only.

Replace use of npmlog dependency with console.error#182

Merged
lovell merged 1 commit intoprebuild:masterfrom
lovell:replace-npmlog-with-console-error
Jun 7, 2022
Merged

Replace use of npmlog dependency with console.error#182
lovell merged 1 commit intoprebuild:masterfrom
lovell:replace-npmlog-with-console-error

Conversation

@lovell
Copy link
Copy Markdown
Member

@lovell lovell commented Jun 4, 2022

This is a possible approach to address #163

The npmlog dependency always writes to stderr so the use of console.error() is consistent with the previous behaviour.

https://github.com/npm/npmlog/blob/7aefa36320a4265f2825f34db29f129f5927f41b/lib/log.js#L12

All existing log message formats and levels remain as before, which takes advantage of existing tests that cover these.

We could remove the concept of levels entirely, but that would have a slightly wider impact and I've not attempted it here.

Closes #163, closes #116.

No change to log message format or level
@vweevers
Copy link
Copy Markdown
Member

vweevers commented Jun 4, 2022

We could remove the concept of levels entirely, but that would have a slightly wider impact and I've not attempted it here.

Aye, that can done later in a follow-up PR.

@lovell lovell added the semver-patch Bug fixes that are backward compatible label Jun 6, 2022
@lovell
Copy link
Copy Markdown
Member Author

lovell commented Jun 6, 2022

I've tagged this as semver-patch and plan to merge and publish in the next day or so unless there are any objections.

@lovell lovell merged commit 4e2284c into prebuild:master Jun 7, 2022
@lovell lovell deleted the replace-npmlog-with-console-error branch June 7, 2022 20:06
@lovell
Copy link
Copy Markdown
Member Author

lovell commented Jun 7, 2022

Published in v7.1.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

semver-patch Bug fixes that are backward compatible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve vulnerabilities in dependencies (npmlog>gauge>ansi-regex) reduce dependencies

2 participants