We're really excited to announce the 1.0.0-beta.0 version of the Elastic Synthetics JS/TS library. However, don't upgrade to this until the 7.13.0 release is available and you've upgraded to it! This release is in preparation for the Elastic Stack 7.13.0 release, which is our current target for moving the Synthetics feature as a whole to beta status.
You're probably wondering why we released the beta version now. Unfortunately we've had to to test internal BCs of the 7.13.0 release, where we're currently targeting the changes that support the synthetics library. Your package.json should look like:
// Only use this dep prior to the 7.13.0 Elastic Stack release!
"dependencies": {
"@elastic/synthetics": "0.0.1-alpha.14"
}
Once the stack supports this new format you can relax the strict version dep above.
This release includes what is hopefully our last breaking change to the Synthetics syntax for a long time, and is reflected in the move from Experimental status, to Beta. It's also a good time to update your package.json
to match the beta up to the 1.x series, instead of *
as we used in previous examples. See the example below:
// Use a new version of the stack is out that supports the synthetics beta.
// In your package.json, will match the 1.x series of synthetics releases
"dependencies": {
"@elastic/synthetics": "^1.0.0-beta"
}
The key change in this release affects typescript users only (throwing type errors in your editor until you upgrade), and makes our journey
callback synchronous rather than asynchronous, fixing this issue. There was never a reason for this method to be async
, since it was called in a synchronous manner anyway. Upgrading your existing scripts should be a simple matter of deleted extra async declarations. See the example below before upgrading your package.json
to the latest version of synthetics, as well as any scripts.
// old style, no longer works
journey('check if title is present', async ({ page }) => {}
// new style, no async!
journey('check if title is present', ({ page }) => {}
For those using the inline
flavor of synthetics, that uses the globally installed version of Elastic Synthetics, which is only upgraded on stack releases, so no changes are needed until we start bundling the beta of the synthetics JS lib, which is currently targeted at 7.13.0.