Skip to content
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

Support for multiple target files #74

Open
oleiade opened this issue Oct 5, 2022 · 1 comment
Open

Support for multiple target files #74

oleiade opened this issue Oct 5, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@oleiade
Copy link
Member

oleiade commented Oct 5, 2022

Problem definition

As of today, the jslib website only supports linking to one file per version. It works under the assumption that every jslib should consist in either a single js file, or a single bundled js file.

However, with the introduction of k6-jslib-aws, it appeared that in certain scenarios, we might want the website to have the ability to serve multiple files for a given jslib. AWS actually already serves both a bundle file with access to all the services, as well as service-specific files, but the jslib.k6.io website only points to the main aws.js bundle.

Goal

With the recent wish for the summary jslib to exhibit the same behavior, by exposing both a text.js and a junit.js file to the user, we would like to find a meaningful way for the jlib.k6.io website to be able to point the user to multiple files per version of a jslib.

Potential solution

We could replace the existing table present at the root of the jslib.k6.io website:

Name Versions Docs
{name} {v1}, {v2}, etc... https://k6.io/docs/javascript-api/jslib/mylib

With either a nested HTML table, in which the versions field would itself consist in a table with each line left row's being the version number, and right row being the published files (linked). Unfortunately, that's not possible to demonstrate an example of that in pure markdown 😒

Another option would be to replace it with a list of tables, one per jslib, which would list one version per row, and list the published files for each, as in:

[utils](points to documentation)

Version Resources
{v1} index.js
{v2} index.js

[AWS](points to documentation)

Version Resources
{v1} aws.js, s3.js, secretsManager.js
{v5} aws.js, s3.js, secretsManager.js, kms.js
{v6} aws.js, s3.js, secretsManager.js, kms.js, kms.js
@oleiade oleiade self-assigned this Oct 5, 2022
@oleiade oleiade added the enhancement New feature or request label Oct 5, 2022
@oleiade
Copy link
Member Author

oleiade commented Oct 5, 2022

This was mentioned and requested as a result of #11 and grafana/k6-jslib-summary#3 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant