-
Notifications
You must be signed in to change notification settings - Fork 68
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
Replace vm2 with quickjs #817
Conversation
Also use whether it's set as the indicator of whether transformation functions are allowed, instead of checking the config
- Do it in the constructor instead of in callers - Make hookId mandatory so as to not drop it on some state updates - Conflate a state event's state key with a connection state's name, which was already the case in practice
Better to infer the type instead
This should actually be ready now. @Half-Shot give it a look when you can (I can't request a review since this is technically your branch). |
Also refactor similar code
instead of pretending that one was never set
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.
God I wish GitHub let you switch sides in reviews.
I'm minded to say that we want to be extremely careful when changing behaviours here. We're going to be asking people to upgrade ASAP as soon as this is ready, so we don't want to break anything we can avoid. If we can go back to failing on webhook with an error rather than pre-validating, that would be good.
✔️ |
vm2
is no longer supported (https://github.com/patriksimek/vm2#%EF%B8%8F-project-discontinued-%EF%B8%8F). In the interests of keeping the experimental transformation function code safe and secure, we've going to try out quickjs within a wasm wrapper to ensure things are still safe to run.This passes our basic sanity tests, but it will likely result in some breakages.