From 4fd17318eeb71f6967eaddbdbf9fade604c0e131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 12 Dec 2022 10:18:07 +0100 Subject: [PATCH 01/14] Initial commit --- .gitignore | 6 + .npmignore | 7 ++ .vscode/settings.json | 16 +++ LICENSE | 21 ++++ README.md | 50 +++++++++ package.json | 33 ++++++ rollup.config.js | 12 ++ src/index.ts | 41 +++++++ src/syntax.grammar | 23 ++++ test/cases.txt | 247 ++++++++++++++++++++++++++++++++++++++++++ test/cases.txt.orig | 41 +++++++ test/test.js | 23 ++++ tsconfig.json | 11 ++ 13 files changed, 531 insertions(+) create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 .vscode/settings.json create mode 100644 LICENSE create mode 100644 README.md create mode 100644 package.json create mode 100644 rollup.config.js create mode 100644 src/index.ts create mode 100644 src/syntax.grammar create mode 100644 test/cases.txt create mode 100644 test/cases.txt.orig create mode 100644 test/test.js create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000..e2ddf9644d291 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/node_modules +package-lock.json +/dist +/src/*.js +/src/*.d.ts +.DS_Store \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000000000..b7c7b999abade --- /dev/null +++ b/.npmignore @@ -0,0 +1,7 @@ +.vscode +node_modules +src +test +rollup.config.js +tsconfig.json + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000..4ba9fce3986cc --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "workbench.colorCustomizations": { + "commandCenter.border": "#15202b99", + "sash.hoverBorder": "#fbed80", + "statusBar.background": "#f9e64f", + "statusBar.foreground": "#15202b", + "statusBarItem.hoverBackground": "#f7df1e", + "statusBarItem.remoteBackground": "#f9e64f", + "statusBarItem.remoteForeground": "#15202b", + "titleBar.activeBackground": "#f9e64f", + "titleBar.activeForeground": "#15202b", + "titleBar.inactiveBackground": "#f9e64f99", + "titleBar.inactiveForeground": "#15202b99" + }, + "peacock.color": "#f9e64f" +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000..57650a9daf619 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (C) 2021 by Marijn Haverbeke and others + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000..7246115f6ea62 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# codemirror-lang-n8n-expression + +n8n expression language support for CodeMirror 6. + +## Usage + +Install n8n expression language support: + +```sh +npm i codemirror-lang-n8n-expression +``` + +Install setup dependencies: + +```sh +npm i @codemirror/language @lezer/common @lezer/javascript +``` + +Set up language support: + +```js +import { LRLanguage, LanguageSupport } from '@codemirror/language'; +import { parseMixed } from '@lezer/common'; +import { parser as jsParser } from '@lezer/javascript'; +import { parserWithMetaData as n8nParser } from './n8nLanguagePack'; + +const n8nPlusJsParser = n8nParser.configure({ + wrap: parseMixed((node) => { + if (node.type.isTop) return null; + + return node.name === 'Resolvable' + ? { parser: jsParser, overlay: (node) => node.type.name === 'Resolvable' } + : null; + }), +}); + +const n8nLanguage = LRLanguage.define({ parser: n8nPlusJsParser }); + +export function n8nExpressionLanguageSupport() { + return new LanguageSupport(n8nLanguage); +} +``` + +## Author + +© 2022 [Iván Ovejero](https://github.com/ivov) + +## License + +Distributed under the [MIT License](LICENSE.md). diff --git a/package.json b/package.json new file mode 100644 index 0000000000000..7603842236d29 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "codemirror-lang-n8n-expression", + "version": "0.1.0", + "description": "n8n expression language support for CodeMirror 6", + "scripts": { + "test": "npm run prepare && mocha test/test.js", + "prepare": "rollup -c" + }, + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.js", + "exports": { + "import": "./dist/index.js", + "require": "./dist/index.cjs" + }, + "types": "dist/index.d.ts", + "sideEffects": false, + "dependencies": { + "@codemirror/autocomplete": "^6.3.0", + "@codemirror/language": "^6.0.0", + "@lezer/highlight": "^1.0.0", + "@lezer/lr": "^1.0.0" + }, + "devDependencies": { + "@lezer/generator": "^1.0.0", + "mocha": "^9.0.1", + "rollup": "^2.60.2", + "rollup-plugin-dts": "^4.0.1", + "rollup-plugin-ts": "^3.0.2", + "typescript": "^4.3.4" + }, + "license": "MIT" +} diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000000000..0c50c8cdfa35a --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,12 @@ +import typescript from "rollup-plugin-ts"; +import { lezer } from "@lezer/generator/rollup"; + +export default { + input: "src/index.ts", + external: (id) => id != "tslib" && !/^(\.?\/|\w:)/.test(id), + output: [ + { file: "dist/index.cjs", format: "cjs" }, + { dir: "./dist", format: "es" }, + ], + plugins: [lezer(), typescript()], +}; diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000000000..04118d08a412c --- /dev/null +++ b/src/index.ts @@ -0,0 +1,41 @@ +import { completeFromList } from "@codemirror/autocomplete"; +import { parser } from "./syntax.grammar"; +import { + LRLanguage, + LanguageSupport, + foldNodeProp, + foldInside, +} from "@codemirror/language"; +import { styleTags, tags as t } from "@lezer/highlight"; + +export const parserWithMetaData = parser.configure({ + props: [ + foldNodeProp.add({ + Application: foldInside, + }), + styleTags({ + OpenMarker: t.brace, + CloseMarker: t.brace, + Plaintext: t.content, + Resolvable: t.string, + BrokenResolvable: t.className, + }), + ], +}); + +export const n8nLanguage = LRLanguage.define({ + parser: parserWithMetaData, + languageData: { + commentTokens: { line: ";" }, + }, +}); + +const completions = n8nLanguage.data.of({ + autocomplete: completeFromList([ + // { label: "test", type: "keyword" }, // to add in future + ]), +}); + +export function n8nExpression() { + return new LanguageSupport(n8nLanguage, [completions]); +} diff --git a/src/syntax.grammar b/src/syntax.grammar new file mode 100644 index 0000000000000..b6b307e852b58 --- /dev/null +++ b/src/syntax.grammar @@ -0,0 +1,23 @@ +@top Program { entity* } + +entity { Plaintext | Resolvable | BrokenResolvable } + +@tokens { + Plaintext { ![{] Plaintext? | "{" (@eof | ![{] Plaintext?) } + + BrokenResolvable { "{{" ![}]* "}"? } + + OpenMarker[closedBy="CloseMarker"] { "{{" } + + CloseMarker[openedBy="OpenMarker"] { "}}" } + + Resolvable { + OpenMarker resolvableChar* CloseMarker + } + + resolvableChar { @asciiLetter | @digit | @whitespace | $[()\[\]{<>~`!@#$%^&*\-\_+=|\\;:'",./?] | "}" ![}] | "\\}}" } + + @precedence { BrokenResolvable, Resolvable } +} + +@detectDelim diff --git a/test/cases.txt b/test/cases.txt new file mode 100644 index 0000000000000..98f18e99f9d80 --- /dev/null +++ b/test/cases.txt @@ -0,0 +1,247 @@ +# Resolvable + +{{ 1 + 1 }} + +==> + +Program(Resolvable) + +# Empty Resolvable + +{{}} + +==> + +Program(Resolvable) + +# Resolvable of only whitespace + +{{ }} + +==> + +Program(Resolvable) + +# No content + + + +==> + +Program + +# Plaintext + +text + +==> + +Program(Plaintext) + +# Plaintext of single-brace-wrapped text + +{text} + +==> + +Program(Plaintext) + +# Plaintext then Resolvable + +text {{ 1 + 1 }} + +==> + +Program(Plaintext, Resolvable) + +# Resolvable then Plaintext + +{{ 1 + 1 }} Plaintext + +==> + +Program(Resolvable, Plaintext) + +# Plaintext then Resolvable then Plaintext + +text {{ 1 + 1 }} text + +==> + +Program(Plaintext, Resolvable, Plaintext) + +# Resolvable then Plaintext then Resolvable + +{{ 1 + 1 }} text {{ 1 + 1 }} + +==> + +Program(Resolvable,Plaintext,Resolvable) + +# Plaintext then Resolvable then Plaintext then Resolvable + +text {{ 1 + 1 }} text {{ 1 + 1 }} + +==> + +Program(Plaintext, Resolvable, Plaintext, Resolvable) + +# Resolvable then Plaintext then Resolvable then Plaintext + +{{ 1 + 1 }} text {{ 1 + 1 }} text + +==> + +Program(Resolvable,Plaintext,Resolvable,Plaintext) + +# Resolvable containing all resolvable chars + +{{ he ()[]{<>~`!@#$%^&*-_+=|\;:'",./?\{ llo }} + +==> + +Program(Resolvable) + +# Resolvable containing single left brace + +{{ he { llo }} + +==> + +Program(Resolvable) + +# Resolvable containing double left brace + +{{ he {{ llo }} + +==> + +Program(Resolvable) + +# Resolvable containing triple left brace + +{{ he {{{ llo }} + +==> + +Program(Resolvable) + +# Resolvable containing single right brace + +{{ he } llo }} + +==> + +Program(Resolvable) + +# Resolvable containing escaped double right brace + +{{ he \}} llo }} + +==> + +Program(Resolvable) + +# Resolvable containing escaped triple right brace + +{{ he \}}} llo }} + +==> + +Program(Resolvable) + +# Resolvable containing single-brace-wrapped text with escaping + +{{ he { abc } llo }} + +==> + +Program(Resolvable) + +# Resolvable containing double-brace-wrapped text with escaping + +{{ he {{ abc \}} llo }} + +==> + +Program(Resolvable) + +# Resolvable containing triple-brace-wrapped text with escaping + +{{ he {{{ abc \}}} llo }} + +==> + +Program(Resolvable) + +# Resolvable containing single-bracket-wrapped text + +{{ he [ abc ] llo }} + +==> + +Program(Resolvable) + +# Resolvable containing double-bracket-wrapped text + +{{ he [[ abc ]] llo }} + +==> + +Program(Resolvable) + +# Resolvable containing triple-bracket-wrapped text + +{{ he [[[ abc ]]] llo }} + +==> + +Program(Resolvable) + +# Plaintext of one opening brace + +{ + +==> + +Program(Plaintext) + +# Plaintext of one opening brace and two closing braces + +{ }} + +==> + +Program(Plaintext) + +# BrokenResolvable of two opening braces + +{{ + +==> + +Program(BrokenResolvable) + +# BrokenResolvable of two opening braces and text + +{{text + +==> + +Program(BrokenResolvable) + +# BrokenResolvable of two opening braces and one closing brace + +{{ } + +==> + +Program(BrokenResolvable) + +# BrokenResolvable of two opening braces, text and one closing brace + +{{ abc } + +==> + +Program(BrokenResolvable) diff --git a/test/cases.txt.orig b/test/cases.txt.orig new file mode 100644 index 0000000000000..24161e00c64fb --- /dev/null +++ b/test/cases.txt.orig @@ -0,0 +1,41 @@ +# Booleans + +#t +#f + +==> + +Program(Boolean, Boolean) + +# Identifiers + +one +Two_Three + +==> + +Program(Identifier, Identifier) + +# Strings + +"hello" +"one\"\\two" + +==> + +Program(String, String) + +# Applications + +(begin + (when #t + (print (concat "hello" " " "world"))) + (print "DONE")) + +==> + +Program(Application( + Identifier, + Application(Identifier, Boolean, Application( + Identifier, Application(Identifier, String, String, String))) + Application(Identifier, String))) diff --git a/test/test.js b/test/test.js new file mode 100644 index 0000000000000..1203d93cb5f33 --- /dev/null +++ b/test/test.js @@ -0,0 +1,23 @@ +import fs from "fs"; +import path from "path"; +import { fileURLToPath } from "url"; + +import { fileTests as runTestFile } from "@lezer/generator/dist/test"; +import { n8nLanguage } from "../dist/index.js"; + +const CASES_DIR = path.dirname(fileURLToPath(import.meta.url)); + +for (const testFile of fs.readdirSync(CASES_DIR)) { + if (!/\.txt$/.test(testFile)) continue; + + const name = /^[^\.]*/.exec(testFile)[0]; + + describe(name, () => { + for (const { name, run } of runTestFile( + fs.readFileSync(path.join(CASES_DIR, testFile), "utf8"), + testFile + )) { + it(name, () => run(n8nLanguage.parser)); + } + }); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000000..d876152199c09 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "strict": true, + "target": "es6", + "module": "es2020", + "newLine": "lf", + "declaration": true, + "moduleResolution": "node" + }, + "include": ["src/*.ts"] +} From 6a54a29f48b75774318f45aeb6b8f57d74f63970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 12 Dec 2022 13:26:23 +0100 Subject: [PATCH 02/14] Update setup code --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7246115f6ea62..cc1dc46f49d48 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,10 @@ npm i @codemirror/language @lezer/common @lezer/javascript Set up language support: ```js -import { LRLanguage, LanguageSupport } from '@codemirror/language'; +import { parserWithMetaData as n8nParser } from 'codemirror-lang-n8n-expression'; +import { LanguageSupport, LRLanguage } from '@codemirror/language'; import { parseMixed } from '@lezer/common'; import { parser as jsParser } from '@lezer/javascript'; -import { parserWithMetaData as n8nParser } from './n8nLanguagePack'; const n8nPlusJsParser = n8nParser.configure({ wrap: parseMixed((node) => { From 2b2278c7507291e1e4307e758f6db5376f43a68a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Mon, 30 Jan 2023 12:00:41 +0100 Subject: [PATCH 03/14] Expand char range --- package.json | 2 +- src/syntax.grammar | 4 +++- test/cases.txt | 8 ++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7603842236d29..0cb0018257ab3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codemirror-lang-n8n-expression", - "version": "0.1.0", + "version": "0.2.0", "description": "n8n expression language support for CodeMirror 6", "scripts": { "test": "npm run prepare && mocha test/test.js", diff --git a/src/syntax.grammar b/src/syntax.grammar index b6b307e852b58..10ef380de7763 100644 --- a/src/syntax.grammar +++ b/src/syntax.grammar @@ -15,7 +15,9 @@ entity { Plaintext | Resolvable | BrokenResolvable } OpenMarker resolvableChar* CloseMarker } - resolvableChar { @asciiLetter | @digit | @whitespace | $[()\[\]{<>~`!@#$%^&*\-\_+=|\\;:'",./?] | "}" ![}] | "\\}}" } + resolvableChar { unicodeChar | "}" ![}] | "\\}}" } + + unicodeChar { $[\u0000-\u007C] | $[\u007E-\u06FF] } @precedence { BrokenResolvable, Resolvable } } diff --git a/test/cases.txt b/test/cases.txt index 98f18e99f9d80..2589fb61773c9 100644 --- a/test/cases.txt +++ b/test/cases.txt @@ -245,3 +245,11 @@ Program(BrokenResolvable) ==> Program(BrokenResolvable) + +# Plaintext then Resolvable with non-ASCII chars then Plaintext + +a {{ 'áßи' }} a + +==> + +Program(Plaintext, Resolvable, Plaintext) \ No newline at end of file From 79cf61c853da0665556cbb71764356a044d1ebe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 12:43:04 +0200 Subject: [PATCH 04/14] move into packages/@n8n/codemirror-lang --- .gitignore => packages/@n8n/codemirror-lang/.gitignore | 0 .npmignore => packages/@n8n/codemirror-lang/.npmignore | 0 {.vscode => packages/@n8n/codemirror-lang/.vscode}/settings.json | 0 LICENSE => packages/@n8n/codemirror-lang/LICENSE | 0 README.md => packages/@n8n/codemirror-lang/README.md | 0 package.json => packages/@n8n/codemirror-lang/package.json | 0 .../@n8n/codemirror-lang/rollup.config.js | 0 {src => packages/@n8n/codemirror-lang/src}/index.ts | 0 {src => packages/@n8n/codemirror-lang/src}/syntax.grammar | 0 {test => packages/@n8n/codemirror-lang/test}/cases.txt | 0 {test => packages/@n8n/codemirror-lang/test}/cases.txt.orig | 0 {test => packages/@n8n/codemirror-lang/test}/test.js | 0 tsconfig.json => packages/@n8n/codemirror-lang/tsconfig.json | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename .gitignore => packages/@n8n/codemirror-lang/.gitignore (100%) rename .npmignore => packages/@n8n/codemirror-lang/.npmignore (100%) rename {.vscode => packages/@n8n/codemirror-lang/.vscode}/settings.json (100%) rename LICENSE => packages/@n8n/codemirror-lang/LICENSE (100%) rename README.md => packages/@n8n/codemirror-lang/README.md (100%) rename package.json => packages/@n8n/codemirror-lang/package.json (100%) rename rollup.config.js => packages/@n8n/codemirror-lang/rollup.config.js (100%) rename {src => packages/@n8n/codemirror-lang/src}/index.ts (100%) rename {src => packages/@n8n/codemirror-lang/src}/syntax.grammar (100%) rename {test => packages/@n8n/codemirror-lang/test}/cases.txt (100%) rename {test => packages/@n8n/codemirror-lang/test}/cases.txt.orig (100%) rename {test => packages/@n8n/codemirror-lang/test}/test.js (100%) rename tsconfig.json => packages/@n8n/codemirror-lang/tsconfig.json (100%) diff --git a/.gitignore b/packages/@n8n/codemirror-lang/.gitignore similarity index 100% rename from .gitignore rename to packages/@n8n/codemirror-lang/.gitignore diff --git a/.npmignore b/packages/@n8n/codemirror-lang/.npmignore similarity index 100% rename from .npmignore rename to packages/@n8n/codemirror-lang/.npmignore diff --git a/.vscode/settings.json b/packages/@n8n/codemirror-lang/.vscode/settings.json similarity index 100% rename from .vscode/settings.json rename to packages/@n8n/codemirror-lang/.vscode/settings.json diff --git a/LICENSE b/packages/@n8n/codemirror-lang/LICENSE similarity index 100% rename from LICENSE rename to packages/@n8n/codemirror-lang/LICENSE diff --git a/README.md b/packages/@n8n/codemirror-lang/README.md similarity index 100% rename from README.md rename to packages/@n8n/codemirror-lang/README.md diff --git a/package.json b/packages/@n8n/codemirror-lang/package.json similarity index 100% rename from package.json rename to packages/@n8n/codemirror-lang/package.json diff --git a/rollup.config.js b/packages/@n8n/codemirror-lang/rollup.config.js similarity index 100% rename from rollup.config.js rename to packages/@n8n/codemirror-lang/rollup.config.js diff --git a/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts similarity index 100% rename from src/index.ts rename to packages/@n8n/codemirror-lang/src/index.ts diff --git a/src/syntax.grammar b/packages/@n8n/codemirror-lang/src/syntax.grammar similarity index 100% rename from src/syntax.grammar rename to packages/@n8n/codemirror-lang/src/syntax.grammar diff --git a/test/cases.txt b/packages/@n8n/codemirror-lang/test/cases.txt similarity index 100% rename from test/cases.txt rename to packages/@n8n/codemirror-lang/test/cases.txt diff --git a/test/cases.txt.orig b/packages/@n8n/codemirror-lang/test/cases.txt.orig similarity index 100% rename from test/cases.txt.orig rename to packages/@n8n/codemirror-lang/test/cases.txt.orig diff --git a/test/test.js b/packages/@n8n/codemirror-lang/test/test.js similarity index 100% rename from test/test.js rename to packages/@n8n/codemirror-lang/test/test.js diff --git a/tsconfig.json b/packages/@n8n/codemirror-lang/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/@n8n/codemirror-lang/tsconfig.json From 9cf74b32b2b1793b20551a7d9149557ae7222dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 12:53:13 +0200 Subject: [PATCH 05/14] rename package --- packages/@n8n/codemirror-lang/.eslintignore | 2 + packages/@n8n/codemirror-lang/.eslintrc.cjs | 10 + packages/@n8n/codemirror-lang/.npmignore | 2 - .../codemirror-lang/.vscode/settings.json | 16 - packages/@n8n/codemirror-lang/LICENSE | 21 - packages/@n8n/codemirror-lang/README.md | 14 +- packages/@n8n/codemirror-lang/package.json | 12 +- .../@n8n/codemirror-lang/rollup.config.js | 18 +- packages/@n8n/codemirror-lang/src/index.ts | 54 +-- packages/editor-ui/package.json | 2 +- .../src/plugins/codemirror/n8nLang.ts | 2 +- pnpm-lock.yaml | 432 +++++++++++++++--- 12 files changed, 427 insertions(+), 158 deletions(-) create mode 100644 packages/@n8n/codemirror-lang/.eslintignore create mode 100644 packages/@n8n/codemirror-lang/.eslintrc.cjs delete mode 100644 packages/@n8n/codemirror-lang/.vscode/settings.json delete mode 100644 packages/@n8n/codemirror-lang/LICENSE diff --git a/packages/@n8n/codemirror-lang/.eslintignore b/packages/@n8n/codemirror-lang/.eslintignore new file mode 100644 index 0000000000000..40a7b4122be25 --- /dev/null +++ b/packages/@n8n/codemirror-lang/.eslintignore @@ -0,0 +1,2 @@ +.eslintrc.cjs +vitest.config.ts diff --git a/packages/@n8n/codemirror-lang/.eslintrc.cjs b/packages/@n8n/codemirror-lang/.eslintrc.cjs new file mode 100644 index 0000000000000..a1ad467ea3b92 --- /dev/null +++ b/packages/@n8n/codemirror-lang/.eslintrc.cjs @@ -0,0 +1,10 @@ +const sharedOptions = require('@n8n_io/eslint-config/shared'); + +/** + * @type {import('@types/eslint').ESLint.ConfigData} + */ +module.exports = { + extends: ['@n8n_io/eslint-config/frontend'], + + ...sharedOptions(__dirname, 'frontend'), +}; diff --git a/packages/@n8n/codemirror-lang/.npmignore b/packages/@n8n/codemirror-lang/.npmignore index b7c7b999abade..448cd92c95834 100644 --- a/packages/@n8n/codemirror-lang/.npmignore +++ b/packages/@n8n/codemirror-lang/.npmignore @@ -1,7 +1,5 @@ -.vscode node_modules src test rollup.config.js tsconfig.json - diff --git a/packages/@n8n/codemirror-lang/.vscode/settings.json b/packages/@n8n/codemirror-lang/.vscode/settings.json deleted file mode 100644 index 4ba9fce3986cc..0000000000000 --- a/packages/@n8n/codemirror-lang/.vscode/settings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "workbench.colorCustomizations": { - "commandCenter.border": "#15202b99", - "sash.hoverBorder": "#fbed80", - "statusBar.background": "#f9e64f", - "statusBar.foreground": "#15202b", - "statusBarItem.hoverBackground": "#f7df1e", - "statusBarItem.remoteBackground": "#f9e64f", - "statusBarItem.remoteForeground": "#15202b", - "titleBar.activeBackground": "#f9e64f", - "titleBar.activeForeground": "#15202b", - "titleBar.inactiveBackground": "#f9e64f99", - "titleBar.inactiveForeground": "#15202b99" - }, - "peacock.color": "#f9e64f" -} \ No newline at end of file diff --git a/packages/@n8n/codemirror-lang/LICENSE b/packages/@n8n/codemirror-lang/LICENSE deleted file mode 100644 index 57650a9daf619..0000000000000 --- a/packages/@n8n/codemirror-lang/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (C) 2021 by Marijn Haverbeke and others - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/packages/@n8n/codemirror-lang/README.md b/packages/@n8n/codemirror-lang/README.md index cc1dc46f49d48..963c937dab28d 100644 --- a/packages/@n8n/codemirror-lang/README.md +++ b/packages/@n8n/codemirror-lang/README.md @@ -1,4 +1,4 @@ -# codemirror-lang-n8n-expression +# @n8n/codemirror-lang n8n expression language support for CodeMirror 6. @@ -7,7 +7,7 @@ n8n expression language support for CodeMirror 6. Install n8n expression language support: ```sh -npm i codemirror-lang-n8n-expression +npm i @n8n/codemirror-lang ``` Install setup dependencies: @@ -19,7 +19,7 @@ npm i @codemirror/language @lezer/common @lezer/javascript Set up language support: ```js -import { parserWithMetaData as n8nParser } from 'codemirror-lang-n8n-expression'; +import { parserWithMetaData as n8nParser } from '@n8n/codemirror-lang'; import { LanguageSupport, LRLanguage } from '@codemirror/language'; import { parseMixed } from '@lezer/common'; import { parser as jsParser } from '@lezer/javascript'; @@ -40,11 +40,3 @@ export function n8nExpressionLanguageSupport() { return new LanguageSupport(n8nLanguage); } ``` - -## Author - -© 2022 [Iván Ovejero](https://github.com/ivov) - -## License - -Distributed under the [MIT License](LICENSE.md). diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index 0cb0018257ab3..73703b777e342 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -1,10 +1,13 @@ { - "name": "codemirror-lang-n8n-expression", + "name": "@n8n/codemirror-lang", "version": "0.2.0", "description": "n8n expression language support for CodeMirror 6", "scripts": { - "test": "npm run prepare && mocha test/test.js", - "prepare": "rollup -c" + "build": "rollup -c", + "test": "npm run build && mocha test/test.js", + "lint": "eslint . --ext .js,.ts,.vue --quiet", + "lintfix": "eslint . --ext .js,.ts,.vue --fix", + "format": "prettier --write src/" }, "type": "module", "main": "dist/index.cjs", @@ -28,6 +31,5 @@ "rollup-plugin-dts": "^4.0.1", "rollup-plugin-ts": "^3.0.2", "typescript": "^4.3.4" - }, - "license": "MIT" + } } diff --git a/packages/@n8n/codemirror-lang/rollup.config.js b/packages/@n8n/codemirror-lang/rollup.config.js index 0c50c8cdfa35a..4fbb0ead3f668 100644 --- a/packages/@n8n/codemirror-lang/rollup.config.js +++ b/packages/@n8n/codemirror-lang/rollup.config.js @@ -1,12 +1,12 @@ -import typescript from "rollup-plugin-ts"; -import { lezer } from "@lezer/generator/rollup"; +import typescript from 'rollup-plugin-ts'; +import { lezer } from '@lezer/generator/rollup'; export default { - input: "src/index.ts", - external: (id) => id != "tslib" && !/^(\.?\/|\w:)/.test(id), - output: [ - { file: "dist/index.cjs", format: "cjs" }, - { dir: "./dist", format: "es" }, - ], - plugins: [lezer(), typescript()], + input: 'src/index.ts', + external: (id) => id != 'tslib' && !/^(\.?\/|\w:)/.test(id), + output: [ + { file: 'dist/index.cjs', format: 'cjs' }, + { dir: './dist', format: 'es' }, + ], + plugins: [lezer(), typescript()], }; diff --git a/packages/@n8n/codemirror-lang/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts index 04118d08a412c..0cf06ae1d8512 100644 --- a/packages/@n8n/codemirror-lang/src/index.ts +++ b/packages/@n8n/codemirror-lang/src/index.ts @@ -1,41 +1,37 @@ -import { completeFromList } from "@codemirror/autocomplete"; -import { parser } from "./syntax.grammar"; -import { - LRLanguage, - LanguageSupport, - foldNodeProp, - foldInside, -} from "@codemirror/language"; -import { styleTags, tags as t } from "@lezer/highlight"; +import { completeFromList } from '@codemirror/autocomplete'; +import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; +import { styleTags, tags as t } from '@lezer/highlight'; +//@ts-expect-error tsc does not know how to handle this +import { parser } from './syntax.grammar'; export const parserWithMetaData = parser.configure({ - props: [ - foldNodeProp.add({ - Application: foldInside, - }), - styleTags({ - OpenMarker: t.brace, - CloseMarker: t.brace, - Plaintext: t.content, - Resolvable: t.string, - BrokenResolvable: t.className, - }), - ], + props: [ + foldNodeProp.add({ + Application: foldInside, + }), + styleTags({ + OpenMarker: t.brace, + CloseMarker: t.brace, + Plaintext: t.content, + Resolvable: t.string, + BrokenResolvable: t.className, + }), + ], }); export const n8nLanguage = LRLanguage.define({ - parser: parserWithMetaData, - languageData: { - commentTokens: { line: ";" }, - }, + parser: parserWithMetaData, + languageData: { + commentTokens: { line: ';' }, + }, }); const completions = n8nLanguage.data.of({ - autocomplete: completeFromList([ - // { label: "test", type: "keyword" }, // to add in future - ]), + autocomplete: completeFromList([ + // { label: "test", type: "keyword" }, // to add in future + ]), }); export function n8nExpression() { - return new LanguageSupport(n8nLanguage, [completions]); + return new LanguageSupport(n8nLanguage, [completions]); } diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 6aaf9ef007471..e66decdbd94c6 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -50,7 +50,7 @@ "axios": "1.6.7", "chart.js": "^4.4.0", "codemirror-lang-html-n8n": "^1.0.0", - "codemirror-lang-n8n-expression": "^0.2.0", + "@n8n/codemirror-lang": "workspace:*", "dateformat": "^3.0.3", "email-providers": "^2.0.1", "esprima-next": "5.8.4", diff --git a/packages/editor-ui/src/plugins/codemirror/n8nLang.ts b/packages/editor-ui/src/plugins/codemirror/n8nLang.ts index 8bce81bb703de..f9088f2411377 100644 --- a/packages/editor-ui/src/plugins/codemirror/n8nLang.ts +++ b/packages/editor-ui/src/plugins/codemirror/n8nLang.ts @@ -1,4 +1,4 @@ -import { parserWithMetaData as n8nParser } from 'codemirror-lang-n8n-expression'; +import { parserWithMetaData as n8nParser } from '@n8n/codemirror-lang'; import { LanguageSupport, LRLanguage } from '@codemirror/language'; import { parseMixed } from '@lezer/common'; import { javascriptLanguage } from '@codemirror/lang-javascript'; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7abbcb9eee3d..bf5ef3d3f3c6e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -178,6 +178,40 @@ importers: specifier: 1.6.7 version: 1.6.7(debug@3.2.7) + packages/@n8n/codemirror-lang: + dependencies: + '@codemirror/autocomplete': + specifier: ^6.3.0 + version: 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/language': + specifier: ^6.0.0 + version: 6.9.3 + '@lezer/highlight': + specifier: ^1.0.0 + version: 1.1.1 + '@lezer/lr': + specifier: ^1.0.0 + version: 1.2.3 + devDependencies: + '@lezer/generator': + specifier: ^1.0.0 + version: 1.7.0 + mocha: + specifier: ^9.0.1 + version: 9.2.2 + rollup: + specifier: ^2.60.2 + version: 2.79.1 + rollup-plugin-dts: + specifier: ^4.0.1 + version: 4.2.3(rollup@2.79.1)(typescript@5.4.2) + rollup-plugin-ts: + specifier: ^3.0.2 + version: 3.4.5(@babel/core@7.24.0)(rollup@2.79.1)(typescript@5.4.2) + typescript: + specifier: ^5.4.2 + version: 5.4.2 + packages/@n8n/nodes-langchain: dependencies: '@aws-sdk/client-bedrock-runtime': @@ -1047,6 +1081,9 @@ importers: '@n8n/chat': specifier: workspace:* version: link:../@n8n/chat + '@n8n/codemirror-lang': + specifier: workspace:* + version: link:../@n8n/codemirror-lang '@n8n/codemirror-lang-sql': specifier: ^1.0.2 version: 1.0.2(@codemirror/view@6.22.3)(@lezer/common@1.1.0) @@ -1068,9 +1105,6 @@ importers: codemirror-lang-html-n8n: specifier: ^1.0.0 version: 1.0.0 - codemirror-lang-n8n-expression: - specifier: ^0.2.0 - version: 0.2.0(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) dateformat: specifier: ^3.0.3 version: 3.0.3 @@ -2905,13 +2939,6 @@ packages: - encoding dev: false - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.5 - dev: true - /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -3337,15 +3364,6 @@ packages: - supports-color dev: true - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.20 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} @@ -4484,7 +4502,7 @@ packages: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.23.5 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 dev: true @@ -4644,7 +4662,7 @@ packages: '@lezer/common': 1.1.0 '@lezer/highlight': 1.1.1 '@lezer/lr': 1.2.3 - style-mod: 4.0.0 + style-mod: 4.1.0 dev: false /@codemirror/lint@6.4.2: @@ -5271,7 +5289,7 @@ packages: dependencies: string-width: 5.1.2 string-width-cjs: /string-width@4.2.3 - strip-ansi: 7.0.1 + strip-ansi: 7.1.0 strip-ansi-cjs: /strip-ansi@6.0.1 wrap-ansi: 8.1.0 wrap-ansi-cjs: /wrap-ansi@7.0.0 @@ -6281,7 +6299,6 @@ packages: /@lezer/common@1.1.0: resolution: {integrity: sha512-XPIN3cYDXsoJI/oDWoR2tD++juVrhgIago9xyKhZ7IhGlzdDM9QgC8D8saKNCz5pindGcznFr2HBSsEQSWnSjw==} - dev: false /@lezer/css@1.1.1: resolution: {integrity: sha512-mSjx+unLLapEqdOYDejnGBokB5+AiJKZVclmud0MKQOKx3DLJ5b5VTCstgDDknR6iIV4gVrN6euzsCnj0A2gQA==} @@ -6290,6 +6307,14 @@ packages: '@lezer/lr': 1.2.3 dev: false + /@lezer/generator@1.7.0: + resolution: {integrity: sha512-IJ16tx3biLKlCXUzcK4v8S10AVa2BSM2rB12rtAL6f1hL2TS/HQQlGCoWRvanlL2J4mCYEEIv9uG7n4kVMkVDA==} + hasBin: true + dependencies: + '@lezer/common': 1.1.0 + '@lezer/lr': 1.4.0 + dev: true + /@lezer/highlight@1.1.1: resolution: {integrity: sha512-duv9D23O9ghEDnnUDmxu+L8pJy4nYo4AbCOHIudUhscrLSazqeJeK1V50EU6ZufWF1zv0KJwu/frFRyZWXxHBQ==} dependencies: @@ -6324,6 +6349,12 @@ packages: '@lezer/common': 1.1.0 dev: false + /@lezer/lr@1.4.0: + resolution: {integrity: sha512-Wst46p51km8gH0ZUmeNrtpRYmdlRHUpN1DQd3GFAyKANi8WVz8c2jHYTf1CVScFaCjQw1iO3ZZdqGDxQPRErTg==} + dependencies: + '@lezer/common': 1.1.0 + dev: true + /@lezer/python@1.1.5: resolution: {integrity: sha512-h0DVr6IfrmKUbTc5PeetaC87IZYoHyn5JogsVYW5mRDpVRyEsvaLBMLyEN4Ufc2BKp1c9y2Pkr8ZNLxS8dTLsQ==} dependencies: @@ -6331,6 +6362,10 @@ packages: '@lezer/lr': 1.2.3 dev: false + /@mdn/browser-compat-data@5.5.19: + resolution: {integrity: sha512-ntKBZtwWCy4XvJosdTJKqIMdmzgbxjopfoiMxgpzsml3dXqA7MIHCE/amidfQc06a6KvmMrpiVuYHIBt2feDog==} + dev: true + /@mdx-js/react@3.0.1(@types/react@18.0.27)(react@18.2.0): resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} peerDependencies: @@ -7189,6 +7224,21 @@ packages: rollup: 3.29.4 dev: true + /@rollup/pluginutils@5.1.0(rollup@2.79.1): + resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + dependencies: + '@types/estree': 1.0.0 + estree-walker: 2.0.2 + picomatch: 2.3.1 + rollup: 2.79.1 + dev: true + /@rollup/pluginutils@5.1.0(rollup@3.29.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -8985,7 +9035,7 @@ packages: ts-dedent: 2.2.0 type-fest: 2.19.0 vue: 3.4.21(typescript@5.4.2) - vue-component-type-helpers: 2.0.7 + vue-component-type-helpers: 2.0.11 transitivePeerDependencies: - encoding - supports-color @@ -9073,7 +9123,7 @@ packages: resolution: {integrity: sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==} engines: {node: '>=14'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.23.5 '@babel/runtime': 7.23.6 '@types/aria-query': 5.0.1 aria-query: 5.1.3 @@ -9681,6 +9731,10 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/object-path@0.11.4: + resolution: {integrity: sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==} + dev: true + /@types/phoenix@1.6.4: resolution: {integrity: sha512-B34A7uot1Cv0XtaHRYDATltAdKx0BvVKNgYNqE4WjtPUa4VQJM7kxeXcVKaH+KS+kCmZ+6w+QaUdcljiheiBJA==} dev: false @@ -9903,6 +9957,10 @@ packages: '@types/node': 18.16.16 dev: false + /@types/ua-parser-js@0.7.39: + resolution: {integrity: sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==} + dev: true + /@types/unist@2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true @@ -10186,6 +10244,10 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@ungap/promise-all-settled@1.1.2: + resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -10744,6 +10806,11 @@ packages: '@xtuc/long': 4.2.2 dev: true + /@wessberg/stringutil@1.0.19: + resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} + engines: {node: '>=8.0.0'} + dev: true + /@xata.io/client@0.28.0(typescript@5.4.2): resolution: {integrity: sha512-V6rpx+9C6uYdGUDUvk5xIot19zRvDEQhkHXWGIkKY/SCKu4w68S81Z88tgGLRaknSFjpAm7H/rvGBR2DrDpqtQ==} peerDependencies: @@ -10970,6 +11037,11 @@ packages: ansi-wrap: 0.1.0 dev: true + /ansi-colors@4.1.1: + resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} + engines: {node: '>=6'} + dev: true + /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -11857,12 +11929,32 @@ packages: engines: {'0': node} dev: false + /browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + dev: true + /browserify-zlib@0.1.4: resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} dependencies: pako: 0.2.9 dev: true + /browserslist-generator@2.1.0: + resolution: {integrity: sha512-ZFz4mAOgqm0cbwKaZsfJbYDbTXGoPANlte7qRsRJOfjB9KmmISQrXJxAVrnXG8C8v/QHNzXyeJt0Cfcks6zZvQ==} + engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} + dependencies: + '@mdn/browser-compat-data': 5.5.19 + '@types/object-path': 0.11.4 + '@types/semver': 7.5.0 + '@types/ua-parser-js': 0.7.39 + browserslist: 4.23.0 + caniuse-lite: 1.0.30001597 + isbot: 3.6.13 + object-path: 0.11.8 + semver: 7.5.4 + ua-parser-js: 1.0.37 + dev: true + /browserslist@4.21.9: resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -12115,7 +12207,7 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.23.0 - caniuse-lite: 1.0.30001517 + caniuse-lite: 1.0.30001597 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true @@ -12510,19 +12602,6 @@ packages: '@lezer/lr': 1.2.3 dev: false - /codemirror-lang-n8n-expression@0.2.0(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0): - resolution: {integrity: sha512-kdlpzevdCpWcpbNcwES9YZy+rDFwWOdO6Z78SWxT6jMhCPmdHQmO+gJ39aXAXlUI7OGLfOBtg1/ONxPjRpEIYQ==} - dependencies: - '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/language': 6.9.3 - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 - transitivePeerDependencies: - - '@codemirror/state' - - '@codemirror/view' - - '@lezer/common' - dev: false - /cohere-ai@6.2.2: resolution: {integrity: sha512-+Tq+4e8N/YWKJqFpWaULsfbZR/GOvGh8WWYFKR1bpipu8bCok3VcbTPnBmIToQiIqOgFpGk3HsA4b0guVyL3vg==} dev: false @@ -12687,6 +12766,16 @@ packages: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true + /compatfactory@3.0.0(typescript@5.4.2): + resolution: {integrity: sha512-WD5kF7koPwVoyKL8p0LlrmIZtilrD46sQStyzzxzTFinMKN2Dxk1hN+sddLSQU1mGIZvQfU8c+ONSghvvM40jg==} + engines: {node: '>=14.9.0'} + peerDependencies: + typescript: ^5.4.2 + dependencies: + helpertypes: 0.0.19 + typescript: 5.4.2 + dev: true + /component-emitter@1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} dev: true @@ -12804,11 +12893,6 @@ packages: dependencies: safe-buffer: 5.2.1 - /content-type@1.0.4: - resolution: {integrity: sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==} - engines: {node: '>= 0.6'} - dev: false - /content-type@1.0.5: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} @@ -12956,6 +13040,13 @@ packages: shebang-command: 2.0.0 which: 2.0.2 + /crosspath@2.0.0: + resolution: {integrity: sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==} + engines: {node: '>=14.9.0'} + dependencies: + '@types/node': 18.16.16 + dev: true + /crypt@0.0.2: resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false @@ -13342,6 +13433,19 @@ packages: supports-color: 8.1.1 dev: true + /debug@4.3.3(supports-color@8.1.1): + resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + supports-color: 8.1.1 + dev: true + /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -13358,6 +13462,11 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} + /decamelize@4.0.0: + resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} + engines: {node: '>=10'} + dev: true + /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} dev: true @@ -13609,6 +13718,11 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true + /diff@5.0.0: + resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} + engines: {node: '>=0.3.1'} + dev: true + /digest-fetch@1.3.0: resolution: {integrity: sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==} dependencies: @@ -15267,7 +15381,6 @@ packages: /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true - dev: false /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} @@ -15751,6 +15864,17 @@ packages: path-scurry: 1.10.1 dev: true + /glob@7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -15936,6 +16060,11 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true + /growl@1.10.5: + resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} + engines: {node: '>=4.x'} + dev: true + /gtoken@6.1.2: resolution: {integrity: sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==} engines: {node: '>=12.0.0'} @@ -16157,6 +16286,11 @@ packages: readable-stream: 3.6.0 dev: false + /helpertypes@0.0.19: + resolution: {integrity: sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==} + engines: {node: '>=10.0.0'} + dev: true + /hexoid@1.0.0: resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==} engines: {node: '>=8'} @@ -16843,6 +16977,11 @@ packages: engines: {node: '>=8'} dev: true + /is-plain-obj@2.1.0: + resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} + engines: {node: '>=8'} + dev: true + /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} @@ -17012,7 +17151,6 @@ packages: /isbot@3.6.13: resolution: {integrity: sha512-uoP4uK5Dc2CrabmK+Gue1jTL+scHiCc1c9rblRpJwG8CPxjLIv8jmGyyGRGkbPOweayhkskdZsEQXG6p+QCQrg==} engines: {node: '>=12'} - dev: false /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -17372,7 +17510,7 @@ packages: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.23.5 '@jest/types': 29.6.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -17387,7 +17525,7 @@ packages: resolution: {integrity: sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.23.5 '@jest/types': 29.6.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -19086,6 +19224,13 @@ packages: hasBin: true dev: true + /magic-string@0.26.7: + resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} + engines: {node: '>=12'} + dependencies: + sourcemap-codec: 1.4.8 + dev: true + /magic-string@0.27.0: resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} engines: {node: '>=12'} @@ -19463,6 +19608,13 @@ packages: dependencies: brace-expansion: 1.1.11 + /minimatch@4.2.1: + resolution: {integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 1.1.11 + dev: true + /minimatch@5.1.5: resolution: {integrity: sha512-CI8wwdrll4ehjPAqs8TL8lBPyNnpZlQI02Wn8C1weNz/QbUbjh3OMxgMKSnvqfKFdLlks3EzHB9tO0BqGc3phQ==} engines: {node: '>=10'} @@ -19704,6 +19856,37 @@ packages: resolution: {integrity: sha512-Mn6CN6meXEnMa0a5u6a5+RKrqRedHBhZGd15AWLk9O6uFY4KYHzImdt8JI8WODo1bjTSRnwXhJox+FCUZhCKCQ==} dev: true + /mocha@9.2.2: + resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==} + engines: {node: '>= 12.0.0'} + hasBin: true + dependencies: + '@ungap/promise-all-settled': 1.1.2 + ansi-colors: 4.1.1 + browser-stdout: 1.3.1 + chokidar: 3.5.2 + debug: 4.3.3(supports-color@8.1.1) + diff: 5.0.0 + escape-string-regexp: 4.0.0 + find-up: 5.0.0 + glob: 7.2.0 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 4.1.0 + log-symbols: 4.1.0 + minimatch: 4.2.1 + ms: 2.1.3 + nanoid: 3.3.1 + serialize-javascript: 6.0.0 + strip-json-comments: 3.1.1 + supports-color: 8.1.1 + which: 2.0.2 + workerpool: 6.2.0 + yargs: 16.2.0 + yargs-parser: 20.2.4 + yargs-unparser: 2.0.0 + dev: true + /moment-timezone@0.5.37: resolution: {integrity: sha512-uEDzDNFhfaywRl+vwXxffjjq1q0Vzr+fcQpQ1bU0kbzorfS7zVtZnCnGc8mhWmF39d4g4YriF6kwA75mJKE/Zg==} dependencies: @@ -19902,6 +20085,12 @@ packages: resolution: {integrity: sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==} dev: false + /nanoid@3.3.1: + resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -20384,6 +20573,11 @@ packages: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + /object-path@0.11.8: + resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} + engines: {node: '>= 10.12.0'} + dev: true + /object-treeify@1.1.33: resolution: {integrity: sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==} engines: {node: '>= 10'} @@ -22750,6 +22944,20 @@ packages: resolution: {integrity: sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==} dev: false + /rollup-plugin-dts@4.2.3(rollup@2.79.1)(typescript@5.4.2): + resolution: {integrity: sha512-jlcpItqM2efqfIiKzDB/IKOS9E9fDvbkJSGw5GtK/PqPGS9eC3R3JKyw2VvpTktZA+TNgJRMu1NTv244aTUzzQ==} + engines: {node: '>=v12.22.12'} + peerDependencies: + rollup: ^2.55 + typescript: ^5.4.2 + dependencies: + magic-string: 0.26.7 + rollup: 2.79.1 + typescript: 5.4.2 + optionalDependencies: + '@babel/code-frame': 7.23.5 + dev: true + /rollup-plugin-dts@6.1.0(rollup@3.29.4)(typescript@5.4.2): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} @@ -22764,6 +22972,58 @@ packages: '@babel/code-frame': 7.23.5 dev: true + /rollup-plugin-ts@3.4.5(@babel/core@7.24.0)(rollup@2.79.1)(typescript@5.4.2): + resolution: {integrity: sha512-9iCstRJpEZXSRQuXitlSZAzcGlrqTbJg1pE4CMbEi6xYldxVncdPyzA2I+j6vnh73wBymZckerS+Q/iEE/M3Ow==} + engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} + peerDependencies: + '@babel/core': '>=7.x' + '@babel/plugin-transform-runtime': '>=7.x' + '@babel/preset-env': '>=7.x' + '@babel/preset-typescript': '>=7.x' + '@babel/runtime': '>=7.x' + '@swc/core': '>=1.x' + '@swc/helpers': '>=0.2' + rollup: '>=1.x || >=2.x || >=3.x' + typescript: ^5.4.2 + peerDependenciesMeta: + '@babel/core': + optional: true + '@babel/plugin-transform-runtime': + optional: true + '@babel/preset-env': + optional: true + '@babel/preset-typescript': + optional: true + '@babel/runtime': + optional: true + '@swc/core': + optional: true + '@swc/helpers': + optional: true + dependencies: + '@babel/core': 7.24.0 + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) + '@wessberg/stringutil': 1.0.19 + ansi-colors: 4.1.3 + browserslist: 4.23.0 + browserslist-generator: 2.1.0 + compatfactory: 3.0.0(typescript@5.4.2) + crosspath: 2.0.0 + magic-string: 0.30.8 + rollup: 2.79.1 + ts-clone-node: 3.0.0(typescript@5.4.2) + tslib: 2.6.2 + typescript: 5.4.2 + dev: true + + /rollup@2.79.1: + resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} + engines: {node: '>=10.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.3 + dev: true + /rollup@3.29.4: resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -23060,6 +23320,12 @@ packages: resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} dev: false + /serialize-javascript@6.0.0: + resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} + dependencies: + randombytes: 2.1.0 + dev: true + /serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} dependencies: @@ -23465,6 +23731,11 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + /sourcemap-codec@1.4.8: + resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} + deprecated: Please use @jridgewell/sourcemap-codec instead + dev: true + /space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} dev: true @@ -23776,7 +24047,7 @@ packages: dependencies: eastasianwidth: 0.2.0 emoji-regex: 9.2.2 - strip-ansi: 7.0.1 + strip-ansi: 7.1.0 /string.prototype.startswith@1.0.0: resolution: {integrity: sha512-VHhsDkuf8gsw4JNRK9cIZjYe6r7PsVUutVohaBhqYAoPaRADoQH+mMgUg7Cs/TgQeDGEvI+PzPEMOdvdsCMvpg==} @@ -23859,18 +24130,11 @@ packages: dependencies: ansi-regex: 5.0.1 - /strip-ansi@7.0.1: - resolution: {integrity: sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - /strip-ansi@7.1.0: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} dependencies: ansi-regex: 6.0.1 - dev: true /strip-bom@2.0.0: resolution: {integrity: sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==} @@ -23937,10 +24201,6 @@ packages: resolution: {integrity: sha512-PdHt7hHUJKxvTCgbKX9C1V/ftOcjJQgz8BZwNfV5c4B6dcGqlpelTbJ999jBGZ2jYiPAwcX5dP6oBwVlBlUbxw==} dev: false - /style-mod@4.0.0: - resolution: {integrity: sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==} - dev: false - /style-mod@4.1.0: resolution: {integrity: sha512-Ca5ib8HrFn+f+0n4N4ScTIA9iTOQ7MaGS1ylHcoVqW9J7w2w8PzN6g9gKmTYgGEBH8e120+RCmhpje6jC5uGWA==} dev: false @@ -24503,6 +24763,16 @@ packages: typescript: 5.4.2 dev: true + /ts-clone-node@3.0.0(typescript@5.4.2): + resolution: {integrity: sha512-egavvyHbIoelkgh1IC2agNB1uMNjB8VJgh0g/cn0bg2XXTcrtjrGMzEk4OD3Fi2hocICjP3vMa56nkzIzq0FRg==} + engines: {node: '>=14.9.0'} + peerDependencies: + typescript: ^5.4.2 + dependencies: + compatfactory: 3.0.0(typescript@5.4.2) + typescript: 5.4.2 + dev: true + /ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -24864,6 +25134,10 @@ packages: engines: {node: '>=14.17'} hasBin: true + /ua-parser-js@1.0.37: + resolution: {integrity: sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==} + dev: true + /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: false @@ -25663,8 +25937,8 @@ packages: resolution: {integrity: sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==} dev: true - /vue-component-type-helpers@2.0.7: - resolution: {integrity: sha512-7e12Evdll7JcTIocojgnCgwocX4WzIYStGClBQ+QuWPinZo/vQolv2EMq4a3lg16TKfwWafLimG77bxb56UauA==} + /vue-component-type-helpers@2.0.11: + resolution: {integrity: sha512-8aluKz5oVC8PvVQAYgyIefOlqzKVmAOTCx2imbrFBVLbF7mnJvyMsE2A7rqX/4f4uT6ee9o8u3GcoRpUWc0xsw==} dev: true /vue-demi@0.14.5(vue@3.4.21): @@ -26157,6 +26431,10 @@ packages: /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + /workerpool@6.2.0: + resolution: {integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==} + dev: true + /wrap-ansi@2.1.0: resolution: {integrity: sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==} engines: {node: '>=0.10.0'} @@ -26188,7 +26466,7 @@ packages: dependencies: ansi-styles: 6.2.1 string-width: 5.1.2 - strip-ansi: 7.0.1 + strip-ansi: 7.1.0 /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -26363,6 +26641,11 @@ packages: glob: 7.2.3 dev: false + /yargs-parser@20.2.4: + resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} + engines: {node: '>=10'} + dev: true + /yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -26378,6 +26661,29 @@ packages: object.assign: 4.1.5 dev: true + /yargs-unparser@2.0.0: + resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} + engines: {node: '>=10'} + dependencies: + camelcase: 6.3.0 + decamelize: 4.0.0 + flat: 5.0.2 + is-plain-obj: 2.1.0 + dev: true + + /yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + dependencies: + cliui: 7.0.4 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + dev: true + /yargs@17.0.1: resolution: {integrity: sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==} engines: {node: '>=12'} From 2903072683fc3a88ed6d9fdddfd6de3297982501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 13:35:03 +0200 Subject: [PATCH 06/14] remove rollup --- packages/@n8n/codemirror-lang/.eslintignore | 1 + packages/@n8n/codemirror-lang/.gitignore | 3 +- packages/@n8n/codemirror-lang/.npmignore | 1 - packages/@n8n/codemirror-lang/package.json | 32 +- .../@n8n/codemirror-lang/rollup.config.js | 12 - packages/@n8n/codemirror-lang/src/index.ts | 1 - packages/@n8n/codemirror-lang/tsconfig.json | 19 +- packages/editor-ui/package.json | 18 +- pnpm-lock.yaml | 493 +++++------------- 9 files changed, 179 insertions(+), 401 deletions(-) delete mode 100644 packages/@n8n/codemirror-lang/rollup.config.js diff --git a/packages/@n8n/codemirror-lang/.eslintignore b/packages/@n8n/codemirror-lang/.eslintignore index 40a7b4122be25..118a19fe14dc1 100644 --- a/packages/@n8n/codemirror-lang/.eslintignore +++ b/packages/@n8n/codemirror-lang/.eslintignore @@ -1,2 +1,3 @@ .eslintrc.cjs vitest.config.ts +src/syntax.grammar*.ts diff --git a/packages/@n8n/codemirror-lang/.gitignore b/packages/@n8n/codemirror-lang/.gitignore index e2ddf9644d291..18550f4e30b25 100644 --- a/packages/@n8n/codemirror-lang/.gitignore +++ b/packages/@n8n/codemirror-lang/.gitignore @@ -3,4 +3,5 @@ package-lock.json /dist /src/*.js /src/*.d.ts -.DS_Store \ No newline at end of file +src/syntax.grammar*.ts +.DS_Store diff --git a/packages/@n8n/codemirror-lang/.npmignore b/packages/@n8n/codemirror-lang/.npmignore index 448cd92c95834..17afe552df0a9 100644 --- a/packages/@n8n/codemirror-lang/.npmignore +++ b/packages/@n8n/codemirror-lang/.npmignore @@ -1,5 +1,4 @@ node_modules src test -rollup.config.js tsconfig.json diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index 73703b777e342..142906f3597e4 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -2,13 +2,7 @@ "name": "@n8n/codemirror-lang", "version": "0.2.0", "description": "n8n expression language support for CodeMirror 6", - "scripts": { - "build": "rollup -c", - "test": "npm run build && mocha test/test.js", - "lint": "eslint . --ext .js,.ts,.vue --quiet", - "lintfix": "eslint . --ext .js,.ts,.vue --fix", - "format": "prettier --write src/" - }, + "private": "true", "type": "module", "main": "dist/index.cjs", "module": "dist/index.js", @@ -18,18 +12,22 @@ }, "types": "dist/index.d.ts", "sideEffects": false, + "scripts": { + "generate": "lezer-generator --typeScript --output src/syntax.grammar.ts src/syntax.grammar", + "build": "tsc", + "test": "npm run build && mocha test/test.js", + "lint": "eslint . --ext .js,.ts,.vue --quiet", + "lintfix": "eslint . --ext .js,.ts,.vue --fix", + "format": "prettier --write src/" + }, "dependencies": { - "@codemirror/autocomplete": "^6.3.0", - "@codemirror/language": "^6.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0" + "@codemirror/autocomplete": "^6.15.0", + "@codemirror/language": "^6.10.1", + "@lezer/highlight": "^1.2.0", + "@lezer/lr": "^1.4.0" }, "devDependencies": { - "@lezer/generator": "^1.0.0", - "mocha": "^9.0.1", - "rollup": "^2.60.2", - "rollup-plugin-dts": "^4.0.1", - "rollup-plugin-ts": "^3.0.2", - "typescript": "^4.3.4" + "@lezer/generator": "^1.7.0", + "mocha": "^10.4.0" } } diff --git a/packages/@n8n/codemirror-lang/rollup.config.js b/packages/@n8n/codemirror-lang/rollup.config.js deleted file mode 100644 index 4fbb0ead3f668..0000000000000 --- a/packages/@n8n/codemirror-lang/rollup.config.js +++ /dev/null @@ -1,12 +0,0 @@ -import typescript from 'rollup-plugin-ts'; -import { lezer } from '@lezer/generator/rollup'; - -export default { - input: 'src/index.ts', - external: (id) => id != 'tslib' && !/^(\.?\/|\w:)/.test(id), - output: [ - { file: 'dist/index.cjs', format: 'cjs' }, - { dir: './dist', format: 'es' }, - ], - plugins: [lezer(), typescript()], -}; diff --git a/packages/@n8n/codemirror-lang/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts index 0cf06ae1d8512..5bcf722a780a3 100644 --- a/packages/@n8n/codemirror-lang/src/index.ts +++ b/packages/@n8n/codemirror-lang/src/index.ts @@ -1,7 +1,6 @@ import { completeFromList } from '@codemirror/autocomplete'; import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; import { styleTags, tags as t } from '@lezer/highlight'; -//@ts-expect-error tsc does not know how to handle this import { parser } from './syntax.grammar'; export const parserWithMetaData = parser.configure({ diff --git a/packages/@n8n/codemirror-lang/tsconfig.json b/packages/@n8n/codemirror-lang/tsconfig.json index d876152199c09..c48166ebcb35e 100644 --- a/packages/@n8n/codemirror-lang/tsconfig.json +++ b/packages/@n8n/codemirror-lang/tsconfig.json @@ -1,11 +1,12 @@ { - "compilerOptions": { - "strict": true, - "target": "es6", - "module": "es2020", - "newLine": "lf", - "declaration": true, - "moduleResolution": "node" - }, - "include": ["src/*.ts"] + "extends": "../../../tsconfig.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "tsBuildInfoFile": "dist/build.tsbuildinfo", + "target": "esnext", + "module": "esnext", + "declaration": true + }, + "include": ["src/index.ts"] } diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index e66decdbd94c6..6bd2eccb1b916 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -26,22 +26,22 @@ "test:dev": "vitest" }, "dependencies": { - "@codemirror/autocomplete": "^6.11.1", - "@codemirror/commands": "^6.3.2", - "@codemirror/lang-javascript": "^6.2.1", + "@codemirror/autocomplete": "^6.15.0", + "@codemirror/commands": "^6.3.3", + "@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-json": "^6.0.1", - "@codemirror/lang-python": "^6.1.3", - "@codemirror/language": "^6.9.3", - "@codemirror/lint": "^6.4.2", - "@codemirror/state": "^6.3.3", - "@codemirror/view": "^6.22.3", + "@codemirror/lang-python": "^6.1.5", + "@codemirror/language": "^6.10.1", + "@codemirror/lint": "^6.5.0", + "@codemirror/state": "^6.4.1", + "@codemirror/view": "^6.26.1", "@fontsource/open-sans": "^4.5.0", "@jsplumb/browser-ui": "^5.13.2", "@jsplumb/common": "^5.13.2", "@jsplumb/connector-bezier": "^5.13.2", "@jsplumb/core": "^5.13.2", "@jsplumb/util": "^5.13.2", - "@lezer/common": "^1.0.4", + "@lezer/common": "^1.2.1", "@n8n/chat": "workspace:*", "@n8n/codemirror-lang-sql": "^1.0.2", "@n8n/permissions": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bf5ef3d3f3c6e..37daf665c73c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -181,36 +181,24 @@ importers: packages/@n8n/codemirror-lang: dependencies: '@codemirror/autocomplete': - specifier: ^6.3.0 - version: 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + specifier: ^6.15.0 + version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) '@codemirror/language': - specifier: ^6.0.0 - version: 6.9.3 + specifier: ^6.10.1 + version: 6.10.1 '@lezer/highlight': - specifier: ^1.0.0 - version: 1.1.1 + specifier: ^1.2.0 + version: 1.2.0 '@lezer/lr': - specifier: ^1.0.0 - version: 1.2.3 + specifier: ^1.4.0 + version: 1.4.0 devDependencies: '@lezer/generator': - specifier: ^1.0.0 + specifier: ^1.7.0 version: 1.7.0 mocha: - specifier: ^9.0.1 - version: 9.2.2 - rollup: - specifier: ^2.60.2 - version: 2.79.1 - rollup-plugin-dts: - specifier: ^4.0.1 - version: 4.2.3(rollup@2.79.1)(typescript@5.4.2) - rollup-plugin-ts: - specifier: ^3.0.2 - version: 3.4.5(@babel/core@7.24.0)(rollup@2.79.1)(typescript@5.4.2) - typescript: - specifier: ^5.4.2 - version: 5.4.2 + specifier: ^10.4.0 + version: 10.4.0 packages/@n8n/nodes-langchain: dependencies: @@ -1019,32 +1007,32 @@ importers: packages/editor-ui: dependencies: '@codemirror/autocomplete': - specifier: ^6.11.1 - version: 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + specifier: ^6.15.0 + version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) '@codemirror/commands': - specifier: ^6.3.2 - version: 6.3.2 + specifier: ^6.3.3 + version: 6.3.3 '@codemirror/lang-javascript': - specifier: ^6.2.1 - version: 6.2.1 + specifier: ^6.2.2 + version: 6.2.2 '@codemirror/lang-json': specifier: ^6.0.1 version: 6.0.1 '@codemirror/lang-python': - specifier: ^6.1.3 - version: 6.1.3(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + specifier: ^6.1.5 + version: 6.1.5(@codemirror/view@6.26.1) '@codemirror/language': - specifier: ^6.9.3 - version: 6.9.3 + specifier: ^6.10.1 + version: 6.10.1 '@codemirror/lint': - specifier: ^6.4.2 - version: 6.4.2 + specifier: ^6.5.0 + version: 6.5.0 '@codemirror/state': - specifier: ^6.3.3 - version: 6.3.3 + specifier: ^6.4.1 + version: 6.4.1 '@codemirror/view': - specifier: ^6.22.3 - version: 6.22.3 + specifier: ^6.26.1 + version: 6.26.1 '@fontsource/open-sans': specifier: ^4.5.0 version: 4.5.12 @@ -1076,8 +1064,8 @@ importers: specifier: ^5.13.2 version: 5.13.2 '@lezer/common': - specifier: ^1.0.4 - version: 1.1.0 + specifier: ^1.2.1 + version: 1.2.1 '@n8n/chat': specifier: workspace:* version: link:../@n8n/chat @@ -1086,7 +1074,7 @@ importers: version: link:../@n8n/codemirror-lang '@n8n/codemirror-lang-sql': specifier: ^1.0.2 - version: 1.0.2(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + version: 1.0.2(@codemirror/view@6.26.1)(@lezer/common@1.2.1) '@n8n/permissions': specifier: workspace:* version: link:../@n8n/permissions @@ -2939,6 +2927,13 @@ packages: - encoding dev: false + /@babel/code-frame@7.22.5: + resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.22.5 + dev: true + /@babel/code-frame@7.23.5: resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} @@ -3364,6 +3359,15 @@ packages: - supports-color dev: true + /@babel/highlight@7.22.5: + resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.22.20 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + /@babel/highlight@7.23.4: resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} @@ -4502,7 +4506,7 @@ packages: resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.22.5 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 dev: true @@ -4588,99 +4592,99 @@ packages: - react dev: true - /@codemirror/autocomplete@6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0): - resolution: {integrity: sha512-L5UInv8Ffd6BPw0P3EF7JLYAMeEbclY7+6Q11REt8vhih8RuLreKtPy/xk8wPxs4EQgYqzI7cdgpiYwWlbS/ow==} + /@codemirror/autocomplete@6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1): + resolution: {integrity: sha512-G2Zm0mXznxz97JhaaOdoEG2cVupn4JjPaS4AcNvZzhOsnnG9YVN68VzfoUw6dYTsIxT6a/cmoFEN47KAWhXaOg==} peerDependencies: '@codemirror/language': ^6.0.0 '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 '@lezer/common': ^1.0.0 dependencies: - '@codemirror/language': 6.9.3 - '@codemirror/state': 6.3.3 - '@codemirror/view': 6.22.3 - '@lezer/common': 1.1.0 + '@codemirror/language': 6.10.1 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.26.1 + '@lezer/common': 1.2.1 dev: false - /@codemirror/commands@6.3.2: - resolution: {integrity: sha512-tjoi4MCWDNxgIpoLZ7+tezdS9OEB6pkiDKhfKx9ReJ/XBcs2G2RXIu+/FxXBlWsPTsz6C9q/r4gjzrsxpcnqCQ==} + /@codemirror/commands@6.3.3: + resolution: {integrity: sha512-dO4hcF0fGT9tu1Pj1D2PvGvxjeGkbC6RGcZw6Qs74TH+Ed1gw98jmUgd2axWvIZEqTeTuFrg1lEB1KV6cK9h1A==} dependencies: - '@codemirror/language': 6.9.3 - '@codemirror/state': 6.3.3 - '@codemirror/view': 6.22.3 - '@lezer/common': 1.1.0 + '@codemirror/language': 6.10.1 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.26.1 + '@lezer/common': 1.2.1 dev: false - /@codemirror/lang-css@6.0.1(@codemirror/view@6.22.3)(@lezer/common@1.1.0): + /@codemirror/lang-css@6.0.1(@codemirror/view@6.26.1)(@lezer/common@1.2.1): resolution: {integrity: sha512-rlLq1Dt0WJl+2epLQeAsfqIsx3lGu4HStHCJu95nGGuz2P2fNugbU3dQYafr2VRjM4eMC9HviI6jvS98CNtG5w==} dependencies: - '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/language': 6.9.3 - '@codemirror/state': 6.3.3 + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.1 + '@codemirror/state': 6.4.1 '@lezer/css': 1.1.1 transitivePeerDependencies: - '@codemirror/view' - '@lezer/common' dev: false - /@codemirror/lang-javascript@6.2.1: - resolution: {integrity: sha512-jlFOXTejVyiQCW3EQwvKH0m99bUYIw40oPmFjSX2VS78yzfe0HELZ+NEo9Yfo1MkGRpGlj3Gnu4rdxV1EnAs5A==} + /@codemirror/lang-javascript@6.2.2: + resolution: {integrity: sha512-VGQfY+FCc285AhWuwjYxQyUQcYurWlxdKYT4bqwr3Twnd5wP5WSeu52t4tvvuWmljT4EmgEgZCqSieokhtY8hg==} dependencies: - '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/language': 6.9.3 - '@codemirror/lint': 6.4.2 - '@codemirror/state': 6.3.3 - '@codemirror/view': 6.22.3 - '@lezer/common': 1.1.0 + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.1 + '@codemirror/lint': 6.5.0 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.26.1 + '@lezer/common': 1.2.1 '@lezer/javascript': 1.0.2 dev: false /@codemirror/lang-json@6.0.1: resolution: {integrity: sha512-+T1flHdgpqDDlJZ2Lkil/rLiRy684WMLc74xUnjJH48GQdfJo/pudlTRreZmKwzP8/tGdKf83wlbAdOCzlJOGQ==} dependencies: - '@codemirror/language': 6.9.3 + '@codemirror/language': 6.10.1 '@lezer/json': 1.0.0 dev: false - /@codemirror/lang-python@6.1.3(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0): - resolution: {integrity: sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ==} + /@codemirror/lang-python@6.1.5(@codemirror/view@6.26.1): + resolution: {integrity: sha512-hCm+8X6wrnXJCGf+QhmFu1AXkdTVG7dHy0Ly6SI1N3SRPptaMvwX6oNQonOXOMPvmcjiB0xq342KAxX3BYpijw==} dependencies: - '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/language': 6.9.3 + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.1 + '@codemirror/state': 6.4.1 + '@lezer/common': 1.2.1 '@lezer/python': 1.1.5 transitivePeerDependencies: - - '@codemirror/state' - '@codemirror/view' - - '@lezer/common' dev: false - /@codemirror/language@6.9.3: - resolution: {integrity: sha512-qq48pYzoi6ldYWV/52+Z9Ou6QouVI+8YwvxFbUypI33NbjG2UeRHKENRyhwljTTiOqjQ33FjyZj6EREQ9apAOQ==} + /@codemirror/language@6.10.1: + resolution: {integrity: sha512-5GrXzrhq6k+gL5fjkAwt90nYDmjlzTIJV8THnxNFtNKWotMIlzzN+CpqxqwXOECnUdOndmSeWntVrVcv5axWRQ==} dependencies: - '@codemirror/state': 6.3.3 - '@codemirror/view': 6.22.3 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.26.1 '@lezer/common': 1.1.0 - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 style-mod: 4.1.0 dev: false - /@codemirror/lint@6.4.2: - resolution: {integrity: sha512-wzRkluWb1ptPKdzlsrbwwjYCPLgzU6N88YBAmlZi8WFyuiEduSd05MnJYNogzyc8rPK7pj6m95ptUApc8sHKVA==} + /@codemirror/lint@6.5.0: + resolution: {integrity: sha512-+5YyicIaaAZKU8K43IQi8TBy6mF6giGeWAH7N96Z5LC30Wm5JMjqxOYIE9mxwMG1NbhT2mA3l9hA4uuKUM3E5g==} dependencies: - '@codemirror/state': 6.3.3 - '@codemirror/view': 6.22.3 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.26.1 crelt: 1.0.5 dev: false - /@codemirror/state@6.3.3: - resolution: {integrity: sha512-0wufKcTw2dEwEaADajjHf6hBy1sh3M6V0e+q4JKIhLuiMSe5td5HOWpUdvKth1fT1M9VYOboajoBHpkCd7PG7A==} + /@codemirror/state@6.4.1: + resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==} dev: false - /@codemirror/view@6.22.3: - resolution: {integrity: sha512-rqnq+Zospwoi3x1vZ8BGV1MlRsaGljX+6qiGYmIpJ++M+LCC+wjfDaPklhwpWSgv7pr/qx29KiAKQBH5+DOn4w==} + /@codemirror/view@6.26.1: + resolution: {integrity: sha512-wLw0t3R9AwOSQThdZ5Onw8QQtem5asE7+bPlnzc57eubPqiuJKIzwjMZ+C42vQett+iva+J8VgFV4RYWDBh5FA==} dependencies: - '@codemirror/state': 6.3.3 + '@codemirror/state': 6.4.1 style-mod: 4.1.0 w3c-keyname: 2.2.6 dev: false @@ -6300,11 +6304,14 @@ packages: /@lezer/common@1.1.0: resolution: {integrity: sha512-XPIN3cYDXsoJI/oDWoR2tD++juVrhgIago9xyKhZ7IhGlzdDM9QgC8D8saKNCz5pindGcznFr2HBSsEQSWnSjw==} + /@lezer/common@1.2.1: + resolution: {integrity: sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==} + /@lezer/css@1.1.1: resolution: {integrity: sha512-mSjx+unLLapEqdOYDejnGBokB5+AiJKZVclmud0MKQOKx3DLJ5b5VTCstgDDknR6iIV4gVrN6euzsCnj0A2gQA==} dependencies: - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 dev: false /@lezer/generator@1.7.0: @@ -6315,8 +6322,8 @@ packages: '@lezer/lr': 1.4.0 dev: true - /@lezer/highlight@1.1.1: - resolution: {integrity: sha512-duv9D23O9ghEDnnUDmxu+L8pJy4nYo4AbCOHIudUhscrLSazqeJeK1V50EU6ZufWF1zv0KJwu/frFRyZWXxHBQ==} + /@lezer/highlight@1.2.0: + resolution: {integrity: sha512-WrS5Mw51sGrpqjlh3d4/fOwpEV2Hd3YOkp9DBt4k8XZQcoTHZFB7sx030A6OcahF4J1nDQAa3jXlTVVYH50IFA==} dependencies: '@lezer/common': 1.1.0 dev: false @@ -6324,48 +6331,37 @@ packages: /@lezer/html@1.3.0: resolution: {integrity: sha512-jU/ah8DEoiECLTMouU/X/ujIg6k9WQMIOFMaCLebzaXfrguyGaR3DpTgmk0tbljiuIJ7hlmVJPcJcxGzmCd0Mg==} dependencies: - '@lezer/common': 1.1.0 - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/common': 1.2.1 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 dev: false /@lezer/javascript@1.0.2: resolution: {integrity: sha512-IjOVeIRhM8IuafWNnk+UzRz7p4/JSOKBNINLYLsdSGuJS9Ju7vFdc82AlTt0jgtV5D8eBZf4g0vK4d3ttBNz7A==} dependencies: - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 dev: false /@lezer/json@1.0.0: resolution: {integrity: sha512-zbAuUY09RBzCoCA3lJ1+ypKw5WSNvLqGMtasdW6HvVOqZoCpPr8eWrsGnOVWGKGn8Rh21FnrKRVlJXrGAVUqRw==} dependencies: - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 - dev: false - - /@lezer/lr@1.2.3: - resolution: {integrity: sha512-qpB7rBzH8f6Mzjv2AVZRahcm+2Cf7nbIH++uXbvVOL1yIRvVWQ3HAM/saeBLCyz/togB7LGo76qdJYL1uKQlqA==} - dependencies: - '@lezer/common': 1.1.0 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 dev: false /@lezer/lr@1.4.0: resolution: {integrity: sha512-Wst46p51km8gH0ZUmeNrtpRYmdlRHUpN1DQd3GFAyKANi8WVz8c2jHYTf1CVScFaCjQw1iO3ZZdqGDxQPRErTg==} dependencies: - '@lezer/common': 1.1.0 - dev: true + '@lezer/common': 1.2.1 /@lezer/python@1.1.5: resolution: {integrity: sha512-h0DVr6IfrmKUbTc5PeetaC87IZYoHyn5JogsVYW5mRDpVRyEsvaLBMLyEN4Ufc2BKp1c9y2Pkr8ZNLxS8dTLsQ==} dependencies: - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 dev: false - /@mdn/browser-compat-data@5.5.19: - resolution: {integrity: sha512-ntKBZtwWCy4XvJosdTJKqIMdmzgbxjopfoiMxgpzsml3dXqA7MIHCE/amidfQc06a6KvmMrpiVuYHIBt2feDog==} - dev: true - /@mdx-js/react@3.0.1(@types/react@18.0.27)(react@18.2.0): resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} peerDependencies: @@ -6480,14 +6476,14 @@ packages: dev: false optional: true - /@n8n/codemirror-lang-sql@1.0.2(@codemirror/view@6.22.3)(@lezer/common@1.1.0): + /@n8n/codemirror-lang-sql@1.0.2(@codemirror/view@6.26.1)(@lezer/common@1.2.1): resolution: {integrity: sha512-sOf/KyewSu3Ikij0CkRtzJJDhRDZcwNCEYl8UdH4U/riL0/XZGcBD7MYofCCcKszanJZiEWRZ2KU1sRp234iMg==} dependencies: - '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/language': 6.9.3 - '@codemirror/state': 6.3.3 - '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/language': 6.10.1 + '@codemirror/state': 6.4.1 + '@lezer/highlight': 1.2.0 + '@lezer/lr': 1.4.0 transitivePeerDependencies: - '@codemirror/view' - '@lezer/common' @@ -7224,21 +7220,6 @@ packages: rollup: 3.29.4 dev: true - /@rollup/pluginutils@5.1.0(rollup@2.79.1): - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.0 - estree-walker: 2.0.2 - picomatch: 2.3.1 - rollup: 2.79.1 - dev: true - /@rollup/pluginutils@5.1.0(rollup@3.29.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} @@ -9123,7 +9104,7 @@ packages: resolution: {integrity: sha512-fB0R+fa3AUqbLHWyxXa2kGVtf1Fe1ZZFr0Zp6AIbIAzXb2mKbEXl+PCQNUOaq5lbTab5tfctfXRNsWXxa2f7Aw==} engines: {node: '>=14'} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.22.5 '@babel/runtime': 7.23.6 '@types/aria-query': 5.0.1 aria-query: 5.1.3 @@ -9731,10 +9712,6 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true - /@types/object-path@0.11.4: - resolution: {integrity: sha512-4tgJ1Z3elF/tOMpA8JLVuR9spt9Ynsf7+JjqsQ2IqtiPJtcLoHoXcT6qU4E10cPFqyXX5HDm9QwIzZhBSkLxsw==} - dev: true - /@types/phoenix@1.6.4: resolution: {integrity: sha512-B34A7uot1Cv0XtaHRYDATltAdKx0BvVKNgYNqE4WjtPUa4VQJM7kxeXcVKaH+KS+kCmZ+6w+QaUdcljiheiBJA==} dev: false @@ -9957,10 +9934,6 @@ packages: '@types/node': 18.16.16 dev: false - /@types/ua-parser-js@0.7.39: - resolution: {integrity: sha512-P/oDfpofrdtF5xw433SPALpdSchtJmY7nsJItf8h3KXqOslkbySh8zq4dSWXH2oTjRvJ5PczVEoCZPow6GicLg==} - dev: true - /@types/unist@2.0.6: resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} dev: true @@ -10244,10 +10217,6 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@ungap/promise-all-settled@1.1.2: - resolution: {integrity: sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==} - dev: true - /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true @@ -10806,11 +10775,6 @@ packages: '@xtuc/long': 4.2.2 dev: true - /@wessberg/stringutil@1.0.19: - resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} - engines: {node: '>=8.0.0'} - dev: true - /@xata.io/client@0.28.0(typescript@5.4.2): resolution: {integrity: sha512-V6rpx+9C6uYdGUDUvk5xIot19zRvDEQhkHXWGIkKY/SCKu4w68S81Z88tgGLRaknSFjpAm7H/rvGBR2DrDpqtQ==} peerDependencies: @@ -11939,22 +11903,6 @@ packages: pako: 0.2.9 dev: true - /browserslist-generator@2.1.0: - resolution: {integrity: sha512-ZFz4mAOgqm0cbwKaZsfJbYDbTXGoPANlte7qRsRJOfjB9KmmISQrXJxAVrnXG8C8v/QHNzXyeJt0Cfcks6zZvQ==} - engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} - dependencies: - '@mdn/browser-compat-data': 5.5.19 - '@types/object-path': 0.11.4 - '@types/semver': 7.5.0 - '@types/ua-parser-js': 0.7.39 - browserslist: 4.23.0 - caniuse-lite: 1.0.30001597 - isbot: 3.6.13 - object-path: 0.11.8 - semver: 7.5.4 - ua-parser-js: 1.0.37 - dev: true - /browserslist@4.21.9: resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -12207,7 +12155,7 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.23.0 - caniuse-lite: 1.0.30001597 + caniuse-lite: 1.0.30001517 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: true @@ -12589,17 +12537,17 @@ packages: /codemirror-lang-html-n8n@1.0.0: resolution: {integrity: sha512-ofNP6VTDGJ5rue+kTCZlDZdF1PnE0sl2cAkfrsCAd5MlBgDmqTwuFJIkTI6KXOJXs0ucdTYH6QLhy9BSW7EaOQ==} dependencies: - '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/lang-css': 6.0.1(@codemirror/view@6.22.3)(@lezer/common@1.1.0) - '@codemirror/lang-javascript': 6.2.1 - '@codemirror/language': 6.9.3 - '@codemirror/state': 6.3.3 - '@codemirror/view': 6.22.3 - '@lezer/common': 1.1.0 + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/lang-css': 6.0.1(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/lang-javascript': 6.2.2 + '@codemirror/language': 6.10.1 + '@codemirror/state': 6.4.1 + '@codemirror/view': 6.26.1 + '@lezer/common': 1.2.1 '@lezer/css': 1.1.1 - '@lezer/highlight': 1.1.1 + '@lezer/highlight': 1.2.0 '@lezer/html': 1.3.0 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 dev: false /cohere-ai@6.2.2: @@ -12766,16 +12714,6 @@ packages: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true - /compatfactory@3.0.0(typescript@5.4.2): - resolution: {integrity: sha512-WD5kF7koPwVoyKL8p0LlrmIZtilrD46sQStyzzxzTFinMKN2Dxk1hN+sddLSQU1mGIZvQfU8c+ONSghvvM40jg==} - engines: {node: '>=14.9.0'} - peerDependencies: - typescript: ^5.4.2 - dependencies: - helpertypes: 0.0.19 - typescript: 5.4.2 - dev: true - /component-emitter@1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} dev: true @@ -13040,13 +12978,6 @@ packages: shebang-command: 2.0.0 which: 2.0.2 - /crosspath@2.0.0: - resolution: {integrity: sha512-ju88BYCQ2uvjO2bR+SsgLSTwTSctU+6Vp2ePbKPgSCZyy4MWZxYsT738DlKVRE5utUjobjPRm1MkTYKJxCmpTA==} - engines: {node: '>=14.9.0'} - dependencies: - '@types/node': 18.16.16 - dev: true - /crypt@0.0.2: resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false @@ -13433,19 +13364,6 @@ packages: supports-color: 8.1.1 dev: true - /debug@4.3.3(supports-color@8.1.1): - resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - supports-color: 8.1.1 - dev: true - /debug@4.3.4(supports-color@8.1.1): resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -15864,17 +15782,6 @@ packages: path-scurry: 1.10.1 dev: true - /glob@7.2.0: - resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -16060,11 +15967,6 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /growl@1.10.5: - resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} - engines: {node: '>=4.x'} - dev: true - /gtoken@6.1.2: resolution: {integrity: sha512-4ccGpzz7YAr7lxrT2neugmXQ3hP9ho2gcaityLVkiUecAiwiy60Ii8gRbZeOsXV19fYaRjgBSshs8kXw+NKCPQ==} engines: {node: '>=12.0.0'} @@ -16286,11 +16188,6 @@ packages: readable-stream: 3.6.0 dev: false - /helpertypes@0.0.19: - resolution: {integrity: sha512-J00e55zffgi3yVnUp0UdbMztNkr2PnizEkOe9URNohnrNhW5X0QpegkuLpOmFQInpi93Nb8MCjQRHAiCDF42NQ==} - engines: {node: '>=10.0.0'} - dev: true - /hexoid@1.0.0: resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==} engines: {node: '>=8'} @@ -17151,6 +17048,7 @@ packages: /isbot@3.6.13: resolution: {integrity: sha512-uoP4uK5Dc2CrabmK+Gue1jTL+scHiCc1c9rblRpJwG8CPxjLIv8jmGyyGRGkbPOweayhkskdZsEQXG6p+QCQrg==} engines: {node: '>=12'} + dev: false /isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -17510,7 +17408,7 @@ packages: resolution: {integrity: sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.22.5 '@jest/types': 29.6.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -17525,7 +17423,7 @@ packages: resolution: {integrity: sha512-vnIGYEjoPSuRqV8W9t+Wow95SDp6KPX2Uf7EoeG9G99J2OVh7OSwpS4B6J0NfpEIpfkBNHlBZpA2rblEuEFhZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.22.5 '@jest/types': 29.6.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 @@ -19224,13 +19122,6 @@ packages: hasBin: true dev: true - /magic-string@0.26.7: - resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} - engines: {node: '>=12'} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - /magic-string@0.27.0: resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} engines: {node: '>=12'} @@ -19608,11 +19499,11 @@ packages: dependencies: brace-expansion: 1.1.11 - /minimatch@4.2.1: - resolution: {integrity: sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g==} + /minimatch@5.0.1: + resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} engines: {node: '>=10'} dependencies: - brace-expansion: 1.1.11 + brace-expansion: 2.0.1 dev: true /minimatch@5.1.5: @@ -19856,32 +19747,28 @@ packages: resolution: {integrity: sha512-Mn6CN6meXEnMa0a5u6a5+RKrqRedHBhZGd15AWLk9O6uFY4KYHzImdt8JI8WODo1bjTSRnwXhJox+FCUZhCKCQ==} dev: true - /mocha@9.2.2: - resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==} - engines: {node: '>= 12.0.0'} + /mocha@10.4.0: + resolution: {integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==} + engines: {node: '>= 14.0.0'} hasBin: true dependencies: - '@ungap/promise-all-settled': 1.1.2 ansi-colors: 4.1.1 browser-stdout: 1.3.1 chokidar: 3.5.2 - debug: 4.3.3(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) diff: 5.0.0 escape-string-regexp: 4.0.0 find-up: 5.0.0 - glob: 7.2.0 - growl: 1.10.5 + glob: 8.1.0 he: 1.2.0 js-yaml: 4.1.0 log-symbols: 4.1.0 - minimatch: 4.2.1 + minimatch: 5.0.1 ms: 2.1.3 - nanoid: 3.3.1 serialize-javascript: 6.0.0 strip-json-comments: 3.1.1 supports-color: 8.1.1 - which: 2.0.2 - workerpool: 6.2.0 + workerpool: 6.2.1 yargs: 16.2.0 yargs-parser: 20.2.4 yargs-unparser: 2.0.0 @@ -20085,12 +19972,6 @@ packages: resolution: {integrity: sha512-wynEP02LmIbLpcYw8uBKpcfF6dmg2vcpKqxeH5UcoKEYdExslsdUA4ugFauuaeYdTB76ez6gJW8XAZ6CgkXYxA==} dev: false - /nanoid@3.3.1: - resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - dev: true - /nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -20573,11 +20454,6 @@ packages: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} - /object-path@0.11.8: - resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} - engines: {node: '>= 10.12.0'} - dev: true - /object-treeify@1.1.33: resolution: {integrity: sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A==} engines: {node: '>= 10'} @@ -22944,20 +22820,6 @@ packages: resolution: {integrity: sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==} dev: false - /rollup-plugin-dts@4.2.3(rollup@2.79.1)(typescript@5.4.2): - resolution: {integrity: sha512-jlcpItqM2efqfIiKzDB/IKOS9E9fDvbkJSGw5GtK/PqPGS9eC3R3JKyw2VvpTktZA+TNgJRMu1NTv244aTUzzQ==} - engines: {node: '>=v12.22.12'} - peerDependencies: - rollup: ^2.55 - typescript: ^5.4.2 - dependencies: - magic-string: 0.26.7 - rollup: 2.79.1 - typescript: 5.4.2 - optionalDependencies: - '@babel/code-frame': 7.23.5 - dev: true - /rollup-plugin-dts@6.1.0(rollup@3.29.4)(typescript@5.4.2): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} @@ -22972,58 +22834,6 @@ packages: '@babel/code-frame': 7.23.5 dev: true - /rollup-plugin-ts@3.4.5(@babel/core@7.24.0)(rollup@2.79.1)(typescript@5.4.2): - resolution: {integrity: sha512-9iCstRJpEZXSRQuXitlSZAzcGlrqTbJg1pE4CMbEi6xYldxVncdPyzA2I+j6vnh73wBymZckerS+Q/iEE/M3Ow==} - engines: {node: '>=16.15.1', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} - peerDependencies: - '@babel/core': '>=7.x' - '@babel/plugin-transform-runtime': '>=7.x' - '@babel/preset-env': '>=7.x' - '@babel/preset-typescript': '>=7.x' - '@babel/runtime': '>=7.x' - '@swc/core': '>=1.x' - '@swc/helpers': '>=0.2' - rollup: '>=1.x || >=2.x || >=3.x' - typescript: ^5.4.2 - peerDependenciesMeta: - '@babel/core': - optional: true - '@babel/plugin-transform-runtime': - optional: true - '@babel/preset-env': - optional: true - '@babel/preset-typescript': - optional: true - '@babel/runtime': - optional: true - '@swc/core': - optional: true - '@swc/helpers': - optional: true - dependencies: - '@babel/core': 7.24.0 - '@rollup/pluginutils': 5.1.0(rollup@2.79.1) - '@wessberg/stringutil': 1.0.19 - ansi-colors: 4.1.3 - browserslist: 4.23.0 - browserslist-generator: 2.1.0 - compatfactory: 3.0.0(typescript@5.4.2) - crosspath: 2.0.0 - magic-string: 0.30.8 - rollup: 2.79.1 - ts-clone-node: 3.0.0(typescript@5.4.2) - tslib: 2.6.2 - typescript: 5.4.2 - dev: true - - /rollup@2.79.1: - resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} - engines: {node: '>=10.0.0'} - hasBin: true - optionalDependencies: - fsevents: 2.3.3 - dev: true - /rollup@3.29.4: resolution: {integrity: sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} @@ -23731,11 +23541,6 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - /sourcemap-codec@1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead - dev: true - /space-separated-tokens@2.0.2: resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} dev: true @@ -24763,16 +24568,6 @@ packages: typescript: 5.4.2 dev: true - /ts-clone-node@3.0.0(typescript@5.4.2): - resolution: {integrity: sha512-egavvyHbIoelkgh1IC2agNB1uMNjB8VJgh0g/cn0bg2XXTcrtjrGMzEk4OD3Fi2hocICjP3vMa56nkzIzq0FRg==} - engines: {node: '>=14.9.0'} - peerDependencies: - typescript: ^5.4.2 - dependencies: - compatfactory: 3.0.0(typescript@5.4.2) - typescript: 5.4.2 - dev: true - /ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -25134,10 +24929,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - /ua-parser-js@1.0.37: - resolution: {integrity: sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==} - dev: true - /uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: false @@ -26431,8 +26222,8 @@ packages: /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - /workerpool@6.2.0: - resolution: {integrity: sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==} + /workerpool@6.2.1: + resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} dev: true /wrap-ansi@2.1.0: From 64a9b5aceded380a8bece8ec85bbfd7a9b24dc7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 16:23:12 +0200 Subject: [PATCH 07/14] sync with upstream --- package.json | 1 + packages/@n8n/codemirror-lang/jest.config.js | 2 + packages/@n8n/codemirror-lang/package.json | 31 ++-- packages/@n8n/codemirror-lang/src/index.ts | 1 - .../@n8n/codemirror-lang/src/syntax.grammar | 8 +- packages/@n8n/codemirror-lang/test/cases.txt | 30 ++-- .../@n8n/codemirror-lang/test/cases.txt.orig | 41 ----- .../codemirror-lang/test/expressions.test.ts | 21 +++ packages/@n8n/codemirror-lang/test/test.js | 23 --- .../@n8n/codemirror-lang/tsconfig.build.json | 10 ++ packages/@n8n/codemirror-lang/tsconfig.json | 11 +- packages/editor-ui/package.json | 2 +- pnpm-lock.yaml | 151 +++--------------- 13 files changed, 97 insertions(+), 235 deletions(-) create mode 100644 packages/@n8n/codemirror-lang/jest.config.js delete mode 100644 packages/@n8n/codemirror-lang/test/cases.txt.orig create mode 100644 packages/@n8n/codemirror-lang/test/expressions.test.ts delete mode 100644 packages/@n8n/codemirror-lang/test/test.js create mode 100644 packages/@n8n/codemirror-lang/tsconfig.build.json diff --git a/package.json b/package.json index 265951c9a1111..6a6c97d656dd6 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ ], "overrides": { "@langchain/core": "0.1.41", + "@lezer/common": "1.1.0", "@types/node": "^18.16.16", "axios": "1.6.7", "chokidar": "3.5.2", diff --git a/packages/@n8n/codemirror-lang/jest.config.js b/packages/@n8n/codemirror-lang/jest.config.js new file mode 100644 index 0000000000000..d6c48554a79a4 --- /dev/null +++ b/packages/@n8n/codemirror-lang/jest.config.js @@ -0,0 +1,2 @@ +/** @type {import('jest').Config} */ +module.exports = require('../../../jest.config'); diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index 142906f3597e4..cf0ee32bdf1a9 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -1,21 +1,26 @@ { "name": "@n8n/codemirror-lang", - "version": "0.2.0", + "version": "0.3.0", "description": "n8n expression language support for CodeMirror 6", "private": "true", - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.js", + "sideEffects": false, + "main": "dist/index.js", + "module": "src/index.ts", + "types": "dist/index.d.ts", "exports": { - "import": "./dist/index.js", - "require": "./dist/index.cjs" + ".": { + "require": "./dist/index.js", + "import": "./src/index.ts", + "types": "./dist/index.d.ts" + }, + "./*": "./*" }, - "types": "dist/index.d.ts", - "sideEffects": false, "scripts": { + "clean": "rimraf dist .turbo", + "typecheck": "tsc", "generate": "lezer-generator --typeScript --output src/syntax.grammar.ts src/syntax.grammar", - "build": "tsc", - "test": "npm run build && mocha test/test.js", + "build": "pnpm generate && tsc -p tsconfig.build.json", + "test": "jest", "lint": "eslint . --ext .js,.ts,.vue --quiet", "lintfix": "eslint . --ext .js,.ts,.vue --fix", "format": "prettier --write src/" @@ -23,11 +28,9 @@ "dependencies": { "@codemirror/autocomplete": "^6.15.0", "@codemirror/language": "^6.10.1", - "@lezer/highlight": "^1.2.0", - "@lezer/lr": "^1.4.0" + "@lezer/highlight": "^1.2.0" }, "devDependencies": { - "@lezer/generator": "^1.7.0", - "mocha": "^10.4.0" + "@lezer/generator": "^1.7.0" } } diff --git a/packages/@n8n/codemirror-lang/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts index 5bcf722a780a3..e493edb814c5d 100644 --- a/packages/@n8n/codemirror-lang/src/index.ts +++ b/packages/@n8n/codemirror-lang/src/index.ts @@ -13,7 +13,6 @@ export const parserWithMetaData = parser.configure({ CloseMarker: t.brace, Plaintext: t.content, Resolvable: t.string, - BrokenResolvable: t.className, }), ], }); diff --git a/packages/@n8n/codemirror-lang/src/syntax.grammar b/packages/@n8n/codemirror-lang/src/syntax.grammar index 10ef380de7763..f2cf200f35c6a 100644 --- a/packages/@n8n/codemirror-lang/src/syntax.grammar +++ b/packages/@n8n/codemirror-lang/src/syntax.grammar @@ -1,12 +1,10 @@ @top Program { entity* } -entity { Plaintext | Resolvable | BrokenResolvable } +entity { Plaintext | Resolvable } @tokens { Plaintext { ![{] Plaintext? | "{" (@eof | ![{] Plaintext?) } - BrokenResolvable { "{{" ![}]* "}"? } - OpenMarker[closedBy="CloseMarker"] { "{{" } CloseMarker[openedBy="OpenMarker"] { "}}" } @@ -17,9 +15,7 @@ entity { Plaintext | Resolvable | BrokenResolvable } resolvableChar { unicodeChar | "}" ![}] | "\\}}" } - unicodeChar { $[\u0000-\u007C] | $[\u007E-\u06FF] } - - @precedence { BrokenResolvable, Resolvable } + unicodeChar { $[\u0000-\u007C] | $[\u007E-\u1FFF] | $[\u20A0-\u20CF] | $[\u{1F300}-\u{1F64F}] } } @detectDelim diff --git a/packages/@n8n/codemirror-lang/test/cases.txt b/packages/@n8n/codemirror-lang/test/cases.txt index 2589fb61773c9..eeb42610a2574 100644 --- a/packages/@n8n/codemirror-lang/test/cases.txt +++ b/packages/@n8n/codemirror-lang/test/cases.txt @@ -214,42 +214,42 @@ Program(Plaintext) Program(Plaintext) -# BrokenResolvable of two opening braces +# Plaintext then Resolvable with non-ASCII chars then Plaintext -{{ +a {{ 'áßи' }} a ==> -Program(BrokenResolvable) +Program(Plaintext, Resolvable, Plaintext) -# BrokenResolvable of two opening braces and text +# Resolvable with currency symbol -{{text +{{ '€' }} ==> -Program(BrokenResolvable) +Program(Resolvable) -# BrokenResolvable of two opening braces and one closing brace +# Resolvable with cyrillic char -{{ } +{{ 'л' }} ==> -Program(BrokenResolvable) +Program(Resolvable) -# BrokenResolvable of two opening braces, text and one closing brace +# Resolvable with Pictographs char -{{ abc } +{{ '🎉' }} ==> -Program(BrokenResolvable) +Program(Resolvable) -# Plaintext then Resolvable with non-ASCII chars then Plaintext +# Resolvable with Emoticons char -a {{ 'áßи' }} a +{{ '😎' }} ==> -Program(Plaintext, Resolvable, Plaintext) \ No newline at end of file +Program(Resolvable) diff --git a/packages/@n8n/codemirror-lang/test/cases.txt.orig b/packages/@n8n/codemirror-lang/test/cases.txt.orig deleted file mode 100644 index 24161e00c64fb..0000000000000 --- a/packages/@n8n/codemirror-lang/test/cases.txt.orig +++ /dev/null @@ -1,41 +0,0 @@ -# Booleans - -#t -#f - -==> - -Program(Boolean, Boolean) - -# Identifiers - -one -Two_Three - -==> - -Program(Identifier, Identifier) - -# Strings - -"hello" -"one\"\\two" - -==> - -Program(String, String) - -# Applications - -(begin - (when #t - (print (concat "hello" " " "world"))) - (print "DONE")) - -==> - -Program(Application( - Identifier, - Application(Identifier, Boolean, Application( - Identifier, Application(Identifier, String, String, String))) - Application(Identifier, String))) diff --git a/packages/@n8n/codemirror-lang/test/expressions.test.ts b/packages/@n8n/codemirror-lang/test/expressions.test.ts new file mode 100644 index 0000000000000..9991892e881ab --- /dev/null +++ b/packages/@n8n/codemirror-lang/test/expressions.test.ts @@ -0,0 +1,21 @@ +import fs from 'fs'; +import path from 'path'; +import { fileTests as runTestFile } from '@lezer/generator/dist/test'; +import { n8nLanguage } from '..'; + +describe('expressions language', () => { + const CASES_DIR = __dirname; + for (const testFile of fs.readdirSync(CASES_DIR)) { + if (!/\.txt$/.test(testFile)) continue; + + const testFileName = /^[^\.]*/.exec(testFile)[0]; + describe(testFileName, () => { + for (const { name, run } of runTestFile( + fs.readFileSync(path.join(CASES_DIR, testFile), 'utf8'), + testFile, + )) { + it(name, () => run(n8nLanguage.parser)); + } + }); + } +}); diff --git a/packages/@n8n/codemirror-lang/test/test.js b/packages/@n8n/codemirror-lang/test/test.js deleted file mode 100644 index 1203d93cb5f33..0000000000000 --- a/packages/@n8n/codemirror-lang/test/test.js +++ /dev/null @@ -1,23 +0,0 @@ -import fs from "fs"; -import path from "path"; -import { fileURLToPath } from "url"; - -import { fileTests as runTestFile } from "@lezer/generator/dist/test"; -import { n8nLanguage } from "../dist/index.js"; - -const CASES_DIR = path.dirname(fileURLToPath(import.meta.url)); - -for (const testFile of fs.readdirSync(CASES_DIR)) { - if (!/\.txt$/.test(testFile)) continue; - - const name = /^[^\.]*/.exec(testFile)[0]; - - describe(name, () => { - for (const { name, run } of runTestFile( - fs.readFileSync(path.join(CASES_DIR, testFile), "utf8"), - testFile - )) { - it(name, () => run(n8nLanguage.parser)); - } - }); -} diff --git a/packages/@n8n/codemirror-lang/tsconfig.build.json b/packages/@n8n/codemirror-lang/tsconfig.build.json new file mode 100644 index 0000000000000..30910a3bf1ebb --- /dev/null +++ b/packages/@n8n/codemirror-lang/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": ["./tsconfig.json", "../../../tsconfig.build.json"], + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "tsBuildInfoFile": "dist/build.tsbuildinfo" + }, + "include": ["src/**/*.ts"], + "exclude": ["test/**"] +} diff --git a/packages/@n8n/codemirror-lang/tsconfig.json b/packages/@n8n/codemirror-lang/tsconfig.json index c48166ebcb35e..77ff04eab73cb 100644 --- a/packages/@n8n/codemirror-lang/tsconfig.json +++ b/packages/@n8n/codemirror-lang/tsconfig.json @@ -1,12 +1,9 @@ { "extends": "../../../tsconfig.json", "compilerOptions": { - "rootDir": "src", - "outDir": "dist", - "tsBuildInfoFile": "dist/build.tsbuildinfo", - "target": "esnext", - "module": "esnext", - "declaration": true + "rootDir": ".", + "tsBuildInfoFile": "dist/typecheck.tsbuildinfo", + "strict": true }, - "include": ["src/index.ts"] + "include": ["src/**/*.ts", "test/**/*.ts"] } diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 6bd2eccb1b916..26af7941e408d 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -41,7 +41,7 @@ "@jsplumb/connector-bezier": "^5.13.2", "@jsplumb/core": "^5.13.2", "@jsplumb/util": "^5.13.2", - "@lezer/common": "^1.2.1", + "@lezer/common": "^1.1.0", "@n8n/chat": "workspace:*", "@n8n/codemirror-lang-sql": "^1.0.2", "@n8n/permissions": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 37daf665c73c3..a7ecf6ed6c871 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,6 +18,7 @@ overrides: tslib: ^2.6.2 tsconfig-paths: ^4.2.0 typescript: ^5.4.2 + '@lezer/common': 1.1.0 patchedDependencies: '@sentry/cli@2.17.0': @@ -182,23 +183,17 @@ importers: dependencies: '@codemirror/autocomplete': specifier: ^6.15.0 - version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/language': specifier: ^6.10.1 version: 6.10.1 '@lezer/highlight': specifier: ^1.2.0 version: 1.2.0 - '@lezer/lr': - specifier: ^1.4.0 - version: 1.4.0 devDependencies: '@lezer/generator': specifier: ^1.7.0 version: 1.7.0 - mocha: - specifier: ^10.4.0 - version: 10.4.0 packages/@n8n/nodes-langchain: dependencies: @@ -1008,7 +1003,7 @@ importers: dependencies: '@codemirror/autocomplete': specifier: ^6.15.0 - version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/commands': specifier: ^6.3.3 version: 6.3.3 @@ -1064,8 +1059,8 @@ importers: specifier: ^5.13.2 version: 5.13.2 '@lezer/common': - specifier: ^1.2.1 - version: 1.2.1 + specifier: 1.1.0 + version: 1.1.0 '@n8n/chat': specifier: workspace:* version: link:../@n8n/chat @@ -1074,7 +1069,7 @@ importers: version: link:../@n8n/codemirror-lang '@n8n/codemirror-lang-sql': specifier: ^1.0.2 - version: 1.0.2(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + version: 1.0.2(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@n8n/permissions': specifier: workspace:* version: link:../@n8n/permissions @@ -4592,18 +4587,18 @@ packages: - react dev: true - /@codemirror/autocomplete@6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1): + /@codemirror/autocomplete@6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0): resolution: {integrity: sha512-G2Zm0mXznxz97JhaaOdoEG2cVupn4JjPaS4AcNvZzhOsnnG9YVN68VzfoUw6dYTsIxT6a/cmoFEN47KAWhXaOg==} peerDependencies: '@codemirror/language': ^6.0.0 '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 - '@lezer/common': ^1.0.0 + '@lezer/common': 1.1.0 dependencies: '@codemirror/language': 6.10.1 '@codemirror/state': 6.4.1 '@codemirror/view': 6.26.1 - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 dev: false /@codemirror/commands@6.3.3: @@ -4612,13 +4607,13 @@ packages: '@codemirror/language': 6.10.1 '@codemirror/state': 6.4.1 '@codemirror/view': 6.26.1 - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 dev: false - /@codemirror/lang-css@6.0.1(@codemirror/view@6.26.1)(@lezer/common@1.2.1): + /@codemirror/lang-css@6.0.1(@codemirror/view@6.26.1)(@lezer/common@1.1.0): resolution: {integrity: sha512-rlLq1Dt0WJl+2epLQeAsfqIsx3lGu4HStHCJu95nGGuz2P2fNugbU3dQYafr2VRjM4eMC9HviI6jvS98CNtG5w==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/language': 6.10.1 '@codemirror/state': 6.4.1 '@lezer/css': 1.1.1 @@ -4630,12 +4625,12 @@ packages: /@codemirror/lang-javascript@6.2.2: resolution: {integrity: sha512-VGQfY+FCc285AhWuwjYxQyUQcYurWlxdKYT4bqwr3Twnd5wP5WSeu52t4tvvuWmljT4EmgEgZCqSieokhtY8hg==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/language': 6.10.1 '@codemirror/lint': 6.5.0 '@codemirror/state': 6.4.1 '@codemirror/view': 6.26.1 - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 '@lezer/javascript': 1.0.2 dev: false @@ -4649,10 +4644,10 @@ packages: /@codemirror/lang-python@6.1.5(@codemirror/view@6.26.1): resolution: {integrity: sha512-hCm+8X6wrnXJCGf+QhmFu1AXkdTVG7dHy0Ly6SI1N3SRPptaMvwX6oNQonOXOMPvmcjiB0xq342KAxX3BYpijw==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/language': 6.10.1 '@codemirror/state': 6.4.1 - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 '@lezer/python': 1.1.5 transitivePeerDependencies: - '@codemirror/view' @@ -6304,9 +6299,6 @@ packages: /@lezer/common@1.1.0: resolution: {integrity: sha512-XPIN3cYDXsoJI/oDWoR2tD++juVrhgIago9xyKhZ7IhGlzdDM9QgC8D8saKNCz5pindGcznFr2HBSsEQSWnSjw==} - /@lezer/common@1.2.1: - resolution: {integrity: sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==} - /@lezer/css@1.1.1: resolution: {integrity: sha512-mSjx+unLLapEqdOYDejnGBokB5+AiJKZVclmud0MKQOKx3DLJ5b5VTCstgDDknR6iIV4gVrN6euzsCnj0A2gQA==} dependencies: @@ -6331,7 +6323,7 @@ packages: /@lezer/html@1.3.0: resolution: {integrity: sha512-jU/ah8DEoiECLTMouU/X/ujIg6k9WQMIOFMaCLebzaXfrguyGaR3DpTgmk0tbljiuIJ7hlmVJPcJcxGzmCd0Mg==} dependencies: - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 '@lezer/highlight': 1.2.0 '@lezer/lr': 1.4.0 dev: false @@ -6353,7 +6345,7 @@ packages: /@lezer/lr@1.4.0: resolution: {integrity: sha512-Wst46p51km8gH0ZUmeNrtpRYmdlRHUpN1DQd3GFAyKANi8WVz8c2jHYTf1CVScFaCjQw1iO3ZZdqGDxQPRErTg==} dependencies: - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 /@lezer/python@1.1.5: resolution: {integrity: sha512-h0DVr6IfrmKUbTc5PeetaC87IZYoHyn5JogsVYW5mRDpVRyEsvaLBMLyEN4Ufc2BKp1c9y2Pkr8ZNLxS8dTLsQ==} @@ -6476,10 +6468,10 @@ packages: dev: false optional: true - /@n8n/codemirror-lang-sql@1.0.2(@codemirror/view@6.26.1)(@lezer/common@1.2.1): + /@n8n/codemirror-lang-sql@1.0.2(@codemirror/view@6.26.1)(@lezer/common@1.1.0): resolution: {integrity: sha512-sOf/KyewSu3Ikij0CkRtzJJDhRDZcwNCEYl8UdH4U/riL0/XZGcBD7MYofCCcKszanJZiEWRZ2KU1sRp234iMg==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/language': 6.10.1 '@codemirror/state': 6.4.1 '@lezer/highlight': 1.2.0 @@ -11001,11 +10993,6 @@ packages: ansi-wrap: 0.1.0 dev: true - /ansi-colors@4.1.1: - resolution: {integrity: sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==} - engines: {node: '>=6'} - dev: true - /ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -11893,10 +11880,6 @@ packages: engines: {'0': node} dev: false - /browser-stdout@1.3.1: - resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} - dev: true - /browserify-zlib@0.1.4: resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} dependencies: @@ -12537,13 +12520,13 @@ packages: /codemirror-lang-html-n8n@1.0.0: resolution: {integrity: sha512-ofNP6VTDGJ5rue+kTCZlDZdF1PnE0sl2cAkfrsCAd5MlBgDmqTwuFJIkTI6KXOJXs0ucdTYH6QLhy9BSW7EaOQ==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.2.1) - '@codemirror/lang-css': 6.0.1(@codemirror/view@6.26.1)(@lezer/common@1.2.1) + '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) + '@codemirror/lang-css': 6.0.1(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/lang-javascript': 6.2.2 '@codemirror/language': 6.10.1 '@codemirror/state': 6.4.1 '@codemirror/view': 6.26.1 - '@lezer/common': 1.2.1 + '@lezer/common': 1.1.0 '@lezer/css': 1.1.1 '@lezer/highlight': 1.2.0 '@lezer/html': 1.3.0 @@ -13380,11 +13363,6 @@ packages: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} - /decamelize@4.0.0: - resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} - engines: {node: '>=10'} - dev: true - /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} dev: true @@ -13636,11 +13614,6 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /diff@5.0.0: - resolution: {integrity: sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==} - engines: {node: '>=0.3.1'} - dev: true - /digest-fetch@1.3.0: resolution: {integrity: sha512-CGJuv6iKNM7QyZlM2T3sPAdZWd/p9zQiRNS9G+9COUCwzWFTs0Xp8NF5iePx7wtvhDykReiRRrSeNb4oMmB8lA==} dependencies: @@ -15299,6 +15272,7 @@ packages: /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + dev: false /flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} @@ -16874,11 +16848,6 @@ packages: engines: {node: '>=8'} dev: true - /is-plain-obj@2.1.0: - resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} - engines: {node: '>=8'} - dev: true - /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} @@ -19499,13 +19468,6 @@ packages: dependencies: brace-expansion: 1.1.11 - /minimatch@5.0.1: - resolution: {integrity: sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: true - /minimatch@5.1.5: resolution: {integrity: sha512-CI8wwdrll4ehjPAqs8TL8lBPyNnpZlQI02Wn8C1weNz/QbUbjh3OMxgMKSnvqfKFdLlks3EzHB9tO0BqGc3phQ==} engines: {node: '>=10'} @@ -19747,33 +19709,6 @@ packages: resolution: {integrity: sha512-Mn6CN6meXEnMa0a5u6a5+RKrqRedHBhZGd15AWLk9O6uFY4KYHzImdt8JI8WODo1bjTSRnwXhJox+FCUZhCKCQ==} dev: true - /mocha@10.4.0: - resolution: {integrity: sha512-eqhGB8JKapEYcC4ytX/xrzKforgEc3j1pGlAXVy3eRwrtAy5/nIfT1SvgGzfN0XZZxeLq0aQWkOUAmqIJiv+bA==} - engines: {node: '>= 14.0.0'} - hasBin: true - dependencies: - ansi-colors: 4.1.1 - browser-stdout: 1.3.1 - chokidar: 3.5.2 - debug: 4.3.4(supports-color@8.1.1) - diff: 5.0.0 - escape-string-regexp: 4.0.0 - find-up: 5.0.0 - glob: 8.1.0 - he: 1.2.0 - js-yaml: 4.1.0 - log-symbols: 4.1.0 - minimatch: 5.0.1 - ms: 2.1.3 - serialize-javascript: 6.0.0 - strip-json-comments: 3.1.1 - supports-color: 8.1.1 - workerpool: 6.2.1 - yargs: 16.2.0 - yargs-parser: 20.2.4 - yargs-unparser: 2.0.0 - dev: true - /moment-timezone@0.5.37: resolution: {integrity: sha512-uEDzDNFhfaywRl+vwXxffjjq1q0Vzr+fcQpQ1bU0kbzorfS7zVtZnCnGc8mhWmF39d4g4YriF6kwA75mJKE/Zg==} dependencies: @@ -23130,12 +23065,6 @@ packages: resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==} dev: false - /serialize-javascript@6.0.0: - resolution: {integrity: sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==} - dependencies: - randombytes: 2.1.0 - dev: true - /serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} dependencies: @@ -26222,10 +26151,6 @@ packages: /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - /workerpool@6.2.1: - resolution: {integrity: sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==} - dev: true - /wrap-ansi@2.1.0: resolution: {integrity: sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==} engines: {node: '>=0.10.0'} @@ -26432,11 +26357,6 @@ packages: glob: 7.2.3 dev: false - /yargs-parser@20.2.4: - resolution: {integrity: sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==} - engines: {node: '>=10'} - dev: true - /yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -26452,29 +26372,6 @@ packages: object.assign: 4.1.5 dev: true - /yargs-unparser@2.0.0: - resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} - engines: {node: '>=10'} - dependencies: - camelcase: 6.3.0 - decamelize: 4.0.0 - flat: 5.0.2 - is-plain-obj: 2.1.0 - dev: true - - /yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} - dependencies: - cliui: 7.0.4 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 - dev: true - /yargs@17.0.1: resolution: {integrity: sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==} engines: {node: '>=12'} From 5468f135a49f07b39baef79f4d1cd3c3acdd7324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 16:37:51 +0200 Subject: [PATCH 08/14] move expressions into their own folder --- packages/@n8n/codemirror-lang/.eslintignore | 3 -- packages/@n8n/codemirror-lang/.eslintrc.cjs | 4 +++ packages/@n8n/codemirror-lang/.gitignore | 2 +- packages/@n8n/codemirror-lang/package.json | 10 +++--- .../codemirror-lang/src/expressions/index.ts | 35 ++++++++++++++++++ .../src/{ => expressions}/syntax.grammar | 0 packages/@n8n/codemirror-lang/src/index.ts | 36 +------------------ .../test/{ => expressions}/cases.txt | 0 .../{ => expressions}/expressions.test.ts | 4 +-- pnpm-lock.yaml | 4 +-- 10 files changed, 50 insertions(+), 48 deletions(-) delete mode 100644 packages/@n8n/codemirror-lang/.eslintignore create mode 100644 packages/@n8n/codemirror-lang/src/expressions/index.ts rename packages/@n8n/codemirror-lang/src/{ => expressions}/syntax.grammar (100%) rename packages/@n8n/codemirror-lang/test/{ => expressions}/cases.txt (100%) rename packages/@n8n/codemirror-lang/test/{ => expressions}/expressions.test.ts (81%) diff --git a/packages/@n8n/codemirror-lang/.eslintignore b/packages/@n8n/codemirror-lang/.eslintignore deleted file mode 100644 index 118a19fe14dc1..0000000000000 --- a/packages/@n8n/codemirror-lang/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -.eslintrc.cjs -vitest.config.ts -src/syntax.grammar*.ts diff --git a/packages/@n8n/codemirror-lang/.eslintrc.cjs b/packages/@n8n/codemirror-lang/.eslintrc.cjs index a1ad467ea3b92..b04a31c3aaef1 100644 --- a/packages/@n8n/codemirror-lang/.eslintrc.cjs +++ b/packages/@n8n/codemirror-lang/.eslintrc.cjs @@ -7,4 +7,8 @@ module.exports = { extends: ['@n8n_io/eslint-config/frontend'], ...sharedOptions(__dirname, 'frontend'), + + ignorePatterns: [ + 'src/expressions/syntax*.ts' + ] }; diff --git a/packages/@n8n/codemirror-lang/.gitignore b/packages/@n8n/codemirror-lang/.gitignore index 18550f4e30b25..67784737404a3 100644 --- a/packages/@n8n/codemirror-lang/.gitignore +++ b/packages/@n8n/codemirror-lang/.gitignore @@ -3,5 +3,5 @@ package-lock.json /dist /src/*.js /src/*.d.ts -src/syntax.grammar*.ts +src/expressions/syntax*.ts .DS_Store diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index cf0ee32bdf1a9..e2e9faf904dab 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -18,16 +18,16 @@ "scripts": { "clean": "rimraf dist .turbo", "typecheck": "tsc", - "generate": "lezer-generator --typeScript --output src/syntax.grammar.ts src/syntax.grammar", - "build": "pnpm generate && tsc -p tsconfig.build.json", + "generate:expressions:grammar": "lezer-generator --typeScript --output src/expressions/syntax.ts src/expressions/syntax.grammar", + "build": "pnpm generate:expressions:grammar && tsc -p tsconfig.build.json", "test": "jest", "lint": "eslint . --ext .js,.ts,.vue --quiet", "lintfix": "eslint . --ext .js,.ts,.vue --fix", "format": "prettier --write src/" }, - "dependencies": { - "@codemirror/autocomplete": "^6.15.0", - "@codemirror/language": "^6.10.1", + "peerDependencies": { + "@codemirror/autocomplete": "*", + "@codemirror/language": "*", "@lezer/highlight": "^1.2.0" }, "devDependencies": { diff --git a/packages/@n8n/codemirror-lang/src/expressions/index.ts b/packages/@n8n/codemirror-lang/src/expressions/index.ts new file mode 100644 index 0000000000000..a4b89d895a440 --- /dev/null +++ b/packages/@n8n/codemirror-lang/src/expressions/index.ts @@ -0,0 +1,35 @@ +import { completeFromList } from '@codemirror/autocomplete'; +import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; +import { styleTags, tags as t } from '@lezer/highlight'; +import { parser } from './syntax'; + +export const parserWithMetaData = parser.configure({ + props: [ + foldNodeProp.add({ + Application: foldInside, + }), + styleTags({ + OpenMarker: t.brace, + CloseMarker: t.brace, + Plaintext: t.content, + Resolvable: t.string, + }), + ], +}); + +export const n8nLanguage = LRLanguage.define({ + parser: parserWithMetaData, + languageData: { + commentTokens: { line: ';' }, + }, +}); + +const completions = n8nLanguage.data.of({ + autocomplete: completeFromList([ + // { label: "test", type: "keyword" }, // to add in future + ]), +}); + +export function n8nExpression() { + return new LanguageSupport(n8nLanguage, [completions]); +} diff --git a/packages/@n8n/codemirror-lang/src/syntax.grammar b/packages/@n8n/codemirror-lang/src/expressions/syntax.grammar similarity index 100% rename from packages/@n8n/codemirror-lang/src/syntax.grammar rename to packages/@n8n/codemirror-lang/src/expressions/syntax.grammar diff --git a/packages/@n8n/codemirror-lang/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts index e493edb814c5d..78107ef6be3e5 100644 --- a/packages/@n8n/codemirror-lang/src/index.ts +++ b/packages/@n8n/codemirror-lang/src/index.ts @@ -1,35 +1 @@ -import { completeFromList } from '@codemirror/autocomplete'; -import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; -import { styleTags, tags as t } from '@lezer/highlight'; -import { parser } from './syntax.grammar'; - -export const parserWithMetaData = parser.configure({ - props: [ - foldNodeProp.add({ - Application: foldInside, - }), - styleTags({ - OpenMarker: t.brace, - CloseMarker: t.brace, - Plaintext: t.content, - Resolvable: t.string, - }), - ], -}); - -export const n8nLanguage = LRLanguage.define({ - parser: parserWithMetaData, - languageData: { - commentTokens: { line: ';' }, - }, -}); - -const completions = n8nLanguage.data.of({ - autocomplete: completeFromList([ - // { label: "test", type: "keyword" }, // to add in future - ]), -}); - -export function n8nExpression() { - return new LanguageSupport(n8nLanguage, [completions]); -} +export { parserWithMetaData, n8nLanguage } from './expressions'; diff --git a/packages/@n8n/codemirror-lang/test/cases.txt b/packages/@n8n/codemirror-lang/test/expressions/cases.txt similarity index 100% rename from packages/@n8n/codemirror-lang/test/cases.txt rename to packages/@n8n/codemirror-lang/test/expressions/cases.txt diff --git a/packages/@n8n/codemirror-lang/test/expressions.test.ts b/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts similarity index 81% rename from packages/@n8n/codemirror-lang/test/expressions.test.ts rename to packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts index 9991892e881ab..0896bb580fdf5 100644 --- a/packages/@n8n/codemirror-lang/test/expressions.test.ts +++ b/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts @@ -1,14 +1,14 @@ import fs from 'fs'; import path from 'path'; import { fileTests as runTestFile } from '@lezer/generator/dist/test'; -import { n8nLanguage } from '..'; +import { n8nLanguage } from '../../src/expressions/index'; describe('expressions language', () => { const CASES_DIR = __dirname; for (const testFile of fs.readdirSync(CASES_DIR)) { if (!/\.txt$/.test(testFile)) continue; - const testFileName = /^[^\.]*/.exec(testFile)[0]; + const testFileName = /^[^\.]*/.exec(testFile)![0]; describe(testFileName, () => { for (const { name, run } of runTestFile( fs.readFileSync(path.join(CASES_DIR, testFile), 'utf8'), diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a7ecf6ed6c871..8539211324979 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -182,10 +182,10 @@ importers: packages/@n8n/codemirror-lang: dependencies: '@codemirror/autocomplete': - specifier: ^6.15.0 + specifier: '*' version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.1)(@lezer/common@1.1.0) '@codemirror/language': - specifier: ^6.10.1 + specifier: '*' version: 6.10.1 '@lezer/highlight': specifier: ^1.2.0 From 0d2bcdaba244ce9efa70e1906288020cb471a898 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 16:54:48 +0200 Subject: [PATCH 09/14] include @n8n/codemirror-lang in frontend tasks --- .github/workflows/units-tests-reusable.yml | 2 +- package.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/units-tests-reusable.yml b/.github/workflows/units-tests-reusable.yml index 386612678c1e5..a6f7588ab9fbd 100644 --- a/.github/workflows/units-tests-reusable.yml +++ b/.github/workflows/units-tests-reusable.yml @@ -69,4 +69,4 @@ jobs: if: ${{ inputs.collectCoverage == 'true' }} uses: codecov/codecov-action@v3 with: - files: packages/@n8n/chat/coverage/cobertura-coverage.xml,packages/@n8n/nodes-langchain/coverage/cobertura-coverage.xml,packages/@n8n/permissions/coverage/cobertura-coverage.xml,packages/@n8n/client-oauth2/coverage/cobertura-coverage.xml,packages/cli/coverage/cobertura-coverage.xml,packages/core/coverage/cobertura-coverage.xml,packages/design-system/coverage/cobertura-coverage.xml,packages/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml + files: packages/@n8n/chat/coverage/cobertura-coverage.xml,packages/@n8n/nodes-langchain/coverage/cobertura-coverage.xml,packages/@n8n/permissions/coverage/cobertura-coverage.xml,packages/@n8n/client-oauth2/coverage/cobertura-coverage.xml,packages/cli/coverage/cobertura-coverage.xml,packages/core/coverage/cobertura-coverage.xml,packages/design-system/coverage/cobertura-coverage.xml,packages/@n8n/codemirror-lang/coverage/cobertura-coverage.xml,packages/editor-ui/coverage/cobertura-coverage.xml,packages/nodes-base/coverage/cobertura-coverage.xml,packages/workflow/coverage/cobertura-coverage.xml diff --git a/package.json b/package.json index 265951c9a1111..7a5b10853620f 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "scripts": { "preinstall": "node scripts/block-npm-install.js", "build": "turbo run build", - "build:backend": "pnpm --filter=!@n8n/chat --filter=!n8n-design-system --filter=!n8n-editor-ui build", - "build:frontend": "pnpm --filter=@n8n/chat --filter=n8n-design-system --filter=n8n-editor-ui build", + "build:backend": "pnpm --filter=!@n8n/chat --filter=!@n8n/codemirror-lang --filter=!n8n-design-system --filter=!n8n-editor-ui build", + "build:frontend": "pnpm --filter=@n8n/chat --filter=@n8n/codemirror-lang --filter=n8n-design-system --filter=n8n-editor-ui build", "typecheck": "turbo run typecheck", "dev": "turbo run dev --parallel --filter=!n8n-design-system --filter=!@n8n/chat", "dev:ai": "turbo run dev --parallel --filter=@n8n/nodes-langchain --filter=n8n --filter=n8n-core", @@ -26,9 +26,9 @@ "start:tunnel": "./packages/cli/bin/n8n start --tunnel", "start:windows": "cd packages/cli/bin && n8n", "test": "turbo run test", - "test:backend": "pnpm --filter=!@n8n/chat --filter=!n8n-design-system --filter=!n8n-editor-ui --filter=!n8n-nodes-base test", + "test:backend": "pnpm --filter=!@n8n/chat --filter=!@n8n/codemirror-lang --filter=!n8n-design-system --filter=!n8n-editor-ui --filter=!n8n-nodes-base test", "test:nodes": "pnpm --filter=n8n-nodes-base test", - "test:frontend": "pnpm --filter=@n8n/chat --filter=n8n-design-system --filter=n8n-editor-ui test", + "test:frontend": "pnpm --filter=@n8n/chat --filter=@n8n/codemirror-lang --filter=n8n-design-system --filter=n8n-editor-ui test", "watch": "turbo run watch --parallel", "webhook": "./packages/cli/bin/n8n webhook", "worker": "./packages/cli/bin/n8n worker", From dfdf315bc041908ea2090d988eef0351f2f253f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Mon, 8 Apr 2024 17:03:05 +0200 Subject: [PATCH 10/14] fix build --- packages/@n8n/codemirror-lang/.npmignore | 4 ---- packages/@n8n/codemirror-lang/package.json | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 packages/@n8n/codemirror-lang/.npmignore diff --git a/packages/@n8n/codemirror-lang/.npmignore b/packages/@n8n/codemirror-lang/.npmignore deleted file mode 100644 index 17afe552df0a9..0000000000000 --- a/packages/@n8n/codemirror-lang/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -src -test -tsconfig.json diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index b48c6aaaa0063..f5983e0cfa226 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -2,7 +2,7 @@ "name": "@n8n/codemirror-lang", "version": "0.3.0", "description": "n8n expression language support for CodeMirror 6", - "private": "true", + "private": true, "sideEffects": false, "main": "dist/index.js", "module": "src/index.ts", From ae2e6d34b7b79b19e41c159eb80fa8ba413bdb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 9 Apr 2024 13:47:24 +0200 Subject: [PATCH 11/14] address PR comments --- packages/@n8n/codemirror-lang/.eslintrc.cjs | 6 +-- packages/@n8n/codemirror-lang/.gitignore | 7 ---- packages/@n8n/codemirror-lang/README.md | 41 +------------------ packages/@n8n/codemirror-lang/package.json | 15 +++---- .../codemirror-lang/src/expressions/README.md | 26 ++++++++++++ .../{syntax.grammar => expressions.grammar} | 0 .../src/expressions/grammar.terms.ts | 4 ++ .../src/expressions/grammar.ts | 17 ++++++++ .../codemirror-lang/src/expressions/index.ts | 2 +- 9 files changed, 61 insertions(+), 57 deletions(-) delete mode 100644 packages/@n8n/codemirror-lang/.gitignore create mode 100644 packages/@n8n/codemirror-lang/src/expressions/README.md rename packages/@n8n/codemirror-lang/src/expressions/{syntax.grammar => expressions.grammar} (100%) create mode 100644 packages/@n8n/codemirror-lang/src/expressions/grammar.terms.ts create mode 100644 packages/@n8n/codemirror-lang/src/expressions/grammar.ts diff --git a/packages/@n8n/codemirror-lang/.eslintrc.cjs b/packages/@n8n/codemirror-lang/.eslintrc.cjs index b04a31c3aaef1..25eba96d79e57 100644 --- a/packages/@n8n/codemirror-lang/.eslintrc.cjs +++ b/packages/@n8n/codemirror-lang/.eslintrc.cjs @@ -4,11 +4,11 @@ const sharedOptions = require('@n8n_io/eslint-config/shared'); * @type {import('@types/eslint').ESLint.ConfigData} */ module.exports = { - extends: ['@n8n_io/eslint-config/frontend'], + extends: ['@n8n_io/eslint-config/base'], - ...sharedOptions(__dirname, 'frontend'), + ...sharedOptions(__dirname), ignorePatterns: [ - 'src/expressions/syntax*.ts' + 'src/expressions/grammar*.ts' ] }; diff --git a/packages/@n8n/codemirror-lang/.gitignore b/packages/@n8n/codemirror-lang/.gitignore deleted file mode 100644 index 67784737404a3..0000000000000 --- a/packages/@n8n/codemirror-lang/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/node_modules -package-lock.json -/dist -/src/*.js -/src/*.d.ts -src/expressions/syntax*.ts -.DS_Store diff --git a/packages/@n8n/codemirror-lang/README.md b/packages/@n8n/codemirror-lang/README.md index 963c937dab28d..f183d079ef268 100644 --- a/packages/@n8n/codemirror-lang/README.md +++ b/packages/@n8n/codemirror-lang/README.md @@ -1,42 +1,5 @@ # @n8n/codemirror-lang -n8n expression language support for CodeMirror 6. +Language support package for CodeMirror 6 in n8n -## Usage - -Install n8n expression language support: - -```sh -npm i @n8n/codemirror-lang -``` - -Install setup dependencies: - -```sh -npm i @codemirror/language @lezer/common @lezer/javascript -``` - -Set up language support: - -```js -import { parserWithMetaData as n8nParser } from '@n8n/codemirror-lang'; -import { LanguageSupport, LRLanguage } from '@codemirror/language'; -import { parseMixed } from '@lezer/common'; -import { parser as jsParser } from '@lezer/javascript'; - -const n8nPlusJsParser = n8nParser.configure({ - wrap: parseMixed((node) => { - if (node.type.isTop) return null; - - return node.name === 'Resolvable' - ? { parser: jsParser, overlay: (node) => node.type.name === 'Resolvable' } - : null; - }), -}); - -const n8nLanguage = LRLanguage.define({ parser: n8nPlusJsParser }); - -export function n8nExpressionLanguageSupport() { - return new LanguageSupport(n8nLanguage); -} -``` +[n8n Expression Language support](./src/expressions/README.md) diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index f5983e0cfa226..d9961d69f1649 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -1,7 +1,7 @@ { "name": "@n8n/codemirror-lang", "version": "0.3.0", - "description": "n8n expression language support for CodeMirror 6", + "description": "Language support package for CodeMirror 6 in n8n", "private": true, "sideEffects": false, "main": "dist/index.js", @@ -17,13 +17,14 @@ }, "scripts": { "clean": "rimraf dist .turbo", - "typecheck": "tsc", - "generate:expressions:grammar": "lezer-generator --typeScript --output src/expressions/syntax.ts src/expressions/syntax.grammar", - "build": "pnpm generate:expressions:grammar && tsc -p tsconfig.build.json", + "typecheck": "tsc --noEmit", + "generate:expressions:grammar": "lezer-generator --typeScript --output src/expressions/grammar.ts src/expressions/expressions.grammar", + "generate": "pnpm generate:expressions:grammar && pnpm format", + "build": "tsc -p tsconfig.build.json", "test": "jest", - "lint": "eslint . --ext .js,.ts,.vue --quiet", - "lintfix": "eslint . --ext .js,.ts,.vue --fix", - "format": "prettier --write src/" + "lint": "eslint . --ext .ts --quiet", + "lintfix": "eslint . --ext .ts --fix", + "format": "prettier --write --ignore-path ../../.prettierignore src test" }, "peerDependencies": { "@codemirror/autocomplete": "*", diff --git a/packages/@n8n/codemirror-lang/src/expressions/README.md b/packages/@n8n/codemirror-lang/src/expressions/README.md new file mode 100644 index 0000000000000..a758f62325b71 --- /dev/null +++ b/packages/@n8n/codemirror-lang/src/expressions/README.md @@ -0,0 +1,26 @@ +# n8n Expression language support + +## Usage + +```js +import { parserWithMetaData as n8nParser } from '@n8n/codemirror-lang'; +import { LanguageSupport, LRLanguage } from '@codemirror/language'; +import { parseMixed } from '@lezer/common'; +import { parser as jsParser } from '@lezer/javascript'; + +const n8nPlusJsParser = n8nParser.configure({ + wrap: parseMixed((node) => { + if (node.type.isTop) return null; + + return node.name === 'Resolvable' + ? { parser: jsParser, overlay: (node) => node.type.name === 'Resolvable' } + : null; + }), +}); + +const n8nLanguage = LRLanguage.define({ parser: n8nPlusJsParser }); + +export function n8nExpressionLanguageSupport() { + return new LanguageSupport(n8nLanguage); +} +``` diff --git a/packages/@n8n/codemirror-lang/src/expressions/syntax.grammar b/packages/@n8n/codemirror-lang/src/expressions/expressions.grammar similarity index 100% rename from packages/@n8n/codemirror-lang/src/expressions/syntax.grammar rename to packages/@n8n/codemirror-lang/src/expressions/expressions.grammar diff --git a/packages/@n8n/codemirror-lang/src/expressions/grammar.terms.ts b/packages/@n8n/codemirror-lang/src/expressions/grammar.terms.ts new file mode 100644 index 0000000000000..f3c6da0ea7be6 --- /dev/null +++ b/packages/@n8n/codemirror-lang/src/expressions/grammar.terms.ts @@ -0,0 +1,4 @@ +// This file was generated by lezer-generator. You probably shouldn't edit it. +export const Program = 1, + Plaintext = 2, + Resolvable = 3; diff --git a/packages/@n8n/codemirror-lang/src/expressions/grammar.ts b/packages/@n8n/codemirror-lang/src/expressions/grammar.ts new file mode 100644 index 0000000000000..881a1a71e08c0 --- /dev/null +++ b/packages/@n8n/codemirror-lang/src/expressions/grammar.ts @@ -0,0 +1,17 @@ +// This file was generated by lezer-generator. You probably shouldn't edit it. +import { LRParser } from '@lezer/lr'; +export const parser = LRParser.deserialize({ + version: 14, + states: "nQQOPOOOOOO'#Cb'#CbOOOO'#C`'#C`QQOPOOOOOO-E6^-E6^", + stateData: 'Y~OQPORPO~O', + goto: 'bVPPPPWP^QRORSRTQOR', + nodeNames: '⚠ Program Plaintext Resolvable', + maxTerm: 6, + skippedNodes: [0], + repeatNodeCount: 1, + tokenData: + "&U~RTO#ob#o#p!h#p;'Sb;'S;=`!]<%lOb~gTQ~O#ob#o#pv#p;'Sb;'S;=`!]<%lOb~yUO#ob#p;'Sb;'S;=`!]<%l~b~Ob~~!c~!`P;=`<%lb~!hOQ~~!kVO#ob#o#p#Q#p;'Sb;'S;=`!]<%l~b~Ob~~!c~#TWO#O#Q#O#P#m#P#q#Q#q#r%Z#r$IS#Q$Lj$Ml#Q;(b;(c%x;(c;(d&O~#pWO#O#Q#O#P#m#P#q#Q#q#r$Y#r$IS#Q$Lj$Ml#Q;(b;(c%x;(c;(d&O~$]TO#q#Q#q#r$l#r;'S#Q;'S;=`%r<%lO#Q~$qWR~O#O#Q#O#P#m#P#q#Q#q#r%Z#r$IS#Q$Lj$Ml#Q;(b;(c%x;(c;(d&O~%^TO#q#Q#q#r%m#r;'S#Q;'S;=`%r<%lO#Q~%rOR~~%uP;=`<%l#Q~%{P;NQ<%l#Q~&RP;=`;JY#Q", + tokenizers: [0], + topRules: { Program: [0, 1] }, + tokenPrec: 0, +}); diff --git a/packages/@n8n/codemirror-lang/src/expressions/index.ts b/packages/@n8n/codemirror-lang/src/expressions/index.ts index a4b89d895a440..a49e302b7c553 100644 --- a/packages/@n8n/codemirror-lang/src/expressions/index.ts +++ b/packages/@n8n/codemirror-lang/src/expressions/index.ts @@ -1,7 +1,7 @@ import { completeFromList } from '@codemirror/autocomplete'; import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; import { styleTags, tags as t } from '@lezer/highlight'; -import { parser } from './syntax'; +import { parser } from './grammar'; export const parserWithMetaData = parser.configure({ props: [ From 43e5b9354c59a1cbb88413f09192eaac8da894dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Wed, 10 Apr 2024 10:35:54 +0200 Subject: [PATCH 12/14] remove unused code --- packages/@n8n/codemirror-lang/package.json | 1 - .../codemirror-lang/src/expressions/index.ts | 20 +------------------ packages/@n8n/codemirror-lang/src/index.ts | 2 +- .../test/expressions/expressions.test.ts | 10 +++++++++- pnpm-lock.yaml | 3 --- 5 files changed, 11 insertions(+), 25 deletions(-) diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index d9961d69f1649..a3e3915a67421 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -27,7 +27,6 @@ "format": "prettier --write --ignore-path ../../.prettierignore src test" }, "peerDependencies": { - "@codemirror/autocomplete": "*", "@codemirror/language": "*", "@lezer/highlight": "*" }, diff --git a/packages/@n8n/codemirror-lang/src/expressions/index.ts b/packages/@n8n/codemirror-lang/src/expressions/index.ts index a49e302b7c553..869eace85363c 100644 --- a/packages/@n8n/codemirror-lang/src/expressions/index.ts +++ b/packages/@n8n/codemirror-lang/src/expressions/index.ts @@ -1,5 +1,4 @@ -import { completeFromList } from '@codemirror/autocomplete'; -import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; +import { foldNodeProp, foldInside } from '@codemirror/language'; import { styleTags, tags as t } from '@lezer/highlight'; import { parser } from './grammar'; @@ -16,20 +15,3 @@ export const parserWithMetaData = parser.configure({ }), ], }); - -export const n8nLanguage = LRLanguage.define({ - parser: parserWithMetaData, - languageData: { - commentTokens: { line: ';' }, - }, -}); - -const completions = n8nLanguage.data.of({ - autocomplete: completeFromList([ - // { label: "test", type: "keyword" }, // to add in future - ]), -}); - -export function n8nExpression() { - return new LanguageSupport(n8nLanguage, [completions]); -} diff --git a/packages/@n8n/codemirror-lang/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts index 78107ef6be3e5..ca3c4d20d3f95 100644 --- a/packages/@n8n/codemirror-lang/src/index.ts +++ b/packages/@n8n/codemirror-lang/src/index.ts @@ -1 +1 @@ -export { parserWithMetaData, n8nLanguage } from './expressions'; +export { parserWithMetaData } from './expressions'; diff --git a/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts b/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts index 0896bb580fdf5..803978ca2612e 100644 --- a/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts +++ b/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts @@ -1,9 +1,17 @@ import fs from 'fs'; import path from 'path'; +import { LRLanguage } from '@codemirror/language'; import { fileTests as runTestFile } from '@lezer/generator/dist/test'; -import { n8nLanguage } from '../../src/expressions/index'; +import { parserWithMetaData } from '../../src/expressions/index'; describe('expressions language', () => { + const n8nLanguage = LRLanguage.define({ + parser: parserWithMetaData, + languageData: { + commentTokens: { line: ';' }, + }, + }); + const CASES_DIR = __dirname; for (const testFile of fs.readdirSync(CASES_DIR)) { if (!/\.txt$/.test(testFile)) continue; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53e81533f27ed..fffafe69c280a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -180,9 +180,6 @@ importers: packages/@n8n/codemirror-lang: dependencies: - '@codemirror/autocomplete': - specifier: '*' - version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0) '@codemirror/language': specifier: '*' version: 6.10.1 From f0f79db37216589970bf7cab2f08c3db6ba68556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 10 Apr 2024 12:14:22 +0200 Subject: [PATCH 13/14] fix(editor): Fix removal in codemirror-lang package --- .../@n8n/codemirror-lang/src/expressions/index.ts | 13 ++++++++++++- packages/@n8n/codemirror-lang/src/index.ts | 2 +- .../test/expressions/expressions.test.ts | 10 +--------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/@n8n/codemirror-lang/src/expressions/index.ts b/packages/@n8n/codemirror-lang/src/expressions/index.ts index 869eace85363c..929cb32cd43e9 100644 --- a/packages/@n8n/codemirror-lang/src/expressions/index.ts +++ b/packages/@n8n/codemirror-lang/src/expressions/index.ts @@ -1,4 +1,4 @@ -import { foldNodeProp, foldInside } from '@codemirror/language'; +import { LRLanguage, LanguageSupport, foldNodeProp, foldInside } from '@codemirror/language'; import { styleTags, tags as t } from '@lezer/highlight'; import { parser } from './grammar'; @@ -15,3 +15,14 @@ export const parserWithMetaData = parser.configure({ }), ], }); + +export const n8nLanguage = LRLanguage.define({ + parser: parserWithMetaData, + languageData: { + commentTokens: { line: ';' }, + }, +}); + +export function n8nExpression() { + return new LanguageSupport(n8nLanguage); +} diff --git a/packages/@n8n/codemirror-lang/src/index.ts b/packages/@n8n/codemirror-lang/src/index.ts index ca3c4d20d3f95..78107ef6be3e5 100644 --- a/packages/@n8n/codemirror-lang/src/index.ts +++ b/packages/@n8n/codemirror-lang/src/index.ts @@ -1 +1 @@ -export { parserWithMetaData } from './expressions'; +export { parserWithMetaData, n8nLanguage } from './expressions'; diff --git a/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts b/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts index 803978ca2612e..0896bb580fdf5 100644 --- a/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts +++ b/packages/@n8n/codemirror-lang/test/expressions/expressions.test.ts @@ -1,17 +1,9 @@ import fs from 'fs'; import path from 'path'; -import { LRLanguage } from '@codemirror/language'; import { fileTests as runTestFile } from '@lezer/generator/dist/test'; -import { parserWithMetaData } from '../../src/expressions/index'; +import { n8nLanguage } from '../../src/expressions/index'; describe('expressions language', () => { - const n8nLanguage = LRLanguage.define({ - parser: parserWithMetaData, - languageData: { - commentTokens: { line: ';' }, - }, - }); - const CASES_DIR = __dirname; for (const testFile of fs.readdirSync(CASES_DIR)) { if (!/\.txt$/.test(testFile)) continue; From e5c5a35cbe3102eed5fcdbfefc1b1d227c5497c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Fri, 10 May 2024 17:24:57 +0200 Subject: [PATCH 14/14] fix(editor): Fix e2e for `codemirror-lang` package migration (#9362) --- packages/@n8n/codemirror-lang/package.json | 3 +- .../src/expressions/grammar.ts | 1 + packages/editor-ui/package.json | 18 +- pnpm-lock.yaml | 190 ++++++++---------- 4 files changed, 96 insertions(+), 116 deletions(-) diff --git a/packages/@n8n/codemirror-lang/package.json b/packages/@n8n/codemirror-lang/package.json index a3e3915a67421..a8450b419d06c 100644 --- a/packages/@n8n/codemirror-lang/package.json +++ b/packages/@n8n/codemirror-lang/package.json @@ -28,7 +28,8 @@ }, "peerDependencies": { "@codemirror/language": "*", - "@lezer/highlight": "*" + "@lezer/highlight": "*", + "@lezer/lr": "^1.4.0" }, "devDependencies": { "@lezer/generator": "^1.7.0" diff --git a/packages/@n8n/codemirror-lang/src/expressions/grammar.ts b/packages/@n8n/codemirror-lang/src/expressions/grammar.ts index 881a1a71e08c0..d1233ba92262e 100644 --- a/packages/@n8n/codemirror-lang/src/expressions/grammar.ts +++ b/packages/@n8n/codemirror-lang/src/expressions/grammar.ts @@ -1,5 +1,6 @@ // This file was generated by lezer-generator. You probably shouldn't edit it. import { LRParser } from '@lezer/lr'; + export const parser = LRParser.deserialize({ version: 14, states: "nQQOPOOOOOO'#Cb'#CbOOOO'#C`'#C`QQOPOOOOOO-E6^-E6^", diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 979e85933e328..b2cdc81a99d98 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -26,22 +26,22 @@ "test:dev": "vitest" }, "dependencies": { - "@codemirror/autocomplete": "^6.15.0", - "@codemirror/commands": "^6.3.3", - "@codemirror/lang-javascript": "^6.2.2", + "@codemirror/autocomplete": "^6.11.1", + "@codemirror/commands": "^6.3.2", + "@codemirror/lang-javascript": "^6.2.1", "@codemirror/lang-json": "^6.0.1", - "@codemirror/lang-python": "^6.1.5", - "@codemirror/language": "^6.10.1", - "@codemirror/lint": "^6.5.0", - "@codemirror/state": "^6.4.1", - "@codemirror/view": "^6.26.1", + "@codemirror/lang-python": "^6.1.3", + "@codemirror/language": "^6.9.3", + "@codemirror/lint": "^6.4.2", + "@codemirror/state": "^6.3.3", + "@codemirror/view": "^6.22.3", "@fontsource/open-sans": "^4.5.0", "@jsplumb/browser-ui": "^5.13.2", "@jsplumb/common": "^5.13.2", "@jsplumb/connector-bezier": "^5.13.2", "@jsplumb/core": "^5.13.2", "@jsplumb/util": "^5.13.2", - "@lezer/common": "^1.1.0", + "@lezer/common": "^1.0.4", "@n8n/chat": "workspace:*", "@n8n/codemirror-lang-sql": "^1.0.2", "@n8n/permissions": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5656583a6037f..d2888cfe8070c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -190,10 +190,13 @@ importers: dependencies: '@codemirror/language': specifier: '*' - version: 6.10.1 + version: 6.9.3 '@lezer/highlight': specifier: '*' version: 1.1.1 + '@lezer/lr': + specifier: ^1.4.0 + version: 1.4.0 devDependencies: '@lezer/generator': specifier: ^1.7.0 @@ -1067,32 +1070,32 @@ importers: packages/editor-ui: dependencies: '@codemirror/autocomplete': - specifier: ^6.15.0 - version: 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0) + specifier: ^6.11.1 + version: 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) '@codemirror/commands': - specifier: ^6.3.3 - version: 6.3.3 + specifier: ^6.3.2 + version: 6.3.2 '@codemirror/lang-javascript': - specifier: ^6.2.2 - version: 6.2.2 + specifier: ^6.2.1 + version: 6.2.1 '@codemirror/lang-json': specifier: ^6.0.1 version: 6.0.1 '@codemirror/lang-python': - specifier: ^6.1.5 - version: 6.1.5(@codemirror/view@6.26.2) + specifier: ^6.1.3 + version: 6.1.3(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) '@codemirror/language': - specifier: ^6.10.1 - version: 6.10.1 + specifier: ^6.9.3 + version: 6.9.3 '@codemirror/lint': - specifier: ^6.5.0 - version: 6.5.0 + specifier: ^6.4.2 + version: 6.4.2 '@codemirror/state': - specifier: ^6.4.1 - version: 6.4.1 + specifier: ^6.3.3 + version: 6.3.3 '@codemirror/view': - specifier: ^6.26.1 - version: 6.26.2 + specifier: ^6.22.3 + version: 6.22.3 '@fontsource/open-sans': specifier: ^4.5.0 version: 4.5.12 @@ -1124,7 +1127,7 @@ importers: specifier: ^5.13.2 version: 5.13.2 '@lezer/common': - specifier: ^1.1.0 + specifier: ^1.0.4 version: 1.1.0 '@n8n/chat': specifier: workspace:* @@ -1134,7 +1137,7 @@ importers: version: link:../@n8n/codemirror-lang '@n8n/codemirror-lang-sql': specifier: ^1.0.2 - version: 1.0.2(@codemirror/view@6.26.2)(@lezer/common@1.1.0) + version: 1.0.2(@codemirror/view@6.22.3)(@lezer/common@1.1.0) '@n8n/permissions': specifier: workspace:* version: link:../@n8n/permissions @@ -4640,63 +4643,49 @@ packages: - react dev: true - /@codemirror/autocomplete@6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0): - resolution: {integrity: sha512-G2Zm0mXznxz97JhaaOdoEG2cVupn4JjPaS4AcNvZzhOsnnG9YVN68VzfoUw6dYTsIxT6a/cmoFEN47KAWhXaOg==} + /@codemirror/autocomplete@6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0): + resolution: {integrity: sha512-L5UInv8Ffd6BPw0P3EF7JLYAMeEbclY7+6Q11REt8vhih8RuLreKtPy/xk8wPxs4EQgYqzI7cdgpiYwWlbS/ow==} peerDependencies: '@codemirror/language': ^6.0.0 '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 '@lezer/common': ^1.0.0 dependencies: - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 + '@codemirror/language': 6.9.3 + '@codemirror/state': 6.3.3 + '@codemirror/view': 6.22.3 '@lezer/common': 1.1.0 dev: false - /@codemirror/autocomplete@6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.2.1): - resolution: {integrity: sha512-G2Zm0mXznxz97JhaaOdoEG2cVupn4JjPaS4AcNvZzhOsnnG9YVN68VzfoUw6dYTsIxT6a/cmoFEN47KAWhXaOg==} - peerDependencies: - '@codemirror/language': ^6.0.0 - '@codemirror/state': ^6.0.0 - '@codemirror/view': ^6.0.0 - '@lezer/common': ^1.0.0 - dependencies: - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 - '@lezer/common': 1.2.1 - dev: false - - /@codemirror/commands@6.3.3: - resolution: {integrity: sha512-dO4hcF0fGT9tu1Pj1D2PvGvxjeGkbC6RGcZw6Qs74TH+Ed1gw98jmUgd2axWvIZEqTeTuFrg1lEB1KV6cK9h1A==} + /@codemirror/commands@6.3.2: + resolution: {integrity: sha512-tjoi4MCWDNxgIpoLZ7+tezdS9OEB6pkiDKhfKx9ReJ/XBcs2G2RXIu+/FxXBlWsPTsz6C9q/r4gjzrsxpcnqCQ==} dependencies: - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 + '@codemirror/language': 6.9.3 + '@codemirror/state': 6.3.3 + '@codemirror/view': 6.22.3 '@lezer/common': 1.1.0 dev: false - /@codemirror/lang-css@6.0.1(@codemirror/view@6.26.2)(@lezer/common@1.1.0): + /@codemirror/lang-css@6.0.1(@codemirror/view@6.22.3)(@lezer/common@1.1.0): resolution: {integrity: sha512-rlLq1Dt0WJl+2epLQeAsfqIsx3lGu4HStHCJu95nGGuz2P2fNugbU3dQYafr2VRjM4eMC9HviI6jvS98CNtG5w==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0) - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 + '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/language': 6.9.3 + '@codemirror/state': 6.3.3 '@lezer/css': 1.1.1 transitivePeerDependencies: - '@codemirror/view' - '@lezer/common' dev: false - /@codemirror/lang-javascript@6.2.2: - resolution: {integrity: sha512-VGQfY+FCc285AhWuwjYxQyUQcYurWlxdKYT4bqwr3Twnd5wP5WSeu52t4tvvuWmljT4EmgEgZCqSieokhtY8hg==} + /@codemirror/lang-javascript@6.2.1: + resolution: {integrity: sha512-jlFOXTejVyiQCW3EQwvKH0m99bUYIw40oPmFjSX2VS78yzfe0HELZ+NEo9Yfo1MkGRpGlj3Gnu4rdxV1EnAs5A==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0) - '@codemirror/language': 6.10.1 - '@codemirror/lint': 6.5.0 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 + '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/language': 6.9.3 + '@codemirror/lint': 6.4.2 + '@codemirror/state': 6.3.3 + '@codemirror/view': 6.22.3 '@lezer/common': 1.1.0 '@lezer/javascript': 1.0.2 dev: false @@ -4704,49 +4693,49 @@ packages: /@codemirror/lang-json@6.0.1: resolution: {integrity: sha512-+T1flHdgpqDDlJZ2Lkil/rLiRy684WMLc74xUnjJH48GQdfJo/pudlTRreZmKwzP8/tGdKf83wlbAdOCzlJOGQ==} dependencies: - '@codemirror/language': 6.10.1 + '@codemirror/language': 6.9.3 '@lezer/json': 1.0.0 dev: false - /@codemirror/lang-python@6.1.5(@codemirror/view@6.26.2): - resolution: {integrity: sha512-hCm+8X6wrnXJCGf+QhmFu1AXkdTVG7dHy0Ly6SI1N3SRPptaMvwX6oNQonOXOMPvmcjiB0xq342KAxX3BYpijw==} + /@codemirror/lang-python@6.1.3(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0): + resolution: {integrity: sha512-S9w2Jl74hFlD5nqtUMIaXAq9t5WlM0acCkyuQWUUSvZclk1sV+UfnpFiZzuZSG+hfEaOmxKR5UxY/Uxswn7EhQ==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.2.1) - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 - '@lezer/common': 1.2.1 + '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/language': 6.9.3 '@lezer/python': 1.1.5 transitivePeerDependencies: + - '@codemirror/state' - '@codemirror/view' + - '@lezer/common' dev: false - /@codemirror/language@6.10.1: - resolution: {integrity: sha512-5GrXzrhq6k+gL5fjkAwt90nYDmjlzTIJV8THnxNFtNKWotMIlzzN+CpqxqwXOECnUdOndmSeWntVrVcv5axWRQ==} + /@codemirror/language@6.9.3: + resolution: {integrity: sha512-qq48pYzoi6ldYWV/52+Z9Ou6QouVI+8YwvxFbUypI33NbjG2UeRHKENRyhwljTTiOqjQ33FjyZj6EREQ9apAOQ==} dependencies: - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 + '@codemirror/state': 6.3.3 + '@codemirror/view': 6.22.3 '@lezer/common': 1.1.0 '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 style-mod: 4.1.0 dev: false - /@codemirror/lint@6.5.0: - resolution: {integrity: sha512-+5YyicIaaAZKU8K43IQi8TBy6mF6giGeWAH7N96Z5LC30Wm5JMjqxOYIE9mxwMG1NbhT2mA3l9hA4uuKUM3E5g==} + /@codemirror/lint@6.4.2: + resolution: {integrity: sha512-wzRkluWb1ptPKdzlsrbwwjYCPLgzU6N88YBAmlZi8WFyuiEduSd05MnJYNogzyc8rPK7pj6m95ptUApc8sHKVA==} dependencies: - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 + '@codemirror/state': 6.3.3 + '@codemirror/view': 6.22.3 crelt: 1.0.5 dev: false - /@codemirror/state@6.4.1: - resolution: {integrity: sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A==} + /@codemirror/state@6.3.3: + resolution: {integrity: sha512-0wufKcTw2dEwEaADajjHf6hBy1sh3M6V0e+q4JKIhLuiMSe5td5HOWpUdvKth1fT1M9VYOboajoBHpkCd7PG7A==} dev: false - /@codemirror/view@6.26.2: - resolution: {integrity: sha512-j6V48PlFC/O7ERAR5vRW5QKDdchzmyyfojDdt+zPsB0YXoWgcjlC1IWjmlYfx08aQZ3HN5BtALcgGgtSKGMe7A==} + /@codemirror/view@6.22.3: + resolution: {integrity: sha512-rqnq+Zospwoi3x1vZ8BGV1MlRsaGljX+6qiGYmIpJ++M+LCC+wjfDaPklhwpWSgv7pr/qx29KiAKQBH5+DOn4w==} dependencies: - '@codemirror/state': 6.4.1 + '@codemirror/state': 6.3.3 style-mod: 4.1.0 w3c-keyname: 2.2.6 dev: false @@ -6450,15 +6439,11 @@ packages: /@lezer/common@1.1.0: resolution: {integrity: sha512-XPIN3cYDXsoJI/oDWoR2tD++juVrhgIago9xyKhZ7IhGlzdDM9QgC8D8saKNCz5pindGcznFr2HBSsEQSWnSjw==} - /@lezer/common@1.2.1: - resolution: {integrity: sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==} - dev: false - /@lezer/css@1.1.1: resolution: {integrity: sha512-mSjx+unLLapEqdOYDejnGBokB5+AiJKZVclmud0MKQOKx3DLJ5b5VTCstgDDknR6iIV4gVrN6euzsCnj0A2gQA==} dependencies: '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 dev: false /@lezer/generator@1.7.0: @@ -6480,40 +6465,33 @@ packages: dependencies: '@lezer/common': 1.1.0 '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 dev: false /@lezer/javascript@1.0.2: resolution: {integrity: sha512-IjOVeIRhM8IuafWNnk+UzRz7p4/JSOKBNINLYLsdSGuJS9Ju7vFdc82AlTt0jgtV5D8eBZf4g0vK4d3ttBNz7A==} dependencies: '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 dev: false /@lezer/json@1.0.0: resolution: {integrity: sha512-zbAuUY09RBzCoCA3lJ1+ypKw5WSNvLqGMtasdW6HvVOqZoCpPr8eWrsGnOVWGKGn8Rh21FnrKRVlJXrGAVUqRw==} dependencies: '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 - dev: false - - /@lezer/lr@1.2.3: - resolution: {integrity: sha512-qpB7rBzH8f6Mzjv2AVZRahcm+2Cf7nbIH++uXbvVOL1yIRvVWQ3HAM/saeBLCyz/togB7LGo76qdJYL1uKQlqA==} - dependencies: - '@lezer/common': 1.1.0 + '@lezer/lr': 1.4.0 dev: false /@lezer/lr@1.4.0: resolution: {integrity: sha512-Wst46p51km8gH0ZUmeNrtpRYmdlRHUpN1DQd3GFAyKANi8WVz8c2jHYTf1CVScFaCjQw1iO3ZZdqGDxQPRErTg==} dependencies: '@lezer/common': 1.1.0 - dev: true /@lezer/python@1.1.5: resolution: {integrity: sha512-h0DVr6IfrmKUbTc5PeetaC87IZYoHyn5JogsVYW5mRDpVRyEsvaLBMLyEN4Ufc2BKp1c9y2Pkr8ZNLxS8dTLsQ==} dependencies: '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 dev: false /@mdx-js/react@3.0.1(@types/react@18.0.27)(react@18.2.0): @@ -6630,14 +6608,14 @@ packages: dev: false optional: true - /@n8n/codemirror-lang-sql@1.0.2(@codemirror/view@6.26.2)(@lezer/common@1.1.0): + /@n8n/codemirror-lang-sql@1.0.2(@codemirror/view@6.22.3)(@lezer/common@1.1.0): resolution: {integrity: sha512-sOf/KyewSu3Ikij0CkRtzJJDhRDZcwNCEYl8UdH4U/riL0/XZGcBD7MYofCCcKszanJZiEWRZ2KU1sRp234iMg==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0) - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 + '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/language': 6.9.3 + '@codemirror/state': 6.3.3 '@lezer/highlight': 1.1.1 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 transitivePeerDependencies: - '@codemirror/view' - '@lezer/common' @@ -9284,7 +9262,7 @@ packages: ts-dedent: 2.2.0 type-fest: 2.19.0 vue: 3.4.21(typescript@5.4.2) - vue-component-type-helpers: 2.0.16 + vue-component-type-helpers: 2.0.17 transitivePeerDependencies: - encoding - supports-color @@ -12411,17 +12389,17 @@ packages: /codemirror-lang-html-n8n@1.0.0: resolution: {integrity: sha512-ofNP6VTDGJ5rue+kTCZlDZdF1PnE0sl2cAkfrsCAd5MlBgDmqTwuFJIkTI6KXOJXs0ucdTYH6QLhy9BSW7EaOQ==} dependencies: - '@codemirror/autocomplete': 6.15.0(@codemirror/language@6.10.1)(@codemirror/state@6.4.1)(@codemirror/view@6.26.2)(@lezer/common@1.1.0) - '@codemirror/lang-css': 6.0.1(@codemirror/view@6.26.2)(@lezer/common@1.1.0) - '@codemirror/lang-javascript': 6.2.2 - '@codemirror/language': 6.10.1 - '@codemirror/state': 6.4.1 - '@codemirror/view': 6.26.2 + '@codemirror/autocomplete': 6.11.1(@codemirror/language@6.9.3)(@codemirror/state@6.3.3)(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/lang-css': 6.0.1(@codemirror/view@6.22.3)(@lezer/common@1.1.0) + '@codemirror/lang-javascript': 6.2.1 + '@codemirror/language': 6.9.3 + '@codemirror/state': 6.3.3 + '@codemirror/view': 6.22.3 '@lezer/common': 1.1.0 '@lezer/css': 1.1.1 '@lezer/highlight': 1.1.1 '@lezer/html': 1.3.0 - '@lezer/lr': 1.2.3 + '@lezer/lr': 1.4.0 dev: false /cohere-ai@6.2.2: @@ -24366,8 +24344,8 @@ packages: resolution: {integrity: sha512-0vOfAtI67UjeO1G6UiX5Kd76CqaQ67wrRZiOe7UAb9Jm6GzlUr/fC7CV90XfwapJRjpCMaZFhv1V0ajWRmE9Dg==} dev: true - /vue-component-type-helpers@2.0.16: - resolution: {integrity: sha512-qisL/iAfdO++7w+SsfYQJVPj6QKvxp4i1MMxvsNO41z/8zu3KuAw9LkhKUfP/kcOWGDxESp+pQObWppXusejCA==} + /vue-component-type-helpers@2.0.17: + resolution: {integrity: sha512-2car49m8ciqg/JjgMBkx7o/Fd2A7fHESxNqL/2vJYFLXm4VwYO4yH0rexOi4a35vwNgDyvt17B07Vj126l9rAQ==} dev: true /vue-demi@0.14.5(vue@3.4.21):