Skip to content

Commit

Permalink
Merge branch 'master' into ado-3259-be-link-folder-to-workflow-when-w…
Browse files Browse the repository at this point in the history
…orkflow-is-saved
  • Loading branch information
RicardoE105 committed Feb 25, 2025
2 parents 5a086e4 + 5938919 commit 9e40a9c
Show file tree
Hide file tree
Showing 32 changed files with 337 additions and 42 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# [1.81.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.81.0) (2025-02-24)


### Bug Fixes

* Always clear popupWindowState before showing popup from form trigger ([#13363](https://github.com/n8n-io/n8n/issues/13363)) ([b7f1265](https://github.com/n8n-io/n8n/commit/b7f12650f1f42c0ff15c1da3e5ade350fb1e23d2))
* **Code Node:** Fix `$items` in Code node when using task runner ([#13368](https://github.com/n8n-io/n8n/issues/13368)) ([87b3c50](https://github.com/n8n-io/n8n/commit/87b3c508b3d5a7d6f3b9f8377de66567a04fa970))
* **core:** Avoid renewing the license on init to prevent excessive duplicate renewal calls ([#13347](https://github.com/n8n-io/n8n/issues/13347)) ([1e1f528](https://github.com/n8n-io/n8n/commit/1e1f52846641515ad4479ab1088e78a9266e452d))
* **core:** Ensure that 'workflow-post-execute' event has userId whenever it's available ([#13326](https://github.com/n8n-io/n8n/issues/13326)) ([f41e353](https://github.com/n8n-io/n8n/commit/f41e353887fef4269510d25fa87b73da4cf925f9))
* **core:** Fix DB migrations for MySQL ([#13261](https://github.com/n8n-io/n8n/issues/13261)) ([d0968a1](https://github.com/n8n-io/n8n/commit/d0968a10d56ac5c97974129742ba8f8a85997dac))
* **core:** Fix resuming executions on test webhooks from Wait forms ([#13410](https://github.com/n8n-io/n8n/issues/13410)) ([8ffd316](https://github.com/n8n-io/n8n/commit/8ffd3167d58d30f087fd31010e6f79f1398d8f49))
* **core:** Handle connections for missing nodes in a workflow ([#13362](https://github.com/n8n-io/n8n/issues/13362)) ([1e5feb1](https://github.com/n8n-io/n8n/commit/1e5feb195d50054939f85c9e1b5a32885c579901))
* **core:** Make sure middleware works with legacy API Keys ([#13390](https://github.com/n8n-io/n8n/issues/13390)) ([ca76ef4](https://github.com/n8n-io/n8n/commit/ca76ef4bc248a3bcde844bc8378d38eed269f032))
* **core:** Return original hooks errors to the frontend ([#13365](https://github.com/n8n-io/n8n/issues/13365)) ([5439181](https://github.com/n8n-io/n8n/commit/5439181e92f20fef1423575cabec7acbe1740b26))
* **editor:** Correctly close node creator when selecting/deselecting a node ([#13338](https://github.com/n8n-io/n8n/issues/13338)) ([c3dc66e](https://github.com/n8n-io/n8n/commit/c3dc66ee7372927fcfd6baac3b9d853690e39c99))
* **editor:** Do not show credential details popup for users without necessary scopes with direct link ([#13264](https://github.com/n8n-io/n8n/issues/13264)) ([a5401d0](https://github.com/n8n-io/n8n/commit/a5401d06a58ef026f44499d05b42a8d0dbe2520e))
* **editor:** Do not show project settings for users without permission with direct link ([#13246](https://github.com/n8n-io/n8n/issues/13246)) ([fa488f1](https://github.com/n8n-io/n8n/commit/fa488f15619f798a0360c96492f2928ac661d9ee))
* **editor:** Don't open form popup window if different trigger node is used ([#13391](https://github.com/n8n-io/n8n/issues/13391)) ([57a9a5b](https://github.com/n8n-io/n8n/commit/57a9a5b15f55aae0301851e93847ed87feb081e8))
* **editor:** Fix configurable node description margins and text alignment ([#13318](https://github.com/n8n-io/n8n/issues/13318)) ([c881ea2](https://github.com/n8n-io/n8n/commit/c881ea2c7b43a4fb610533dd553520a6de51f22d))
* **editor:** Fix workflow moving E2E tests ([#13396](https://github.com/n8n-io/n8n/issues/13396)) ([073b05b](https://github.com/n8n-io/n8n/commit/073b05b10c81e3a0451c310bc0bde25170e1591e))
* **editor:** Optionally share credentials used by the workflow when moving the workflow between projects ([#12524](https://github.com/n8n-io/n8n/issues/12524)) ([7bd83d7](https://github.com/n8n-io/n8n/commit/7bd83d7d330b6f01b5798461f2218254a9964d87))
* **editor:** Polyfill `Array.prototype.toSorted` (no-chanhelog) ([#13463](https://github.com/n8n-io/n8n/issues/13463)) ([f2b15ea](https://github.com/n8n-io/n8n/commit/f2b15ea086fcc541a5a584998985d712335210ec))
* **editor:** Register/unregister keybindings on window focus/blur ([#13419](https://github.com/n8n-io/n8n/issues/13419)) ([7a504dc](https://github.com/n8n-io/n8n/commit/7a504dc30fcf0c7641528ed469835811f82bb098))
* **editor:** Switch back to selection mode on window blur ([#13341](https://github.com/n8n-io/n8n/issues/13341)) ([415e25b](https://github.com/n8n-io/n8n/commit/415e25b5d524b0d3c391403f129468e57bbb918e))
* Prevent flicker during paginated workflow navigation ([#13348](https://github.com/n8n-io/n8n/issues/13348)) ([d277e0b](https://github.com/n8n-io/n8n/commit/d277e0ba0e5d87500457538b4b0f1363e267f071))


### Features

* **core:** Hackmation - Add last activity metric ([#13237](https://github.com/n8n-io/n8n/issues/13237)) ([272f55b](https://github.com/n8n-io/n8n/commit/272f55b80f1d4576d1675040bd2775210c4ab5e9))
* **editor:** Change rename node keyboard shortcut to Space on new canvas ([#11872](https://github.com/n8n-io/n8n/issues/11872)) ([c90d0d9](https://github.com/n8n-io/n8n/commit/c90d0d9161ec161cd1afd6aa5b56345c1611f9c9))
* **editor:** Implement breadcrumbs component ([#13317](https://github.com/n8n-io/n8n/issues/13317)) ([db297f1](https://github.com/n8n-io/n8n/commit/db297f107d81738d57e298135a9c279ad83345dc))
* **editor:** Implement folder navigation in workflows list ([#13370](https://github.com/n8n-io/n8n/issues/13370)) ([0eae14e](https://github.com/n8n-io/n8n/commit/0eae14e27ab4fab3229750d6b2a32868db1e8dd4))
* **editor:** Rename 'Text' fields on AI nodes to 'Prompt' ([#13416](https://github.com/n8n-io/n8n/issues/13416)) ([4fa666b](https://github.com/n8n-io/n8n/commit/4fa666b976423365299e915130384e10c8e12528))
* Enable partial exections v2 by default ([#13344](https://github.com/n8n-io/n8n/issues/13344)) ([29ae239](https://github.com/n8n-io/n8n/commit/29ae2396c99d54d8f3db71e6370516f0dc354d00))
* **n8n Form Node:** Limit wait time parameters ([#13160](https://github.com/n8n-io/n8n/issues/13160)) ([14b6f8b](https://github.com/n8n-io/n8n/commit/14b6f8b97275e38ba4a4c1819e8e32b711de21ba))



# [1.80.0](https://github.com/n8n-io/n8n/compare/[email protected]@1.80.0) (2025-02-17)


Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/4-node-creator.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ describe('Node Creator', () => {
addNodeToCanvas('Question and Answer Chain', true);
addRetrieverNodeToParent('Vector Store Retriever', 'Question and Answer Chain');
cy.realPress('Escape');
addVectorStoreNodeToParent('In-Memory Vector Store', 'Vector Store Retriever');
addVectorStoreNodeToParent('Simple Vector Store', 'Vector Store Retriever');
cy.realPress('Escape');
WorkflowPage.getters.canvasNodes().should('have.length', 4);
});
Expand All @@ -569,7 +569,7 @@ describe('Node Creator', () => {
addNodeToCanvas(AGENT_NODE_NAME, true, true);
clickGetBackToCanvas();

addVectorStoreToolToParent('In-Memory Vector Store', AGENT_NODE_NAME);
addVectorStoreToolToParent('Simple Vector Store', AGENT_NODE_NAME);
});

it('should insert node to canvas with sendAndWait operation selected', () => {
Expand Down
2 changes: 1 addition & 1 deletion docker/images/n8n-custom/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ COPY docker/images/n8n/docker-entrypoint.sh /

# Setup the Task Runner Launcher
ARG TARGETPLATFORM
ARG LAUNCHER_VERSION=1.1.0
ARG LAUNCHER_VERSION=1.1.1
COPY docker/images/n8n/n8n-task-runners.json /etc/n8n-task-runners.json
# Download, verify, then extract the launcher binary
RUN \
Expand Down
2 changes: 1 addition & 1 deletion docker/images/n8n/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN set -eux; \

# Setup the Task Runner Launcher
ARG TARGETPLATFORM
ARG LAUNCHER_VERSION=1.1.0
ARG LAUNCHER_VERSION=1.1.1
COPY n8n-task-runners.json /etc/n8n-task-runners.json
# Download, verify, then extract the launcher binary
RUN \
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n-monorepo",
"version": "1.80.0",
"version": "1.81.0",
"private": true,
"engines": {
"node": ">=20.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/api-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@n8n/api-types",
"version": "0.15.0",
"version": "0.16.0",
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@n8n/config",
"version": "1.29.0",
"version": "1.30.0",
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MemoryVectorStoreManager } from '../shared/MemoryVectorStoreManager';
const insertFields: INodeProperties[] = [
{
displayName:
'The embbded data are stored in the server memory, so they will be lost when the server is restarted. Additionally, if the amount of data is too large, it may cause the server to crash due to insufficient memory.',
'The embedded data are stored in the server memory, so they will be lost when the server is restarted. Additionally, if the amount of data is too large, it may cause the server to crash due to insufficient memory.',
name: 'notice',
type: 'notice',
default: '',
Expand All @@ -23,9 +23,10 @@ const insertFields: INodeProperties[] = [

export class VectorStoreInMemory extends createVectorStoreNode<MemoryVectorStore>({
meta: {
displayName: 'In-Memory Vector Store',
displayName: 'Simple Vector Store',
name: 'vectorStoreInMemory',
description: 'Work with your data in In-Memory Vector Store',
description:
"Work with your data in a Simple Vector Store. Don't use this for production usage.",
icon: 'fa:database',
iconColor: 'black',
docsUrl:
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/nodes-langchain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@n8n/n8n-nodes-langchain",
"version": "1.80.0",
"version": "1.81.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/permissions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@n8n/permissions",
"version": "0.17.0",
"version": "0.18.0",
"scripts": {
"clean": "rimraf dist .turbo",
"dev": "pnpm watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/@n8n/task-runner/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@n8n/task-runner",
"version": "1.17.0",
"version": "1.18.0",
"scripts": {
"clean": "rimraf dist .turbo",
"start": "node dist/start.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "n8n",
"version": "1.80.0",
"version": "1.81.0",
"description": "n8n Workflow Automation Tool",
"main": "dist/index",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -97,7 +97,7 @@
"@n8n/task-runner": "workspace:*",
"@n8n/typeorm": "0.3.20-12",
"@n8n_io/ai-assistant-sdk": "1.13.0",
"@n8n_io/license-sdk": "2.16.1",
"@n8n_io/license-sdk": "2.17.0",
"@oclif/core": "4.0.7",
"@rudderstack/rudder-sdk-node": "2.0.9",
"@sentry/node": "catalog:",
Expand Down
80 changes: 73 additions & 7 deletions packages/cli/src/databases/dsl/column.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import type { Driver, TableColumnOptions } from '@n8n/typeorm';

export class Column {
private type: 'int' | 'boolean' | 'varchar' | 'text' | 'json' | 'timestamp' | 'uuid';
private type:
| 'int'
| 'boolean'
| 'varchar'
| 'text'
| 'json'
| 'timestamptz'
| 'timestamp'
| 'uuid';

private isGenerated = false;

private isGenerated2 = false;

private isNullable = true;

private isPrimary = false;
Expand All @@ -15,6 +25,8 @@ export class Column {

private primaryKeyConstraintName: string | undefined;

private commentValue: string | undefined;

constructor(private name: string) {}

get bool() {
Expand Down Expand Up @@ -43,7 +55,22 @@ export class Column {
return this;
}

/**
* @deprecated use `timestampTimezone` instead
**/
timestamp(msPrecision = 3) {
this.type = 'timestamptz';
this.length = msPrecision ?? 'auto';
return this;
}

timestampTimezone(msPrecision = 3) {
this.type = 'timestamptz';
this.length = msPrecision ?? 'auto';
return this;
}

timestampNoTimezone(msPrecision = 3) {
this.type = 'timestamp';
this.length = msPrecision ?? 'auto';
return this;
Expand Down Expand Up @@ -75,15 +102,40 @@ export class Column {
return this;
}

/**
* @deprecated, use autoGenerate2 instead
**/
get autoGenerate() {
this.isGenerated = true;
return this;
}

/**
* Prefers `identity` over `increment` (which turns to `serial` for pg)
* See https://wiki.postgresql.org/wiki/Don%27t_Do_This#Don.27t_use_serial
**/
get autoGenerate2() {
this.isGenerated2 = true;
return this;
}

comment(comment: string) {
this.commentValue = comment;
return this;
}

// eslint-disable-next-line complexity
toOptions(driver: Driver): TableColumnOptions {
const { name, type, isNullable, isPrimary, isGenerated, length, primaryKeyConstraintName } =
this;
const {
name,
type,
isNullable,
isPrimary,
isGenerated,
isGenerated2,
length,
primaryKeyConstraintName,
} = this;
const isMysql = 'mysql' in driver;
const isPostgres = 'postgres' in driver;
const isSqlite = 'sqlite' in driver;
Expand All @@ -100,8 +152,10 @@ export class Column {
options.type = 'integer';
} else if (type === 'boolean' && isMysql) {
options.type = 'tinyint(1)';
} else if (type === 'timestamp') {
} else if (type === 'timestamptz') {
options.type = isPostgres ? 'timestamptz' : 'datetime';
} else if (type === 'timestamp') {
options.type = isPostgres ? 'timestamp' : 'datetime';
} else if (type === 'json' && isSqlite) {
options.type = 'text';
} else if (type === 'uuid') {
Expand All @@ -111,7 +165,10 @@ export class Column {
if (isSqlite) options.type = 'varchar';
}

if ((type === 'varchar' || type === 'timestamp') && length !== 'auto') {
if (
(type === 'varchar' || type === 'timestamptz' || type === 'timestamp') &&
length !== 'auto'
) {
options.type = `${options.type}(${length})`;
}

Expand All @@ -120,12 +177,17 @@ export class Column {
options.generationStrategy = type === 'uuid' ? 'uuid' : 'increment';
}

if (isPrimary || isGenerated) {
if (isGenerated2) {
options.isGenerated = true;
options.generationStrategy = type === 'uuid' ? 'uuid' : 'identity';
}

if (isPrimary || isGenerated || isGenerated2) {
options.isNullable = false;
}

if (this.defaultValue !== undefined) {
if (type === 'timestamp' && this.defaultValue === 'NOW()') {
if ((type === 'timestamptz' || type === 'timestamp') && this.defaultValue === 'NOW()') {
options.default = isSqlite
? "STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')"
: 'CURRENT_TIMESTAMP(3)';
Expand All @@ -134,6 +196,10 @@ export class Column {
}
}

if (this.commentValue) {
options.comment = this.commentValue;
}

return options;
}
}
Loading

0 comments on commit 9e40a9c

Please sign in to comment.