n8n/packages/@n8n/tournament
n8n-assistant[bot] 2222fe3a6c
chore: Bundle/2.x (#34680)
Co-authored-by: Charlie Kolb <charlie@n8n.io>
Co-authored-by: Guillaume Jacquart <jacquart.guillaume@gmail.com>
Co-authored-by: Stephen Wright <sjw948@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Bernhard Wittmann <bernhard.wittmann@n8n.io>
Co-authored-by: Nikhil Kuriakose <nikhil.kuriakose@n8n.io>
Co-authored-by: Albert Alises <albert.alises@gmail.com>
Co-authored-by: Michael Kret <88898367+michael-radency@users.noreply.github.com>
Co-authored-by: Andreas Fitzek <andreas.fitzek@n8n.io>
Co-authored-by: Elias Meire <elias@meire.dev>
Co-authored-by: Robin Braumann <50590409+bjorger@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: yehorkardash <yehor.kardash@n8n.io>
Co-authored-by: Mike Repeć <mike.repec@n8n.io>
Co-authored-by: Yuliia Pominchuk <31064937+yuliia-pominchuk@users.noreply.github.com>
Co-authored-by: RomanDavydchuk <roman.davydchuk@n8n.io>
2026-07-22 08:09:00 +00:00
..
src chore: Bundle/2.x (#34680) 2026-07-22 08:09:00 +00:00
test chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
.gitignore chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
biome.jsonc chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
eslint.config.mjs chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
LICENSE.md chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
package.json 🚀 Release 2.32.0 (#34600) 2026-07-21 07:14:52 +00:00
README.md chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
tsconfig.build.json chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00
tsconfig.json chore: Migrate all base packages to TypeScript 7 (#34338) 2026-07-17 12:56:29 +03:00
vite.config.ts chore: Move @n8n/tournament to monorepo (#29358) 2026-04-29 08:32:50 +00:00

@n8n/tournament

Tournament is an output-compatible rewrite of riot-tmpl for template expression evaluation.

Installation

pnpm add @n8n/tournament

Features

  • Compatible with riot-tmpl expressions
  • ES6 syntax support, e.g. arrow functions and template literals
  • Built-in AST hooks for expression manipulation
  • TypeScript support

Usage

import { Tournament } from '@n8n/tournament';

const tournament = new Tournament();

// simple expressions
tournament.execute('{{ 1 + 2 }}', {}); // 3

// with data context
tournament.execute('{{ user.name }}', { user: { name: 'John' } }); // 'John'

// template strings
tournament.execute('{{ `Hello ${user.name}!` }}', { user: { name: 'John' } }); // 'Hello John!'

// error handling
const tournament = new Tournament((error) => {
	console.error('Expression error:', error);
});

Release

To release, update the version in package.json and run:

npm version {version}
npm publish

You will need permissions to publish via n8n's npm org.