n8n/packages/@n8n/task-runner
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
..
scripts chore(core): Streamline runner debugging (#23854) 2026-01-05 14:09:47 +01:00
src feat: Add snippets, reusable code callable from expressions and Code nodes 2026-08-12 12:04:37 +02:00
eslint.config.mjs build: Update ESLint to v9 (#16639) 2025-06-27 10:42:47 +02:00
package.json 🚀 Release 2.35.0 (#36006) 2026-08-11 07:16:06 +00:00
tsconfig.build.json chore: Migrate the rest of packages/@n8n to typescript 7 (#34332) 2026-07-17 10:45:58 +03:00
tsconfig.json chore: Migrate the rest of packages/@n8n to typescript 7 (#34332) 2026-07-17 10:45:58 +03:00
vite.config.ts test: Enable restoreMocks by default in shared vitest configs (#33526) 2026-07-03 10:03:01 +00:00