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

Replace vm2 with quickjs #817

Merged
merged 17 commits into from
Sep 25, 2023
Merged

Replace vm2 with quickjs #817

merged 17 commits into from
Sep 25, 2023

Conversation

Half-Shot
Copy link
Contributor

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.

@Half-Shot Half-Shot requested a review from a team as a code owner September 15, 2023 15:54
package.json Show resolved Hide resolved
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
@AndrewFerr
Copy link
Member

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

instead of pretending that one was never set
Copy link
Contributor Author

@Half-Shot Half-Shot left a 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.

src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
src/Connections/GenericHook.ts Show resolved Hide resolved
src/Connections/GenericHook.ts Outdated Show resolved Hide resolved
tests/connections/GenericHookTest.ts Outdated Show resolved Hide resolved
@Half-Shot
Copy link
Contributor Author

✔️

@AndrewFerr AndrewFerr added this pull request to the merge queue Sep 25, 2023
Merged via the queue into main with commit dc126af Sep 25, 2023
14 checks passed
@AndrewFerr AndrewFerr deleted the hs/quickjs branch September 25, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants