diff --git a/browser/module.go b/browser/module.go index 3637b36b5..c24469a73 100644 --- a/browser/module.go +++ b/browser/module.go @@ -14,7 +14,7 @@ import ( k6modules "go.k6.io/k6/js/modules" ) -const version = "0.7.0" +const version = "0.8.0" type ( // RootModule is the global module instance that will create module diff --git a/go.mod b/go.mod index 05bf2bff3..cb82774dc 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.19 require ( github.com/chromedp/cdproto v0.0.0-20221023212508-67ada9507fb2 - github.com/dop251/goja v0.0.0-20221229151140-b95230a9dbad + github.com/dop251/goja v0.0.0-20230128084908-78b980256d04 github.com/fatih/color v1.13.0 github.com/gorilla/websocket v1.5.0 github.com/hashicorp/go-multierror v1.1.1 @@ -13,7 +13,7 @@ require ( github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c github.com/sirupsen/logrus v1.9.0 github.com/stretchr/testify v1.8.0 - go.k6.io/k6 v0.42.1-0.20230109152238-8418147fa630 + go.k6.io/k6 v0.42.1-0.20230130080633-582ec4d3940c golang.org/x/exp v0.0.0-20221106115401-f9659909a136 golang.org/x/net v0.1.0 golang.org/x/sync v0.1.0 diff --git a/go.sum b/go.sum index d3ac07247..ba75b933a 100644 --- a/go.sum +++ b/go.sum @@ -74,8 +74,8 @@ github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwu github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= -github.com/dop251/goja v0.0.0-20221229151140-b95230a9dbad h1:EikyYzLzjRNW8lz9VAIUcmrwDAU6PsMRnwblYXb6Ysg= -github.com/dop251/goja v0.0.0-20221229151140-b95230a9dbad/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= +github.com/dop251/goja v0.0.0-20230128084908-78b980256d04 h1:iQQgQ1wBsFmpu6OjINCY2ekdknKNNpxO/GOzzww2Amk= +github.com/dop251/goja v0.0.0-20230128084908-78b980256d04/go.mod h1:yRkwfj0CBpOGre+TwBsqPV0IH0Pk73e4PXJOeNDboGs= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -255,8 +255,8 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.k6.io/k6 v0.42.1-0.20230109152238-8418147fa630 h1:0MtQL0OzBWHA9FHmyUxTE5lUGUROhIAbdhBCLt9IQGA= -go.k6.io/k6 v0.42.1-0.20230109152238-8418147fa630/go.mod h1:0/VY8Sd4WTsIkncZFLDQIv7u8wjBtGlBXF3YPrDxK+E= +go.k6.io/k6 v0.42.1-0.20230130080633-582ec4d3940c h1:3Zl45AJ+2iJmliweb9y+U3H81uwgappYlllwsCB/7jM= +go.k6.io/k6 v0.42.1-0.20230130080633-582ec4d3940c/go.mod h1:0ThS9XqUtlglwwsZ7IxXs+QJTkjkMUZgQ/N1r6Wajm8= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= diff --git a/release notes/v0.8.0.md b/release notes/v0.8.0.md new file mode 100644 index 000000000..fbeaf55be --- /dev/null +++ b/release notes/v0.8.0.md @@ -0,0 +1,43 @@ +xk6-browser v0.8.0 is here! :tada: + +This release contains preparation for the upcoming `xk6-browser` and `k6` merge, preparations for the upcoming Async API features, bug fixes, and code refactoring. + + +## Experimental Module Merge into k6 + +We've been busy preparing for this big change that will occur very soon :crossed_fingers:. We have [refactored the code](https://github.com/grafana/xk6-browser/issues/683) in preparation for the merge into `k6` (see [the related issue list](https://github.com/grafana/xk6-browser/issues?q=label%3Ak6-core-compatibility+is%3Aclosed)). This will mean that all future releases of `xk6-browser` will also be part of the `k6` releases (as an experimental module). Merging `xk6-browser` into `k6` will allow you to run both the protocol and browser tests using the same `k6` command line tool. This will also increase the reach and visibility of `xk6-browser` and allow us to collect more feedback and guidance from the community to tailor our product to your needs. _It's worth noting that we're not merging the two code bases into a single one. `xk6-browser` will still be in its own repository._ + +As an experimental module, some of our APIs are likely to change, causing breaking changes in future releases—for example, now that we have `async`/`await` keyword support, we're going to move most of our APIs to `async`. Changes in APIs also means that your Playwright scripts will also start to work in `xk6-browser` with less and less tweaking of your `xk6-browser` test scripts in the upcoming releases—As per our rough compatibility goal with Playwright APIs. + +Currently, browser based tests can only be performed within your own test environments, and it won't be available in the [cloud](https://k6.io/cloud/) (yet). Keep your eyes peeled though on future releases, and the blog to hear more on the public launch of browser testing in the cloud. + +With this release we are continuing to build and upload the artifacts (binaries) for you to download and work with. In the near future we intend to stop that, and instead we will redirect you to the k6 repo, where you will be able to download the latest binary with browser test functionality. We may also stop releasing the release notes here and move them to the k6 release notes. We will create a blog post outlining these details soon. + + +## Improvements + +- Convert promisified (`.then()`) examples to `async`/`await`. [#703](https://github.com/grafana/xk6-browser/pull/703) + + Now all our examples use `async`/`await` instead of the promise `.then()` chains. Please look at the [`examples/`](https://github.com/grafana/xk6-browser/tree/main/examples) folder to see how we use the new feature. We're changing the meaning of this folder and will use it for internal JavaScript tests instead of showing how to use the `xk6-browser` extension. + + +### Documentation + +- We're updating all our docs so that they reflect the merge and the `async`/`await` changes. These updates will be released after the merge and the latest version of `k6` has been released. + + +### Internal bug fixes and improvements + +- Pre-merge: Map k6-browser Async API to Goja. [#683](https://github.com/grafana/xk6-browser/issues/683) + + This is the groundwork for abstracting our internals to get ready for the merge and make it straightforward to upgrade our API to async in the upcoming releases. With this work, we're now able to unlock the following features: + + - Provide an easy switch to the k6 browser Async API. + - Unlock merging of k6 browser to k6 core: Mapping Async APIs. + - Increase developer productivity by clearly separating the k6 browser code and Goja. +- Fix the race condition in frame management. [#696](https://github.com/grafana/xk6-browser/pull/696) +- Fix dismiss dialog test bug. [#713](https://github.com/grafana/xk6-browser/pull/713) +- Fix frame manager navigate frame bug. [#714](https://github.com/grafana/xk6-browser/pull/714) +- Fix lifecycle tests bug. [#712](https://github.com/grafana/xk6-browser/pull/712) +- Several other refactors and bug fixes to improve maintainability and stability: ([#694](https://github.com/grafana/xk6-browser/pull/694), [#699](https://github.com/grafana/xk6-browser/pull/699), [#700](https://github.com/grafana/xk6-browser/pull/700), [#723](https://github.com/grafana/xk6-browser/pull/723), [#716](https://github.com/grafana/xk6-browser/pull/716), [#734](https://github.com/grafana/xk6-browser/pull/734)). +