Skip to content

[epic] npm logging, output, and cleaning #810

@wraithgar

Description

@wraithgar

Epic

We are going to consolidate and clean up the code npm uses for output, logging, and for sanitizing strings before doing those things.

Currently these are the modules used:

This is likely not a comprehensive list, and not everything here belongs in our new consolidated package for npm output concerns.

### Tasks
- [x] proc-log should have current capabilities moved to sub method .log()
- [x] proc-log should get a method for "standard output"
- [x] proc-log should get a method for "error output" (distinct from log.error)
- [x] replace-info and cleanUrl will be moved to a new package @npmcli/redact
- [x] All of the other functionality will live in npm until proven to need to live elsewhere
- [x] The single console.log in @npmcli/run-script will need to move to the new proc-log standard output method
- [ ] https://github.com/npm/cli/pull/7339
- [ ] https://github.com/npm/proc-log/pull/80
- [ ] https://github.com/npm/proc-log/pull/77
- [ ] https://github.com/npm/cli/pull/7373
- [ ] https://github.com/npm/proc-log/issues/81
- [ ] https://github.com/npm/cli/pull/7377
- [ ] https://github.com/npm/proc-log/pull/85
- [ ] https://github.com/npm/proc-log/pull/84
- [x] https://github.com/npm/cli/blob/latest/lib/utils/format-search-stream.js#L104
- [x] Remove tables (where possible)
- [x] Move https://github.com/npm/disparity-colors to libnpmdiff
- [ ] Remove log "labels"
- [ ] Stop prefixing every log to stdout with `npm ${level}`
- [ ] https://github.com/npm/cli/issues/7354
- [ ] https://github.com/npm/cli/pull/7407
- [ ] https://github.com/npm/cli/pull/7401

Notes

npm progress bars will go away for now

This replaces the following issues

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions