Skip to content
This repository was archived by the owner on Apr 28, 2026. It is now read-only.

Commit 418cfaa

Browse files
committed
Remove @n8n/riot-tmpl dependency and tmplDiff method (breaking change)
1 parent 128b4b0 commit 418cfaa

6 files changed

Lines changed: 0 additions & 273 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"typescript": "^5.0.0"
5858
},
5959
"dependencies": {
60-
"@n8n_io/riot-tmpl": "^4.0.1",
6160
"ast-types": "^0.16.1",
6261
"esprima-next": "^5.8.4",
6362
"recast": "^0.22.0"

pnpm-lock.yaml

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Analysis.ts

Lines changed: 0 additions & 138 deletions
This file was deleted.

src/Differ.ts

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { getExpressionCode } from './ExpressionBuilder';
22
import type { ExpressionAnalysis } from './ExpressionBuilder';
3-
import { getTmplDifference } from './Analysis';
43
import type { ExpressionEvaluator, ExpressionEvaluatorClass } from './Evaluator';
54
import { FunctionEvaluator } from './FunctionEvaluator';
65
import type { TournamentHooks } from './ast';
76

8-
export type { TmplDifference } from './Analysis';
97
export type { ExpressionEvaluator, ExpressionEvaluatorClass } from './Evaluator';
108
export * from './ast';
119

@@ -32,10 +30,6 @@ export class Tournament {
3230
return getExpressionCode(expr, this._dataNodeName, this.astHooks);
3331
}
3432

35-
tmplDiff(expr: string) {
36-
return getTmplDifference(expr, this._dataNodeName);
37-
}
38-
3933
execute(expr: string, data: unknown): ReturnValue {
4034
// This is to match tmpl. This will only really happen if
4135
// an empty expression is passed in.

test/Expression.test.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
import * as tmpl from '@n8n_io/riot-tmpl';
2-
31
import { Tournament } from '../src/index';
4-
import { isDifferent } from '../src/Differ';
52
import { FunctionEvaluator } from '../src/FunctionEvaluator';
6-
import { baseFixtures } from './ExpressionFixtures/base';
73
import { testExpressionsWithEvaluator } from './utils';
84

9-
tmpl.brackets.set('{{ }}');
105
const evaluator = new Tournament(() => {});
116

127
describe('Expression', () => {
13-
describe('Test all expression transform fixtures', () => {
14-
for (const t of baseFixtures) {
15-
if (t.expression.trimEnd() === '=') {
16-
continue;
17-
}
18-
test(t.expression, () => {
19-
const expr = t.expression.slice(1);
20-
const [tournStr] = evaluator.getExpressionCode(expr);
21-
const tmplStr = tmpl.tmpl.getStr(expr);
22-
expect(isDifferent(tmplStr, tournStr)).toEqual(false);
23-
});
24-
}
25-
});
26-
278
describe('Test all expression evaluation fixtures', () => {
289
testExpressionsWithEvaluator(FunctionEvaluator);
2910
});

0 commit comments

Comments
 (0)