-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduces --json flag for k6 version sub-command #4093
Conversation
c558178
to
dfe1539
Compare
I suggest using the extension registry terminology. First of all, there is no such thing as a JavaScript or Output extension. An extension can register one or more import paths and one or more output names. That is why the registry has array properties of type "imports" and "outputs" for extensions. I suggest taking the following properties from the registry:
I also suggest deleting the following properties:
|
@szkiba do you mean to perform a network call to registry? 🤔 |
No, sorry. I mean use that property names and values |
@szkiba wouldn't be hard for you modifying the output to reflect your request, in general I do agree that it make sense to follow registry terminology 🤝
|
"extensions": [
{
"module": "github.com/grafana/xk6-sql",
"imports": ["k6/x/sql"]
"version": "v0.0.1"
}
] like this |
0d4b44e
to
dd7a9f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, but would really prefer if we keep making lib/consts
not actually about constants and especialyl as this is only used in cmd
it seems like a good idea to just move it there and unexport it
1854d82
to
74ed82c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good, great work! 🚀
e2535ad
to
aabfd1a
Compare
What?
This PR introduces the new
--json
flag fork6 version
sub-command, which switches the output format to a JSON.Here are some examples:
Basic
With extensions:
Why?
Having the ability to produce JSON structured output is essential if k6 used as part of some automation.
Checklist
make lint
) and all checks pass.make tests
) and all tests pass.Related PR(s)/Issue(s)