A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/npm/cli/commit/53cda32aa35f3a592fb0ddf37e43c028f93ef613 below:

refactor ls to use output.buffer for json (#7542) · npm/cli@53cda32 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+8

-5

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+8

-5

lines changed Original file line number Diff line number Diff line change

@@ -177,11 +177,14 @@ class LS extends ArboristWorkspaceCmd {

177 177

const [rootError] = tree.errors.filter(e =>

178 178

e.code === 'EJSONPARSE' && e.path === resolve(path, 'package.json'))

179 179 180 -

output.buffer(

181 -

json ? jsonOutput({ path, problems, result, rootError, seenItems }) :

182 -

parseable ? parseableOutput({ seenNodes, global, long }) :

183 -

humanOutput({ chalk, result, seenItems, unicode })

184 -

)

180 +

if (json) {

181 +

output.buffer(jsonOutput({ path, problems, result, rootError, seenItems }))

182 +

} else {

183 +

output.standard(parseable

184 +

? parseableOutput({ seenNodes, global, long })

185 +

: humanOutput({ chalk, result, seenItems, unicode })

186 +

)

187 +

}

185 188 186 189

// if filtering items, should exit with error code on no results

187 190

if (result && !result[_include] && args.length) {

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4