From afbe884dadaedf4aa05724dc4680c71acee9eb92 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, 25 Sep 2024 12:37:51 +0200 Subject: [PATCH 01/31] refactor(core): Load dotenv as early as possible (no-changelog) (#10948) --- packages/cli/bin/n8n | 7 +++++++ packages/cli/src/config/index.ts | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/cli/bin/n8n b/packages/cli/bin/n8n index 6eca060851..c4b593ccc9 100755 --- a/packages/cli/bin/n8n +++ b/packages/cli/bin/n8n @@ -43,6 +43,13 @@ require('express-async-errors'); require('source-map-support').install(); require('reflect-metadata'); +// Skip loading dotenv in e2e tests. +// Also, do not use `inE2ETests` from constants here, because that'd end up code that might read from `process.env` before the values are loaded from an `.env` file. +if (process.env.E2E_TESTS !== 'true') { + // Loading dotenv early ensures that `process.env` is up-to-date everywhere in code + require('dotenv').config(); +} + if (process.env.NODEJS_PREFER_IPV4 === 'true') { require('dns').setDefaultResultOrder('ipv4first'); } diff --git a/packages/cli/src/config/index.ts b/packages/cli/src/config/index.ts index 6661057b9a..0c799aa8a5 100644 --- a/packages/cli/src/config/index.ts +++ b/packages/cli/src/config/index.ts @@ -1,6 +1,5 @@ import { GlobalConfig } from '@n8n/config'; import convict from 'convict'; -import dotenv from 'dotenv'; import { flatten } from 'flat'; import { readFileSync } from 'fs'; import merge from 'lodash/merge'; @@ -22,8 +21,6 @@ if (inE2ETests) { process.env.N8N_PUBLIC_API_DISABLED = 'true'; process.env.SKIP_STATISTICS_EVENTS = 'true'; process.env.N8N_SECURE_COOKIE = 'false'; -} else { - dotenv.config(); } // Load schema after process.env has been overwritten From 62159bd71c9a0303b597a68113e0ac50473ee8d4 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, 25 Sep 2024 13:15:44 +0200 Subject: [PATCH 02/31] fix(MySQL Node): Fix "Maximum call stack size exceeded" error when handling a large number of rows (#10965) --- packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts | 2 +- packages/nodes-base/nodes/MySql/v2/helpers/utils.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts b/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts index 17923377fb..6209111b67 100644 --- a/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts +++ b/packages/nodes-base/nodes/MySql/v1/MySqlV1.node.ts @@ -327,7 +327,7 @@ export class MySqlV1 implements INodeType { { itemData: { item: index } }, ); - collection.push(...executionData); + collection = collection.concat(executionData); return collection; }, diff --git a/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts b/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts index 1e15ce71bb..6e50ae3eb1 100644 --- a/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts @@ -141,7 +141,7 @@ export function prepareOutput( ) => NodeExecutionWithMetadata[], itemData: IPairedItemData | IPairedItemData[], ) { - const returnData: INodeExecutionData[] = []; + let returnData: INodeExecutionData[] = []; if (options.detailedOutput) { response.forEach((entry, index) => { @@ -154,7 +154,7 @@ export function prepareOutput( itemData, }); - returnData.push(...executionData); + returnData = returnData.concat(executionData); }); } else { response @@ -164,7 +164,7 @@ export function prepareOutput( itemData: Array.isArray(itemData) ? itemData[index] : itemData, }); - returnData.push(...executionData); + returnData = returnData.concat(executionData); }); } From 9bd247f06b7258e11862ece187c4f94d02bb865c Mon Sep 17 00:00:00 2001 From: Alex Grozav Date: Wed, 25 Sep 2024 15:00:06 +0300 Subject: [PATCH 03/31] fix(editor): Set correct connection type when auto-adding nodes in new canvas (no-changelog) (#10966) --- packages/editor-ui/src/views/NodeView.v2.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.v2.vue b/packages/editor-ui/src/views/NodeView.v2.vue index 70efa68177..1c0f9b8300 100644 --- a/packages/editor-ui/src/views/NodeView.v2.vue +++ b/packages/editor-ui/src/views/NodeView.v2.vue @@ -859,6 +859,7 @@ async function onAddNodesAndConnections( const mappedConnections: CanvasConnectionCreateData[] = connections.map(({ from, to }) => { const fromNode = editableWorkflow.value.nodes[offsetIndex + from.nodeIndex]; const toNode = editableWorkflow.value.nodes[offsetIndex + to.nodeIndex]; + const type = from.type ?? to.type ?? NodeConnectionType.Main; return { source: fromNode.id, @@ -866,11 +867,11 @@ async function onAddNodesAndConnections( data: { source: { index: from.outputIndex ?? 0, - type: NodeConnectionType.Main, + type, }, target: { index: to.inputIndex ?? 0, - type: NodeConnectionType.Main, + type, }, }, }; From 9e18a31208809ea6e7b91158b91f6052113c85ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 14:33:47 +0200 Subject: [PATCH 04/31] :rocket: Release 1.61.0 (#10968) Co-authored-by: cstuncsik <5410822+cstuncsik@users.noreply.github.com> --- CHANGELOG.md | 43 ++++++++++++++++++++++ package.json | 2 +- packages/@n8n/api-types/package.json | 2 +- packages/@n8n/benchmark/package.json | 2 +- packages/@n8n/config/package.json | 2 +- packages/@n8n/nodes-langchain/package.json | 2 +- packages/cli/package.json | 2 +- packages/core/package.json | 2 +- packages/design-system/package.json | 2 +- packages/editor-ui/package.json | 2 +- packages/node-dev/package.json | 2 +- packages/nodes-base/package.json | 2 +- packages/workflow/package.json | 2 +- 13 files changed, 55 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fba31697f5..219c7b1726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,46 @@ +# [1.61.0](https://github.com/n8n-io/n8n/compare/n8n@1.60.0...n8n@1.61.0) (2024-09-25) + + +### Bug Fixes + +* **core:** Add executionData to expressions in pagination code ([#10926](https://github.com/n8n-io/n8n/issues/10926)) ([eac103e](https://github.com/n8n-io/n8n/commit/eac103e367d59a532b9ba12db78a0dd10aee62fb)) +* **core:** Fix webhook binary data max size configuration ([#10897](https://github.com/n8n-io/n8n/issues/10897)) ([693fb7e](https://github.com/n8n-io/n8n/commit/693fb7e580b7e030c86977bff6d319bbee4fcd62)) +* **core:** Remove subworkflow license check ([#10893](https://github.com/n8n-io/n8n/issues/10893)) ([0290e38](https://github.com/n8n-io/n8n/commit/0290e38f990275074eb7e7ccd0b41f1ae0215dd2)) +* **editor:** Credentials scopes and n8n scopes mix up ([#10930](https://github.com/n8n-io/n8n/issues/10930)) ([e069608](https://github.com/n8n-io/n8n/commit/e0696080227aee7ccb50d51a82873e8a1ba4667d)) +* **editor:** Fix design system form component sizing ([#10961](https://github.com/n8n-io/n8n/issues/10961)) ([cf153ea](https://github.com/n8n-io/n8n/commit/cf153ea085165115ee523fbb1bd32080dde47eda)) +* **editor:** Fix modal overflow when AI is enabled in code node ([#10887](https://github.com/n8n-io/n8n/issues/10887)) ([f9f303f](https://github.com/n8n-io/n8n/commit/f9f303f562084db8c8956da267680b1f935aa2df)) +* **editor:** Fix source control push modal checkboxes ([#10910](https://github.com/n8n-io/n8n/issues/10910)) ([8db8817](https://github.com/n8n-io/n8n/commit/8db88178511749b19a5878816ef062092fd9f2be)) +* **editor:** Fix styling and typography in AI Assistant chat ([#10895](https://github.com/n8n-io/n8n/issues/10895)) ([57ff3cc](https://github.com/n8n-io/n8n/commit/57ff3cc27b9470bfbe2486c3c1831c57f5a4075f)) +* **editor:** Prevent clipboard xss injection ([#10894](https://github.com/n8n-io/n8n/issues/10894)) ([e20ab59](https://github.com/n8n-io/n8n/commit/e20ab59c1dcf9da19a30268ce19930bfa7e38992)) +* **editor:** Prevent node name input in NDV to expand unnecessarily ([#10922](https://github.com/n8n-io/n8n/issues/10922)) ([a2237d1](https://github.com/n8n-io/n8n/commit/a2237d128ff6a4d65cd30325b6b9d9b765ca7be6)) +* **editor:** Update gird size when opening credentials support chat ([#10882](https://github.com/n8n-io/n8n/issues/10882)) ([b86fd80](https://github.com/n8n-io/n8n/commit/b86fd80fc9fe06011367ca04a75e4b52533db1fe)) +* **editor:** Use `:focus-visible` instead for `:focus` for buttons ([#10921](https://github.com/n8n-io/n8n/issues/10921)) ([bf28d09](https://github.com/n8n-io/n8n/commit/bf28d0965c46620a106c87037bafd2cf936f1050)) +* **editor:** Use correct output for connected nodes in schema view ([#10928](https://github.com/n8n-io/n8n/issues/10928)) ([ad60d49](https://github.com/n8n-io/n8n/commit/ad60d49b4251138a7c69cb5e9f00c3ef875486e0)) +* Enable Assistant on other credential views ([#10931](https://github.com/n8n-io/n8n/issues/10931)) ([557db9c](https://github.com/n8n-io/n8n/commit/557db9c170a89447ec9cc14aa1af51e5fd11dd92)) +* Ensure user id for early track events ([#10885](https://github.com/n8n-io/n8n/issues/10885)) ([23c09ea](https://github.com/n8n-io/n8n/commit/23c09eae4223545c717270a5cd305d2e57e1ad5b)) +* **Google Sheets Node:** Insert data if sheet is empty instead of error ([#10942](https://github.com/n8n-io/n8n/issues/10942)) ([c75990e](https://github.com/n8n-io/n8n/commit/c75990e0632c581384542610a886ef89621a9403)) +* Hide assistant button when showing Click to connect ([#10932](https://github.com/n8n-io/n8n/issues/10932)) ([d74cff2](https://github.com/n8n-io/n8n/commit/d74cff20301f285588f93207f29660d25fdbc8da)) +* **HTTP Request Node:** Do not modify request object when sanitizing message for UI ([#10923](https://github.com/n8n-io/n8n/issues/10923)) ([8cc10cc](https://github.com/n8n-io/n8n/commit/8cc10cc2c1869b9abcafd157e41be65ce2b6f499)) +* **MQTT Node:** Close connection if connection attempt fails ([#10873](https://github.com/n8n-io/n8n/issues/10873)) ([ee7147c](https://github.com/n8n-io/n8n/commit/ee7147c6b3b053ac8fc317319ab257204e599f16)) +* **MySQL Node:** Fix "Maximum call stack size exceeded" error when handling a large number of rows ([#10965](https://github.com/n8n-io/n8n/issues/10965)) ([62159bd](https://github.com/n8n-io/n8n/commit/62159bd71c9a0303b597a68113e0ac50473ee8d4)) +* **Notion Node:** Allow UUID v8 in notion id checks ([#10938](https://github.com/n8n-io/n8n/issues/10938)) ([46beda0](https://github.com/n8n-io/n8n/commit/46beda05f6771c31bcf0b6a781976d8261079a66)) + + +### Features + +* **Brandfetch Node:** Update to use new API ([#10877](https://github.com/n8n-io/n8n/issues/10877)) ([08ba9a3](https://github.com/n8n-io/n8n/commit/08ba9a36a43b6c84f69bb04fa4d6419a7a4adddf)) +* **editor:** Setup Sentry integration ([#10945](https://github.com/n8n-io/n8n/issues/10945)) ([6de4dff](https://github.com/n8n-io/n8n/commit/6de4dfff87e4da888567081a9928d9682bdea11d)) +* **editor:** Show a notice before deleting annotated executions ([#10934](https://github.com/n8n-io/n8n/issues/10934)) ([dcc1c72](https://github.com/n8n-io/n8n/commit/dcc1c72fc4b56c3252183541b22da801804d4f79)) +* Page size 1 option ([#10957](https://github.com/n8n-io/n8n/issues/10957)) ([bdc0622](https://github.com/n8n-io/n8n/commit/bdc0622f59e98c9e6c542f5cb59a2dbd9008ba96)) +* **Slack Node:** Add option to hide workflow link on message update ([#10927](https://github.com/n8n-io/n8n/issues/10927)) ([422c946](https://github.com/n8n-io/n8n/commit/422c9463c8d931a728615a1fe5a10f05a96ecaa2)) + + +### Performance Improvements + +* **editor:** Use virtual scrolling in `RunDataJson.vue` ([#10838](https://github.com/n8n-io/n8n/issues/10838)) ([f5474ff](https://github.com/n8n-io/n8n/commit/f5474ff79198a2f5a145d0a9df1bb651ea677ec5)) + + + # [1.60.0](https://github.com/n8n-io/n8n/compare/n8n@1.59.0...n8n@1.60.0) (2024-09-18) diff --git a/package.json b/package.json index 589b515f44..8253d86dfd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n-monorepo", - "version": "1.60.0", + "version": "1.61.0", "private": true, "engines": { "node": ">=20.15", diff --git a/packages/@n8n/api-types/package.json b/packages/@n8n/api-types/package.json index 726b0f908e..ec2bf1bd32 100644 --- a/packages/@n8n/api-types/package.json +++ b/packages/@n8n/api-types/package.json @@ -1,6 +1,6 @@ { "name": "@n8n/api-types", - "version": "0.2.0", + "version": "0.3.0", "scripts": { "clean": "rimraf dist .turbo", "dev": "pnpm watch", diff --git a/packages/@n8n/benchmark/package.json b/packages/@n8n/benchmark/package.json index 9a2451dcc4..f0b11ddeb2 100644 --- a/packages/@n8n/benchmark/package.json +++ b/packages/@n8n/benchmark/package.json @@ -1,6 +1,6 @@ { "name": "@n8n/n8n-benchmark", - "version": "1.4.0", + "version": "1.5.0", "description": "Cli for running benchmark tests for n8n", "main": "dist/index", "scripts": { diff --git a/packages/@n8n/config/package.json b/packages/@n8n/config/package.json index 75be87b674..e1ac104f04 100644 --- a/packages/@n8n/config/package.json +++ b/packages/@n8n/config/package.json @@ -1,6 +1,6 @@ { "name": "@n8n/config", - "version": "1.10.0", + "version": "1.11.0", "scripts": { "clean": "rimraf dist .turbo", "dev": "pnpm watch", diff --git a/packages/@n8n/nodes-langchain/package.json b/packages/@n8n/nodes-langchain/package.json index 7c0178f60e..ec7001286d 100644 --- a/packages/@n8n/nodes-langchain/package.json +++ b/packages/@n8n/nodes-langchain/package.json @@ -1,6 +1,6 @@ { "name": "@n8n/n8n-nodes-langchain", - "version": "1.60.0", + "version": "1.61.0", "description": "", "main": "index.js", "scripts": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 9d108c30d5..6d11b9cf55 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "n8n", - "version": "1.60.0", + "version": "1.61.0", "description": "n8n Workflow Automation Tool", "main": "dist/index", "types": "dist/index.d.ts", diff --git a/packages/core/package.json b/packages/core/package.json index 0656929291..74e3483943 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "n8n-core", - "version": "1.60.0", + "version": "1.61.0", "description": "Core functionality of n8n", "main": "dist/index", "types": "dist/index.d.ts", diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 18493521f2..526a9e43c4 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -1,6 +1,6 @@ { "name": "n8n-design-system", - "version": "1.50.0", + "version": "1.51.0", "main": "src/main.ts", "import": "src/main.ts", "scripts": { diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 500b96affd..2bd69ffb30 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -1,6 +1,6 @@ { "name": "n8n-editor-ui", - "version": "1.60.0", + "version": "1.61.0", "description": "Workflow Editor UI for n8n", "main": "index.js", "scripts": { diff --git a/packages/node-dev/package.json b/packages/node-dev/package.json index a3f5617998..2de9ea2a7f 100644 --- a/packages/node-dev/package.json +++ b/packages/node-dev/package.json @@ -1,6 +1,6 @@ { "name": "n8n-node-dev", - "version": "1.60.0", + "version": "1.61.0", "description": "CLI to simplify n8n credentials/node development", "main": "dist/src/index", "types": "dist/src/index.d.ts", diff --git a/packages/nodes-base/package.json b/packages/nodes-base/package.json index 507a3c5d2d..4f37056d17 100644 --- a/packages/nodes-base/package.json +++ b/packages/nodes-base/package.json @@ -1,6 +1,6 @@ { "name": "n8n-nodes-base", - "version": "1.60.0", + "version": "1.61.0", "description": "Base nodes of n8n", "main": "index.js", "scripts": { diff --git a/packages/workflow/package.json b/packages/workflow/package.json index b2ce455e94..06fb7acccb 100644 --- a/packages/workflow/package.json +++ b/packages/workflow/package.json @@ -1,6 +1,6 @@ { "name": "n8n-workflow", - "version": "1.59.0", + "version": "1.60.0", "description": "Workflow base code of n8n", "main": "dist/index.js", "module": "src/index.ts", From 1b973dcd8dbce598e6ada490fd48fad52f7b4f3a Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Wed, 25 Sep 2024 14:33:49 +0200 Subject: [PATCH 05/31] fix(editor): Fix schema view pill highlighting (#10936) --- .../components/ExpressionParameterInput.vue | 2 + .../components/FilterConditions/Condition.vue | 8 +-- .../InlineExpressionTip.vue | 14 +++-- .../__tests__/InlineExpressionTip.test.ts | 9 +++- .../src/components/ParameterInput.vue | 52 ++++++++++++++++++- .../src/components/ParameterInputFull.vue | 38 +------------- .../__tests__/ParameterInput.test.ts | 1 + 7 files changed, 79 insertions(+), 45 deletions(-) diff --git a/packages/editor-ui/src/components/ExpressionParameterInput.vue b/packages/editor-ui/src/components/ExpressionParameterInput.vue index cb0c22ec30..239178aa0a 100644 --- a/packages/editor-ui/src/components/ExpressionParameterInput.vue +++ b/packages/editor-ui/src/components/ExpressionParameterInput.vue @@ -121,6 +121,8 @@ async function onDrop(value: string, event: MouseEvent) { const droppedSelection = await dropInEditor(toRaw(editor), event, value); + if (!ndvStore.isMappingOnboarded) ndvStore.setMappingOnboarded(); + if (!ndvStore.isAutocompleteOnboarded) { setCursorPosition((droppedSelection.ranges.at(0)?.head ?? 3) - 3); setTimeout(() => { diff --git a/packages/editor-ui/src/components/FilterConditions/Condition.vue b/packages/editor-ui/src/components/FilterConditions/Condition.vue index 00d83218c1..316b6827fa 100644 --- a/packages/editor-ui/src/components/FilterConditions/Condition.vue +++ b/packages/editor-ui/src/components/FilterConditions/Condition.vue @@ -90,8 +90,8 @@ const allIssues = computed(() => { const now = computed(() => DateTime.now().toISO()); const leftParameter = computed(() => ({ - name: '', - displayName: '', + name: 'left', + displayName: 'Left', default: '', placeholder: operator.value.type === 'dateTime' @@ -103,8 +103,8 @@ const leftParameter = computed(() => ({ const rightParameter = computed(() => { const type = operator.value.rightType ?? operator.value.type; return { - name: '', - displayName: '', + name: 'right', + displayName: 'Right', default: '', placeholder: type === 'dateTime' ? now.value : i18n.baseText('filter.condition.placeholderRight'), diff --git a/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionTip.vue b/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionTip.vue index 73f12a0ec3..1ff90df190 100644 --- a/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionTip.vue +++ b/packages/editor-ui/src/components/InlineExpressionEditor/InlineExpressionTip.vue @@ -1,7 +1,7 @@