From 85a8694dd9b4a924a474ba75261914511a216868 Mon Sep 17 00:00:00 2001 From: Gar Date: Sun, 28 Feb 2021 19:00:58 -0800 Subject: fix(npm.output): make output go through npm.output All output that anything wants to make now goes through `npm.output()`. This is an incremental change getting us closer to where we want to be with testing. PR-URL: https://github.com/npm/cli/pull/2795 Credit: @wraithgar Close: #2795 Reviewed-by: @ruyadorno, @isaacs --- lib/ls.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/ls.js') diff --git a/lib/ls.js b/lib/ls.js index 359fe21e6..b94684401 100644 --- a/lib/ls.js +++ b/lib/ls.js @@ -9,7 +9,6 @@ const npa = require('npm-package-arg') const usageUtil = require('./utils/usage.js') const completion = require('./utils/completion/installed-deep.js') -const output = require('./utils/output.js') const _depth = Symbol('depth') const _dedupe = Symbol('dedupe') @@ -147,7 +146,7 @@ class LS { const [rootError] = tree.errors.filter(e => e.code === 'EJSONPARSE' && e.path === resolve(path, 'package.json')) - output( + this.npm.output( json ? jsonOutput({ path, problems, result, rootError, seenItems }) : parseable -- cgit v1.2.3