mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-18 05:59:42 +02:00
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> |
||
|---|---|---|
| .. | ||
| integration | ||
| migration | ||
| shared | ||
| unit | ||
| extend-expect.ts | ||
| global-setup.ts | ||
| setup-mocks.ts | ||
| setup-test-folder.ts | ||
| setup-testcontainers.ts | ||