Open elastic-renovate-prod[bot] opened 5 days ago
In order to perform the update(s) described in the table above, Renovate ran the go get
command, which resulted in the following additional change(s):
Details:
Package | Change |
---|---|
golang.org/x/time |
v0.6.0 -> v0.7.0 |
github.com/fatih/color |
v1.17.0 -> v1.18.0 |
golang.org/x/net |
v0.28.0 -> v0.30.0 |
golang.org/x/sys |
v0.24.0 -> v0.26.0 |
golang.org/x/text |
v0.17.0 -> v0.19.0 |
google.golang.org/grpc |
v1.65.0 -> v1.67.1 |
google.golang.org/protobuf |
v1.34.2 -> v1.35.1 |
This PR contains the following updates:
v0.54.0
->v0.55.0
Release Notes
grafana/k6 (go.k6.io/k6)
### [`v0.55.0`](https://togithub.com/grafana/k6/releases/tag/v0.55.0) [Compare Source](https://togithub.com/grafana/k6/compare/v0.54.0...v0.55.0) k6 `v0.55.0` is here π! This release includes: - β οΈ The deprecated StatsD output has been removed. - β οΈ The experimental `k6/experimental/tracing` module has been removed. - π URL grouping support in the browser module. - π Top-level `await` support. - π Complete RSA support for `k6/experimental/webcrypto`. #### Breaking changes ##### `k6/experimental/tracing` module removed [`#3855`](https://togithub.com/grafana/k6/pull/3855) The experimental `k6/experimental/tracing` module has been removed, in favor of a replacement [jslib](https://jslib.k6.io/http-instrumentation-tempo/) polyfill, please consult our [guide on how to migrate](https://grafana.com/docs/k6/latest/javascript-api/jslib/http-instrumentation-tempo/#migration-from-k6experimentaltracing), [`#3855`](https://togithub.com/grafana/k6/pull/3855). ##### StatsD output removed [`#3849`](https://togithub.com/grafana/k6/pull/3849) The StatsD output was deprecated in k6 v0.47.0 and is now removed. You could still output results to StatsD using the community xk6 extension [LeonAdato/xk6-output-statsd](https://togithub.com/LeonAdato/xk6-output-statsd). Thanks, [@LeonAdato](https://togithub.com/LeonAdato) for taking over the extension! ##### `open` will have a breaking change in the future. Currently, `open` opens relative files based on an unusual root, similar to how `require` behaved before it was updated for ESM compatibility. To make k6 more consistent, `open` and other functions like it will start handling relative paths in the same way as imports and `require`. For a more in-depth explanation, please refer to the related [issue](https://togithub.com/grafana/k6/issues/3857). With this version, k6 will start emitting warnings when it detects that in the future, this will break. We recommend using [`import.meta.resolve()`](https://grafana.com/docs/k6/latest/javascript-api/import.meta/resolve/) as a way to make your scripts future proof. ##### `http.file#data` now truly has the same type as the provided data [`#4009`](https://togithub.com/grafana/k6/pull/4009) Previously `http.file#data` was always a slice of byte (`[]byte`) - which was very likely a bug and a leftover from years past. The original aim (also documented) was to have the same type as the data provided when creating the `http.file` object, and it is now effectively the case. #### New features ##### Top-level await support [`4007`](https://togithub.com/grafana/k6/pull/4007) After the initial native support for ECMAScript modules, k6 can now load those modules asynchronously which also allows `await` to be used in the top-level of a module. That is you can write `await someFunc()` directly in the top most level of a module instead of having to make an async function that you call that can than use `await`. Until now, you had to wrap your code in an async function to use `await` in the top-level of a module. For example, the following code: ```javascript import { open } from 'k6/experimental/fs' import csv from 'k6/experimental/csv' let file; let parser; (async function () { file = await open('data.csv'); parser = new csv.Parser(file); })(); ``` Can now be written as: ```javascript import { open } from 'k6/experimental/fs' import csv from 'k6/experimental/csv' const file = await open('data.csv'); const parser = new csv.Parser(file); ``` This should make using the increasing number of async APIs in k6 easier in the [init context](https://grafana.com/docs/k6/latest/using-k6/test-lifecycle/#the-init-stage). This is not allowed in case of using the CommonJS modules, only ECMAScript modules, as CommonJS modules are synchronous by definition. ##### Complete\[^1] RSA support for `k6/experimental/webcrypto` [`#4025`](https://togithub.com/grafana/k6/pull/4025) This update includes support for the RSA family of algorithms, including `RSA-OAEP`, `RSA-PSS` and `RSASSA-PKCS1-v1_5`. You can use these algorithms with the `crypto.subtle` API in the same way as the other algorithms, precisely for `generateKey`, `importKey`, `exportKey`, `encrypt`, `decrypt`, `sign`, and `verify` operations. By implementing RSA support, we make our WebCrypto API implementation more complete and useful for a broader range of use cases. \[^1]: Since under the hood we do fully rely on the Golang's SDK, our implementation doesn't support zero salt lengths for the `RSA-PSS` `sign`/`verify` operations. ##### Example usageExpand to see an example of generation RSA-PSS key pair.
```javascript import { crypto } from "k6/experimental/webcrypto"; export default async function () { const keyPair = await crypto.subtle.generateKey( { name: "RSA-PSS", modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: { name: "SHA-1" }, }, true, ["sign", "verify"] ); console.log(JSON.stringify(keyPair)); } ```Expand to see an example of working with `page.on('metric')`.
```js import { browser } from 'k6/browser'; export const options = { scenarios: { ui: { executor: 'shared-iterations', options: { browser: { type: 'chromium', }, }, }, }, } export default async function() { const page = await browser.newPage(); // Here, we set up an event listener using page.on('metric'). // You can call page.on('metric') multiple times, and each callback function // will be executed in the order that page.on was called. page.on('metric', (metric) => { // Currently, metric.tag is the only available method on the metric object. // It enables matching on the URL tag using a specified regex pattern. // You can call metric.tag multiple times within the callback function. metric.tag({ // This is the new name assigned to any metric that matches the defined // URL pattern below. name: 'test', // Provide one or more match patterns here. Any metrics that match a pattern // will use the new name specified above. matches: [ // Each match pattern can include a URL and an optional method. // When a method is specified, the metric must match both the URL pattern // and the method. If no method is provided, the pattern will match all // HTTP methods. {url: /^https:\/\/test\.k6\.io\/\?q=[0-9a-z]+$/, method: 'GET'}, ] }); }); try { // The following lines are for demonstration purposes. // Visiting URLs with different query parameters (q) to illustrate matching. await page.goto('https://test.k6.io/?q=abc123'); await page.goto('https://test.k6.io/?q=def456'); } finally { // Ensure the page is closed after testing. await page.close(); } } ```Expand to see an example usage of `ControlOrMeta`
```js await page.keyboard.down('ControlOrMeta'); // Open the link in a new tab. // Wait for the new page to be created. const browserContext = browser.context(); const [newTab] = await Promise.all([ browserContext.waitForEvent('page'), await page.locator('a[href="/my_messages.php"]').click() ]); await page.keyboard.up('ControlOrMeta'); ```Configuration
π Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
π¦ Automerge: Disabled by config. Please merge this manually once you are satisfied.
β» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.