-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new automation step for executing JS #15366
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nicely done! I've been running this locally and it's handling both ExecuteScript
and ExecuteScriptV2
steps as expected. 🎉
|
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.