n8n/packages/@n8n/expression-runtime/src
Charlie Kolb 027b366fd0
feat: Add snippets, reusable code callable from expressions and Code nodes
Snippets are named JS expressions (functions or constants) stored per
instance ($snippets.<name>) or per project ($project.<name>), usable in
expressions and the Code node across all three execution environments:
the legacy/browser expression engine, the isolated-vm engine (compiled
in-isolate from tournament-transformed sources), and the secure task
runner (compiled inside the vm sandbox, never as host closures).

Includes a snippets backend module (CRUD, snippet/projectSnippet RBAC
scopes, save-time compile validation, project ownership transfer),
delivery via additionalData snapshots, a settings UI with a dedicated
editor screen, per-snippet unit tests (left/expected expressions,
deep-compared, run in-browser through the same sandbox pipeline),
expression and Code node autocomplete, and TypeScript language support
with signatures inferred from real snippet sources — reused standalone
in the snippet editor itself.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 12:04:37 +02:00
..
__tests__ chore: Bundle/2.x (#34680) 2026-07-22 08:09:00 +00:00
bridge feat: Add snippets, reusable code callable from expressions and Code nodes 2026-08-12 12:04:37 +02:00
evaluator feat: Add snippets, reusable code callable from expressions and Code nodes 2026-08-12 12:04:37 +02:00
extensions fix: Return reversed array when calling .reverse() (#34625) 2026-07-21 20:25:24 +00:00
observability feat(core): Add observability for the VM expression engine (#28715) 2026-04-24 14:11:07 +00:00
pool fix(core): Quiet VM expression engine logs on the happy path (#31488) 2026-06-01 12:56:50 +00:00
runtime feat: Add snippets, reusable code callable from expressions and Code nodes 2026-08-12 12:04:37 +02:00
types feat: Add snippets, reusable code callable from expressions and Code nodes 2026-08-12 12:04:37 +02:00
index.ts feat(core): Add observability for the VM expression engine (#28715) 2026-04-24 14:11:07 +00:00