Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
deps: use proc-log instead of process.emit
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Feb 10, 2022
1 parent 4a1962c commit fd4cd42
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const conf = new Config({
cwd: process.cwd(),
// optional, defaults to emitting 'log' events on process object
// only silly, verbose, warn, and error are logged by this module
log: require('npmlog')
log: require('proc-log')
})

// returns a promise that fails if config loading fails, and
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Config {
// options just to override in tests, mostly
env = process.env,
argv = process.argv,
log = require('./proc-log.js'),
log = require('proc-log'),
platform = process.platform,
execPath = process.execPath,
cwd = process.cwd(),
Expand Down
4 changes: 0 additions & 4 deletions lib/proc-log.js

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"ini": "^2.0.0",
"mkdirp-infer-owner": "^2.0.0",
"nopt": "^5.0.0",
"proc-log": "^2.0.0",
"read-package-json-fast": "^2.0.3",
"semver": "^7.3.5",
"walk-up-path": "^1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion test/parse-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ t.strictSame(parseField({ a: 1 }, 'a'), { a: 1 })
const opts = {
platform: 'posix',
types: require('./fixtures/types.js'),
log: require('../lib/proc-log.js'),
log: require('proc-log'),
home: '/home/user',
env: { foo: 'bar' },
}
Expand Down
2 changes: 1 addition & 1 deletion test/proc-log.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const log = require('../lib/proc-log.js')
const log = require('proc-log')
const t = require('tap')
const logs = []
process.on('log', (...msg) => logs.push(msg))
Expand Down

0 comments on commit fd4cd42

Please sign in to comment.