Skip to content

Add json flag#74

Merged
sindresorhus merged 4 commits into
sindresorhus:mainfrom
jopemachine:add-json
Feb 5, 2022
Merged

Add json flag#74
sindresorhus merged 4 commits into
sindresorhus:mainfrom
jopemachine:add-json

Conversation

@jopemachine
Copy link
Copy Markdown
Contributor

@jopemachine jopemachine commented Feb 2, 2022

Fixes #50

I replaced the logUpdate API in the previous PR with ink's API.
And to avoid showing upload-attributes from the json result when upload is false, added these lines.

I'd appreciate letting me know if there are other tasks to do :)

@sindresorhus
Copy link
Copy Markdown
Owner

The --json output cannot be interactive. It should be possible to redirect the output.

@sindresorhus
Copy link
Copy Markdown
Owner

It should not include the isDone property.

uploadSpeed should also not be included when not using --upload.

@sindresorhus
Copy link
Copy Markdown
Owner

I don't think we should include "downloadUnit": "Mbps". The downloadSpeed and uploadSpeed should always be converted to Mbps if the returned value is not in Mbps.

Comment thread readme.md Outdated
@jopemachine
Copy link
Copy Markdown
Contributor Author

Thanks for your detailed review :)
I just updated PR.

@sindresorhus
Copy link
Copy Markdown
Owner

I think you missed: #74 (comment)

@jopemachine
Copy link
Copy Markdown
Contributor Author

jopemachine commented Feb 5, 2022

I think you missed: #74 (comment)

I'm sorry for missing your point.
I just fixed the PR assuming the convert should be applied when using json option.
If I got wrong, I'd appreciate your letting me know.

@sindresorhus sindresorhus merged commit dc99c4a into sindresorhus:main Feb 5, 2022
@sindresorhus
Copy link
Copy Markdown
Owner

Thanks :)

shiftgeist pushed a commit to shiftgeist/fast-cli-interval that referenced this pull request Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON output

2 participants