Skip to content
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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

samwho
Copy link
Collaborator

@samwho samwho commented Jan 14, 2025

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 say foo.

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.:

return trigger.row.name;

Will no longer work in the new one, it will need to be translated to:

return $("trigger.row.name");

Launchcontrol

Add a small description in layman's terms of what this PR achieves. This will be used in the release notes.

Copy link

qa-wolf bot commented Jan 14, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

@samwho samwho requested a review from deanhannigan January 14, 2025 15:07
@github-actions github-actions bot added firestorm Data/Infra/Revenue Team size/m labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firestorm Data/Infra/Revenue Team size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant