Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@n8n/tournament

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@n8n/tournament - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

19

dist/ExpressionSplitter.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.joinExpression = exports.splitExpression = exports.escapeCode = void 0;
const OPEN_BRACKET = /(?<escape>\\|)(?<brackets>\{\{)/;
const CLOSE_BRACKET = /(?<escape>\\|)(?<brackets>\}\})/;
const OPEN_BRACKET = /(?<brackets>\{\{)/;
const CLOSE_BRACKET = /(?<brackets>\}\})/;
const escapeCode = (text) => {

@@ -10,3 +10,7 @@ return text.replace('\\}}', '}}');

exports.escapeCode = escapeCode;
const normalizeBackslashes = (text) => {
return text.replace(/\\\\/g, '\\');
};
const splitExpression = (expression) => {
var _a, _b, _c;
const chunks = [];

@@ -37,5 +41,8 @@ let searchingFor = 'open';

}
if (res.groups.escape) {
buffer += expr.slice(0, res.index + 3);
index += res.index + 3;
const beforeMatch = expr.slice(0, res.index);
const backslashCount = (_c = (_b = (_a = beforeMatch.match(/\\*$/)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0;
const isEscaped = backslashCount % 2 === 1;
if (isEscaped) {
buffer += expr.slice(0, res.index + '{{'.length);
index += res.index + '{{'.length;
}

@@ -47,3 +54,3 @@ else {

type: 'text',
text: buffer,
text: normalizeBackslashes(buffer),
});

@@ -50,0 +57,0 @@ searchingFor = 'close';

{
"name": "@n8n/tournament",
"version": "1.0.5",
"version": "1.0.6",
"description": "Output compatible rewrite of riot tmpl",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -16,4 +16,4 @@ export interface ExpressionText {

const OPEN_BRACKET = /(?<escape>\\|)(?<brackets>\{\{)/;
const CLOSE_BRACKET = /(?<escape>\\|)(?<brackets>\}\})/;
const OPEN_BRACKET = /(?<brackets>\{\{)/;
const CLOSE_BRACKET = /(?<brackets>\}\})/;

@@ -24,2 +24,6 @@ export const escapeCode = (text: string): string => {

const normalizeBackslashes = (text: string): string => {
return text.replace(/\\\\/g, '\\');
};
export const splitExpression = (expression: string): ExpressionChunk[] => {

@@ -56,5 +60,10 @@ const chunks: ExpressionChunk[] = [];

}
if (res.groups.escape) {
buffer += expr.slice(0, res.index + 3);
index += res.index + 3;
const beforeMatch = expr.slice(0, res.index);
const backslashCount = beforeMatch.match(/\\*$/)?.[0]?.length ?? 0;
const isEscaped = backslashCount % 2 === 1;
if (isEscaped) {
buffer += expr.slice(0, res.index + '{{'.length);
index += res.index + '{{'.length;
} else {

@@ -66,3 +75,3 @@ buffer += expr.slice(0, res.index);

type: 'text',
text: buffer,
text: normalizeBackslashes(buffer),
});

@@ -69,0 +78,0 @@ searchingFor = 'close';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc