Skip to content

Commit

Permalink
Collpase stream example and other typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Apr 30, 2024
1 parent 42846e0 commit f23ae78
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions release notes/v0.51.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ As the last step of the graduation process for the experimental gRPC module, we

### Deprecations

The following pull requests starts the process to introduce breaking changes. They are currently starting to emit warning if their condition is hit, but they will turn to return errors in the future release.
The following pull requests start the process to introduce breaking changes. They are currently starting to emit warning if their condition is hit, but they will turn to return errors in the future release.
It is recommended to use the suggested alternative, or to fix the script if you see the warning message.

- [#3681](https://github.com/grafana/k6/pull/3681) Use of not-compliant `require` expressions.
Expand All @@ -109,10 +109,10 @@ Currently, users can define and consume readable streams . However, this release
and controllers, nor does it include support the `tee`, `pipeTo`, and
`pipeThrough` methods of the `ReadableStream` object.

#### Example: streaming numbers
<details>
<summary> Expand to see an example of stream's usage

The following example demonstrates creating and consuming a simple stream that emits numbers until it reaches a predfined
limit:
The following example demonstrates creating and consuming a simple stream that emits numbers until it reaches a predefined limit:

```javascript
import { ReadableStream } from 'k6/experimental/streams'
Expand Down Expand Up @@ -151,6 +151,8 @@ export default async function () {
}
```

</details>

For more advanced examples, please head to the MDN Web Docs on the [Streams API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API).

### New features and updates of WebCrypto API support [#3714](https://github.com/grafana/k6/pull/3714)
Expand Down Expand Up @@ -228,46 +230,46 @@ See [webcrypto's module documentation](https://grafana.com/docs/k6/latest/javasc

### Timers globally available [#3589](https://github.com/grafana/k6/pull/3589)

`setTimeout` and co. have been part of the JavaScript ecosystem, probably for as long as it has existed.
`setTimeout`, `setInterval` and related clear functions have been part of the JavaScript ecosystem, probably for as long as it has existed.

In the previous releases we stabilized and made them available through `k6/timers` module. While the module isn't going anywhere and might get more identifiers, `setTimeout` is usually used without importing it. For this reason it is now globally available along `clearTimeot`, `setInterval` and `clearInterval`.
In the previous releases we stabilized and made them available through `k6/timers` module. While the module isn't going anywhere and might get more identifiers, `setTimeout` is usually used without importing it. For this reason it is now globally available along `clearTimeoutt`, `setInterval` and `clearInterval`.

No code needs to be changed, but you no longer need to import `k6/timers` to use this functionality.

## UX improvements and enhancements

- [#3670](https://github.com/grafana/k6/issues/3670) Add the ability to [enable profiling](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#profiling-enabled) via environment variable.
- [#3670](https://github.com/grafana/k6/issues/3670) adds the ability to [enable profiling](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#profiling-enabled) via environment variable.
- [#3682](https://github.com/grafana/k6/pull/3682) emits a new event when the summary is generated. This new event is part of an internal API, if you intend to use it be aware that we may change it in the future. Thanks, @ameetpal, for your contribution!
- [#3655](https://github.com/grafana/k6/pull/3655) Clarified the error message for the validation of sceanario's name.
- [#3693](https://github.com/grafana/k6/pull/3693) Adds a gRPC client's `asyncInvoke` method to the `k6/net/grpc` module. It's [a non-blocking version](https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/client/client-async-invoke/) of the `invoke` method.
- [browser#1259](https://github.com/grafana/xk6-browser/pull/1259), [browser#1260](https://github.com/grafana/xk6-browser/pull/1260) Adds errors to the traces that the browser module generates.
- [#3655](https://github.com/grafana/k6/pull/3655) clarifies the error message for the validation of scenario's name.
- [#3693](https://github.com/grafana/k6/pull/3693) adds a gRPC client's `asyncInvoke` method to the `k6/net/grpc` module. It's [a non-blocking version](https://grafana.com/docs/k6/latest/javascript-api/k6-net-grpc/client/client-async-invoke/) of the `invoke` method.
- [browser#1259](https://github.com/grafana/xk6-browser/pull/1259), [browser#1260](https://github.com/grafana/xk6-browser/pull/1260) adds errors to the traces that the browser module generates.

## Bug fixes

- [#3708](https://github.com/grafana/k6/pull/3708) Deny access `execution.test.options` from Init context.
- [#3660](https://github.com/grafana/k6/pull/3660) Pick the correct value when [SystemTags](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#system-tags) are set via environment variable.
- [#3657](https://github.com/grafana/k6/pull/3657) Not panic when `mappings` field is empty in the provided SourceMap.
- [#3717](https://github.com/grafana/k6/pull/3717) Return a correct line number when a inlined SourceMap is used.
- [browser#1261](https://github.com/grafana/xk6-browser/pull/1261) Fixes dispose context canceled errors.
- [browser#1254](https://github.com/grafana/xk6-browser/pull/1254) Fixes an indefinite wait when testing websites with iframes.
- [#3708](https://github.com/grafana/k6/pull/3708) denies access to `execution.test.options` from Init context.
- [#3660](https://github.com/grafana/k6/pull/3660) picks the correct value when [SystemTags](https://grafana.com/docs/k6/latest/using-k6/k6-options/reference/#system-tags) are set via the `k6_SYSTEM_TAGS` environment variable.
- [#3657](https://github.com/grafana/k6/pull/3657) fixes a panic when `mappings` field is empty in the provided SourceMap.
- [#3717](https://github.com/grafana/k6/pull/3717) returns a correct line number when an inlined SourceMap is used.
- [browser#1261](https://github.com/grafana/xk6-browser/pull/1261) fixes dispose context canceled errors.
- [browser#1254](https://github.com/grafana/xk6-browser/pull/1254) fixes an indefinite wait when testing websites with iframes.

## Maintenance and internal improvements

- [#3663](https://github.com/grafana/k6/pull/3663), [#3673](https://github.com/grafana/k6/pull/3673) Several dependencies have been updated.
- [#3674](https://github.com/grafana/k6/pull/3674) k6 binary is now built and tested using Go 1.22.
- [browser#1262](https://github.com/grafana/xk6-browser/pull/1262) Fixes a flaky test.
- [browser#1264](https://github.com/grafana/xk6-browser/pull/1264) Removes unimplemented APIs.
- [#3663](https://github.com/grafana/k6/pull/3663), [#3673](https://github.com/grafana/k6/pull/3673) updates several dependencies.
- [#3674](https://github.com/grafana/k6/pull/3674) updates the Go version, now k6 binary is built and tested using Go 1.22.
- [browser#1262](https://github.com/grafana/xk6-browser/pull/1262) fixes a flaky test.
- [browser#1264](https://github.com/grafana/xk6-browser/pull/1264) removes unimplemented APIs.

## Future plans

### Use Blob as default value for WebSocket.binaryType

As the changes in documentation mention, [`binaryType`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/binaryType) was by deafult set to `arraybuffer`, now instead it is by default `""` (empty string).
As the changes in documentation mention, [`binaryType`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/binaryType) was by default set to `arraybuffer`, now instead it is `""` (empty string).
In a not so remote future, instead, we expect to introduce and use Blob object.

### WebCrypto graduation

WebCrypto got more features in the current release, and we expect to continute its expansion in the next iterations. Reaching a wider coverage will push WebCrypto module to being graduated as a stable module.
WebCrypto got more features in the current release, and we expect to continue its expansion in the next iterations. Reaching a wider coverage will push WebCrypto module to being graduated as a stable module.

### Streams API

Expand All @@ -279,4 +281,4 @@ In the near future, we intend to reiterate on `k6 cloud` and related commands to

### Remove experimental timers module

The `k6/experimental/timers` module is not part of the stable k6 API. All the timers are globally available. The next release will make the experimental import no longer available.
The `k6/experimental/timers` module is now part of the stable k6 API as `k6/timers` and via the globally available functions. The next release will make the experimental import no longer available.

0 comments on commit f23ae78

Please sign in to comment.