-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
running jz outdated --json emits output that is not valid json.
In particular,
- the list of entries are not wrapped in
[and]at the head and tail of the outpu - the list of entries are not delimited by commas.
See code here:
Lines 160 to 182 in c2e9658
| for (const result of results) { | |
| const formatted = []; | |
| if (dedup) { | |
| formatted.push(result); | |
| } else { | |
| result.installed.forEach(version => | |
| formatted.push({ | |
| ...result, | |
| installed: [version], | |
| }) | |
| ); | |
| } | |
| if (json) logger('['); | |
| formatted.forEach((entry, i) => | |
| json | |
| ? logger( | |
| JSON.stringify(entry) + (i !== formatted.length - 1 ? ',' : '') | |
| ) | |
| : logger(entry.packageName, entry.installed.join(' '), entry.latest) | |
| ); | |
| if (json) logger(']'); | |
| } |
Metadata
Metadata
Assignees
Labels
No labels