Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Karrys <luke@lukekarrys.com>2021-11-27 18:08:06 +0300
committerLuke Karrys <luke@lukekarrys.com>2021-12-02 03:43:08 +0300
commit6734ba36dd6e07a859ab4d6eb4f264d2c0022276 (patch)
treeb21a5c01d1661b4384a2251d801a590c9e14dc13 /package.json
parent037f2cc8c8ed9d9a092475a5a07f2a3a88915633 (diff)
feat: streaming debug logfile
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: https://github.com/npm/cli/pull/4062 Credit: @lukekarrys Close: #4062 Reviewed-by: @wraithgar
Diffstat (limited to 'package.json')
-rw-r--r--package.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/package.json b/package.json
index 118ffe623..9c0cf0142 100644
--- a/package.json
+++ b/package.json
@@ -109,6 +109,7 @@
"opener": "^1.5.2",
"pacote": "^12.0.2",
"parse-conflict-json": "^1.1.1",
+ "proc-log": "^1.0.0",
"qrcode-terminal": "^0.12.0",
"read": "~1.0.7",
"read-package-json": "^4.1.1",
@@ -181,6 +182,7 @@
"opener",
"pacote",
"parse-conflict-json",
+ "proc-log",
"qrcode-terminal",
"read",
"read-package-json",