-
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
Include non-transpiled JS files in k6 archives #387
Comments
Current behaviour is actually an optimisation from the dark days before #212, but this is much more sensible. |
Correct me if I am wrong, but we discussed initially we only want to include the non-transpiled content of the Users could import local |
A negligible difference in complexity, a big gain in consistency. |
There are two reasons why this would be a good idea:
In our cloud service (loadimpact.com) we would like to be able to access the non-transpiled ES6 JS. The current ES5 transpiled JS file(s) included in k6 archives would not be as recognizable to the user, and we'd want to be able to show the script for user reference when analyzing results (and down the line for displaying scripting errors etc.). It could also be that the JS code is not written by the user directly but rather converted from some other format (HAR/Postman/etc) in which case we'd like to be able to show the code in various ways to guide/educate the user on scripting.
The k6 archive could be used to share a test with others. Not just for execution as would be the primary use case now given what's included in the archive, but for sharing the actual scripts and data files themselves. Sometimes it would be quicker to just
k6 archive script.js
and share over Slack or whatever than to share the code through Github or the like.For reference this simple ES6 JS code:
gets transpiled into this ES5 code when included in the archive:
The text was updated successfully, but these errors were encountered: