n8n/packages/@n8n/db
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 ci: Run DB tests against the full supported Postgres range (#35960) 2026-08-11 09:49:07 +00:00
src feat: Add snippets, reusable code callable from expressions and Code nodes 2026-08-12 12:04:37 +02:00
AGENTS.md chore(core): Lock the @n8n/typeorm import ratchet and document the boundary (no-changelog) (#34370) 2026-07-21 08:26:21 +00:00
eslint.config.mjs fix(core): Prevent sub-workflow failures after transferring a deleted user's workflows (#33772) 2026-07-14 07:33:01 +00:00
package.json ci: Run DB tests against the full supported Postgres range (#35960) 2026-08-11 09:49:07 +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 chore: Consolidate ts tooling catalog (#34310) 2026-07-16 10:10:12 +00:00