Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epic: Output Redesign #366

Closed
5 of 9 tasks
isaacs opened this issue Jun 11, 2021 · 1 comment
Closed
5 of 9 tasks

Epic: Output Redesign #366

isaacs opened this issue Jun 11, 2021 · 1 comment
Assignees
Labels

Comments

@isaacs
Copy link

isaacs commented Jun 11, 2021

Decouple all logging throughout npm modules from npmlog, are-we-there-yet, and guage, while providing an improved user experience and an easier environment in which to iterate on cli output.

SemVer major version of npmlog is solely a proc-log consuming display layer module. (Question: should this maybe instead be a new package name, and deprecate npmlog?)

  • Every cli module that takes a log option should instead use proc-log. (Temporary exception: Arborist will continue to receive a log object so that it can do progress tracking. Keep reading.)
  • Implement a log/progress event handling display layer based on @blessed/neo-blessed.
    • Errors and warnings (anything above the defined loglevel) should be persistent on the screen.
    • All other loglevels maybe we'll want to show, but they should not be persistent if so (silly logs flying by? is this worthwhile, even?)
    • Create a proggy client to listen on progress events, and display progress bars pinned to the bottom of the terminal.
  • Replace Arborist's use of npmlog's trackers with proggy loggers.
  • Consider: should progressbars have a loglevel of sorts? You may want to see a progress bar for every http request if something is hanging, but you probably don't want to normally.
  • Replace cli/lib/doctor.js use of npmlog trackers with proggy loggers.
  • Remove old npmlog, are we there yet, guage, etc.

Debuglog file management should not be a part of this layer. See: #367

@isaacs isaacs added the Epic label Jun 11, 2021
@darcyclarke darcyclarke added this to the OSS - Sprint 34 milestone Jul 26, 2021
@darcyclarke darcyclarke assigned lukekarrys and unassigned lukekarrys Jul 26, 2021
@darcyclarke darcyclarke modified the milestones: OSS - Sprint 34, OSS - Sprint 35 Aug 9, 2021
@darcyclarke darcyclarke modified the milestones: OSS - Sprint 35, OSS - Sprint 36 Aug 23, 2021
@settings settings bot removed the Epic label Aug 31, 2021
@darcyclarke darcyclarke removed this from the OSS - Sprint 36 milestone Oct 18, 2021
@darcyclarke darcyclarke changed the title npmlog is dead, long live npmlog! Output Redesign Epic Epic: Output Redesign Nov 2, 2021
lukekarrys added a commit to npm/cli that referenced this issue Nov 30, 2021
This decouples the log file writing from the terminal logging. We now
open an append only file at the start of the process and stream logs to
it. We still only display the log file message in timing mode or if
there is an error, but the file is still written regardless.

All logging now goes through `proc-log` and his is the first step to
removing `npmlog`. For now `npmlog` is still used for the terminal
logging but with a shim in front of it to make it easier to test and
use in conjunction with `proc-log`. Ref: npm/statusboard#366

This also refactors many of the tests to always use an explicit
`t.testdir` for their cache since the file is opened on each `new Npm()`.
Tests are also refactored to use more of `MockNpm` with behavior to
add config items and load `npm` if necessary. A new fixture `mockGlobals`
was also added to make much of this for ergonomic. Ref: npm/statusboard#410

Closes npm/statusboard#411
Closes npm/statusboard#367
lukekarrys added a commit to npm/cli that referenced this issue Dec 1, 2021
This decouples the log file writing from the terminal logging. We now
open an append only file at the start of the process and stream logs to
it. We still only display the log file message in timing mode or if
there is an error, but the file is still written regardless.

All logging now goes through `proc-log` and this is the first step to
removing `npmlog`. For now `npmlog` is still used for the terminal
logging but with a shim in front of it to make it easier to test and
use in conjunction with `proc-log`. Ref: npm/statusboard#366

This also refactors many of the tests to always use an explicit
`t.testdir` for their cache since the file is opened on each `new Npm()`.
Tests are also refactored to use more of `MockNpm` with behavior to
add config items and load `npm` if necessary. A new fixture `mockGlobals`
was also added to make much of this more ergonomic. Ref: npm/statusboard#410

Closes npm/statusboard#411
Closes npm/statusboard#367
lukekarrys added a commit to npm/cli that referenced this issue Dec 2, 2021
This decouples the log file writing from the terminal logging. We now
open an append only file at the start of the process and stream logs to
it. We still only display the log file message in timing mode or if
there is an error, but the file is still written regardless.

All logging now goes through `proc-log` and this is the first step to
removing `npmlog`. For now `npmlog` is still used for the terminal
logging but with a shim in front of it to make it easier to test and
use in conjunction with `proc-log`. Ref: npm/statusboard#366

This also refactors many of the tests to always use an explicit
`t.testdir` for their cache since the file is opened on each `new Npm()`.
Tests are also refactored to use more of `MockNpm` with behavior to
add config items and load `npm` if necessary. A new fixture `mockGlobals`
was also added to make much of this more ergonomic. Ref: npm/statusboard#410

Closes npm/statusboard#411
Closes npm/statusboard#367

PR-URL: #4062
Credit: @lukekarrys
Close: #4062
Reviewed-by: @wraithgar
@darcyclarke
Copy link
Contributor

Update

  • completed primary work associated with this Epic
  • @lukekarrys to create separate issue to track fringe work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants