From c8f61595301b5b9ee4c69b2b93c5290d81e5a96f Mon Sep 17 00:00:00 2001 From: Oleg Bespalov Date: Tue, 18 Jan 2022 18:02:31 +0100 Subject: [PATCH] Document v0.36 open()'s breaking change --- .../markdown/docs/02 javascript api/01 Init context/open.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/data/markdown/docs/02 javascript api/01 Init context/open.md b/src/data/markdown/docs/02 javascript api/01 Init context/open.md index 6538e6fbe9..7b85116c85 100644 --- a/src/data/markdown/docs/02 javascript api/01 Init context/open.md +++ b/src/data/markdown/docs/02 javascript api/01 Init context/open.md @@ -21,6 +21,10 @@ By restricting it to the init context, we can easily determine what local files See the example further down on this page. For a more in-depth description, see [Running k6](/getting-started/running-k6). +#### Breaking change in v0.36.0 + +Since k6 v0.36.0 we also restricted usage of the `open(...)` under the `__VU` condition. A code like `if (__VU >0) { const arr = open("./arr.json"); }` should cause an error. + | Parameter | Type | Description |