Create a new automation step for executing JS #15366
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In the process of upgrading the development experience of writing JavaScript in automations, we want to port improvements we've made in the JS experience in the designer: live evaluation, access to helpers, access to snippets, showing test values in the bindings drawer.
Unfortunately one problem with all this is that the way JavaScript gets executed on the backend for the existing JavaScript step in automations differs quite a lot to JavaScript elsewhere in Budibase. For example, there is no
$("foo")
syntax in automations to access the execution context, you would just sayfoo
.To bring automation JS in line with the rest of the app, we're introducing a new JavaScript execution step and deprecating the old one. Existing old ones will continue to work, but you will not be able to create new instances of the old JavaScript step.
Code written for the old JS step, e.g.:
Will no longer work in the new one, it will need to be translated to:
Launchcontrol
Add a small description in layman's terms of what this PR achieves. This will be used in the release notes.