diff --git a/.github/workflows/ci-postgres-mysql.yml b/.github/workflows/ci-postgres-mysql.yml index 28c9498ca6fcf..3fa601b2d0211 100644 --- a/.github/workflows/ci-postgres-mysql.yml +++ b/.github/workflows/ci-postgres-mysql.yml @@ -34,7 +34,7 @@ jobs: compose-file: ./.github/docker-compose.yml - name: Build Core & Workflow - run: pnpm --filter n8n-workflow --filter=n8n-core build + run: pnpm --filter n8n-workflow --filter=n8n-core --filter=n8n build - name: Test MySQL working-directory: packages/cli diff --git a/CHANGELOG.md b/CHANGELOG.md index d39a70f2bcb09..a4976b22fcd29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,24 @@ +## [0.211.1](https://github.com/n8n-io/n8n/compare/n8n@0.211.0...n8n@0.211.1) (2023-01-16) + + +### Bug Fixes + +* Build `cli` to fix Postgres and MySQL test runs ([#5171](https://github.com/n8n-io/n8n/issues/5171)) ([a0c5232](https://github.com/n8n-io/n8n/commit/a0c5232aa53b13e581b5da4b6f984f5d7893fe33)) +* Extend date functions clobbering plus/minus ([#5170](https://github.com/n8n-io/n8n/issues/5170)) ([f634f0d](https://github.com/n8n-io/n8n/commit/f634f0dc59389a8c7ecd4154d2cf9af495b129aa)) +* Extension deep compare not quite working for some primitives ([#5172](https://github.com/n8n-io/n8n/issues/5172)) ([98017dc](https://github.com/n8n-io/n8n/commit/98017dc36f3e2fc3d2a5178fb7259205504e5582)) +* Upgrade `jsonwebtoken` to address CVE-2022-23540 ([#5116](https://github.com/n8n-io/n8n/issues/5116)) ([97969fc](https://github.com/n8n-io/n8n/commit/97969fc81581379d2a3c49d839206cc9b9e05d9d)) + + +### Features + +* **editor:** Supress validation errors for freshly added nodes ([#5149](https://github.com/n8n-io/n8n/issues/5149)) ([582865c](https://github.com/n8n-io/n8n/commit/582865c7e9eff99eabb36636ca7af2d2b2e76af8)) +* **Google Ads Node:** Update api version to v11 ([#4427](https://github.com/n8n-io/n8n/issues/4427)) ([dfff982](https://github.com/n8n-io/n8n/commit/dfff982662b7cee5c0203764a59d2355a02a9030)) +* **Google Drive Trigger Node:** Use resource locator component ([#5148](https://github.com/n8n-io/n8n/issues/5148)) ([9958c32](https://github.com/n8n-io/n8n/commit/9958c324dbf88f25efd34433ce51af9e3aa44ae3)) + + + # [0.211.0](https://github.com/n8n-io/n8n/compare/n8n@0.210.2...n8n@0.211.0) (2023-01-13) -> **Do not update** -> We are recommend not to update past version 0.210.2 as there seem to be some issues with expressions in version 0.211.0 ### Bug Fixes diff --git a/cypress/e2e/5-ndv.cy.ts b/cypress/e2e/5-ndv.cy.ts index d255e80bc119c..aaa16681ead02 100644 --- a/cypress/e2e/5-ndv.cy.ts +++ b/cypress/e2e/5-ndv.cy.ts @@ -53,4 +53,41 @@ describe('NDV', () => { ndv.getters.dataContainer().should('contain', 'start'); }); }); + + it('should show correct validation state for resource locator params', () => { + workflowPage.actions.addNodeToCanvas('Typeform', true); + ndv.getters.container().should('be.visible'); + cy.get('.has-issues').should('have.length', 0); + cy.get('[class*=hasIssues]').should('have.length', 0); + ndv.getters.backToCanvas().click(); + // Both credentials and resource locator errors should be visible + workflowPage.actions.openNodeNdv('Typeform'); + cy.get('.has-issues').should('have.length', 1); + cy.get('[class*=hasIssues]').should('have.length', 1); + }); + + it('should show validation errors only after blur or re-opening of NDV', () => { + workflowPage.actions.addNodeToCanvas('Manual Trigger'); + workflowPage.actions.addNodeToCanvas('Airtable', true); + ndv.getters.container().should('be.visible'); + cy.get('.has-issues').should('have.length', 0); + workflowPage.getters.ndvParameterInput('table').find('input').eq(1).focus().blur() + workflowPage.getters.ndvParameterInput('application').find('input').eq(1).focus().blur() + cy.get('.has-issues').should('have.length', 2); + ndv.getters.backToCanvas().click(); + workflowPage.actions.openNodeNdv('Airtable'); + cy.get('.has-issues').should('have.length', 3); + cy.get('[class*=hasIssues]').should('have.length', 1); + }); + + it('should show all validation errors when opening pasted node', () => { + cy.fixture('Test_workflow_ndv_errors.json').then((data) => { + cy.get('body').paste(JSON.stringify(data)); + workflowPage.getters.canvasNodes().should('have.have.length', 1); + workflowPage.actions.openNodeNdv('Airtable'); + cy.get('.has-issues').should('have.length', 3); + cy.get('[class*=hasIssues]').should('have.length', 1); + }); + }); + }); diff --git a/cypress/fixtures/Test_workflow_ndv_errors.json b/cypress/fixtures/Test_workflow_ndv_errors.json new file mode 100644 index 0000000000000..aea6fc1190f7e --- /dev/null +++ b/cypress/fixtures/Test_workflow_ndv_errors.json @@ -0,0 +1,32 @@ +{ + "meta": { + "instanceId": "3204fc455f5cbeb4e71fdbd3b1dfaf0b088088dea3e639de49e61462b80ffc1d" + }, + "nodes": [ + { + "parameters": { + "application": { + "__rl": true, + "mode": "url", + "value": "", + "__regex": "https://airtable.com/([a-zA-Z0-9]{2,})" + }, + "table": { + "__rl": true, + "mode": "url", + "value": "", + "__regex": "https://airtable.com/[a-zA-Z0-9]{2,}/([a-zA-Z0-9]{2,})" + } + }, + "id": "e0c0cf7e-aa98-4b72-9645-6e64e2902bd1", + "name": "Airtable", + "type": "n8n-nodes-base.airtable", + "typeVersion": 1, + "position": [ + 380, + 180 + ] + } + ], + "connections": {} +} diff --git a/cypress/pages/workflow.ts b/cypress/pages/workflow.ts index ac055c6bc8797..c5a959303e056 100644 --- a/cypress/pages/workflow.ts +++ b/cypress/pages/workflow.ts @@ -93,11 +93,12 @@ export class WorkflowPage extends BasePage { this.getters.nodeCreatorSearchBar().type('{enter}'); cy.get('body').type('{esc}'); }, - addNodeToCanvas: (nodeDisplayName: string) => { + addNodeToCanvas: (nodeDisplayName: string, preventNdvClose?: boolean) => { this.getters.nodeCreatorPlusButton().click(); this.getters.nodeCreatorSearchBar().type(nodeDisplayName); this.getters.nodeCreatorSearchBar().type('{enter}'); - cy.get('body').type('{esc}'); + + if (!preventNdvClose) cy.get('body').type('{esc}'); }, openNodeNdv: (nodeTypeName: string) => { this.getters.canvasNodeByName(nodeTypeName).dblclick(); diff --git a/package.json b/package.json index a22fc35924efd..eb1686470398d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "n8n", - "version": "0.211.0", + "version": "0.211.1", "private": true, "homepage": "https://n8n.io", "engines": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 1af97646388bb..57af84cd5d00d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "n8n", - "version": "0.211.0", + "version": "0.211.1", "description": "n8n Workflow Automation Tool", "license": "SEE LICENSE IN LICENSE.md", "homepage": "https://n8n.io", @@ -162,10 +162,10 @@ "lodash.unset": "^4.5.2", "luxon": "^3.1.0", "mysql2": "~2.3.3", - "n8n-core": "~0.151.0", - "n8n-editor-ui": "~0.177.0", - "n8n-nodes-base": "~0.209.0", - "n8n-workflow": "~0.133.0", + "n8n-core": "~0.151.1", + "n8n-editor-ui": "~0.177.1", + "n8n-nodes-base": "~0.209.1", + "n8n-workflow": "~0.133.1", "nodemailer": "^6.7.1", "oauth-1.0a": "^2.2.6", "open": "^7.0.0", diff --git a/packages/core/package.json b/packages/core/package.json index 00cc48bac2a92..172ef50b32014 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "n8n-core", - "version": "0.151.0", + "version": "0.151.1", "description": "Core functionality of n8n", "license": "SEE LICENSE IN LICENSE.md", "homepage": "https://n8n.io", @@ -55,7 +55,7 @@ "form-data": "^4.0.0", "lodash.get": "^4.4.2", "mime-types": "^2.1.27", - "n8n-workflow": "~0.133.0", + "n8n-workflow": "~0.133.1", "oauth-1.0a": "^2.2.6", "p-cancelable": "^2.0.0", "pretty-bytes": "^5.6.0", diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 00627643ce68b..a3f1e51357c9d 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -1,6 +1,6 @@ { "name": "n8n-design-system", - "version": "0.51.0", + "version": "0.51.1", "license": "SEE LICENSE IN LICENSE.md", "homepage": "https://n8n.io", "author": { diff --git a/packages/design-system/src/components/N8nActionBox/__tests__/__snapshots__/ActionBox.spec.ts.snap b/packages/design-system/src/components/N8nActionBox/__tests__/__snapshots__/ActionBox.spec.ts.snap index b869bf7812159..571e23755a5df 100644 --- a/packages/design-system/src/components/N8nActionBox/__tests__/__snapshots__/ActionBox.spec.ts.snap +++ b/packages/design-system/src/components/N8nActionBox/__tests__/__snapshots__/ActionBox.spec.ts.snap @@ -1,12 +1,12 @@ // Vitest Snapshot v1 exports[`N8NActionBox > should render correctly 1`] = ` -"
-
😿
-
+"
+
😿
+
Headline you need to know
-
+
Long description that you should know something is the way it is because of how it is.
diff --git a/packages/design-system/src/components/N8nActionDropdown/__tests__/__snapshots__/ActionDropdown.spec.ts.snap b/packages/design-system/src/components/N8nActionDropdown/__tests__/__snapshots__/ActionDropdown.spec.ts.snap index 365732dd6b364..fee62c9494652 100644 --- a/packages/design-system/src/components/N8nActionDropdown/__tests__/__snapshots__/ActionDropdown.spec.ts.snap +++ b/packages/design-system/src/components/N8nActionDropdown/__tests__/__snapshots__/ActionDropdown.spec.ts.snap @@ -3,7 +3,7 @@ exports[`components > N8nActionDropdown > should render custom styling correctly 1`] = ` "
-
+
@@ -13,7 +13,7 @@ exports[`components > N8nActionDropdown > should render custom styling correctly exports[`components > N8nActionDropdown > should render default styling correctly 1`] = ` "
-
+
diff --git a/packages/design-system/src/components/N8nBadge/__tests__/__snapshots__/Badge.spec.ts.snap b/packages/design-system/src/components/N8nBadge/__tests__/__snapshots__/Badge.spec.ts.snap index cdaaa82c716f4..4195e99804151 100644 --- a/packages/design-system/src/components/N8nBadge/__tests__/__snapshots__/Badge.spec.ts.snap +++ b/packages/design-system/src/components/N8nBadge/__tests__/__snapshots__/Badge.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1 -exports[`components > N8nBadge > props > should render default theme correctly 1`] = `"Default badge"`; +exports[`components > N8nBadge > props > should render default theme correctly 1`] = `"Default badge"`; -exports[`components > N8nBadge > props > should render secondary theme correctly 1`] = `"Secondary badge"`; +exports[`components > N8nBadge > props > should render secondary theme correctly 1`] = `"Secondary badge"`; -exports[`components > N8nBadge > props > should render with default values correctly 1`] = `"A Badge"`; +exports[`components > N8nBadge > props > should render with default values correctly 1`] = `"A Badge"`; diff --git a/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap b/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap index a5302043c8cd4..8cbe8cebf5a9b 100644 --- a/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap +++ b/packages/design-system/src/components/N8nButton/__tests__/__snapshots__/Button.spec.ts.snap @@ -1,17 +1,17 @@ // Vitest Snapshot v1 -exports[`components > N8nButton > overrides > should render correctly 1`] = `""`; +exports[`components > N8nButton > overrides > should render correctly 1`] = `""`; -exports[`components > N8nButton > props > icon > should render icon button 1`] = `""`; +exports[`components > N8nButton > props > icon > should render icon button 1`] = `""`; -exports[`components > N8nButton > props > loading > should render loading spinner 1`] = `""`; +exports[`components > N8nButton > props > loading > should render loading spinner 1`] = `""`; exports[`components > N8nButton > props > square > should render square button 1`] = ` -"" `; exports[`components > N8nButton > should render correctly 1`] = ` -"" `; diff --git a/packages/design-system/src/components/N8nCallout/__tests__/__snapshots__/Callout.spec.ts.snap b/packages/design-system/src/components/N8nCallout/__tests__/__snapshots__/Callout.spec.ts.snap index a0198b4b12815..509473c8cc107 100644 --- a/packages/design-system/src/components/N8nCallout/__tests__/__snapshots__/Callout.spec.ts.snap +++ b/packages/design-system/src/components/N8nCallout/__tests__/__snapshots__/Callout.spec.ts.snap @@ -1,9 +1,9 @@ // Vitest Snapshot v1 exports[`components > N8nCallout > should render additional slots correctly 1`] = ` -"
-
-
+"
+
+
@@ -15,9 +15,9 @@ exports[`components > N8nCallout > should render additional slots correctly 1`] `; exports[`components > N8nCallout > should render custom theme correctly 1`] = ` -"
-
-
+"
+
+
@@ -28,9 +28,9 @@ exports[`components > N8nCallout > should render custom theme correctly 1`] = ` `; exports[`components > N8nCallout > should render danger theme correctly 1`] = ` -"
-
-
+"
+
+
@@ -41,9 +41,9 @@ exports[`components > N8nCallout > should render danger theme correctly 1`] = ` `; exports[`components > N8nCallout > should render info theme correctly 1`] = ` -"
-
-
+"
+
+
@@ -54,9 +54,9 @@ exports[`components > N8nCallout > should render info theme correctly 1`] = ` `; exports[`components > N8nCallout > should render secondary theme correctly 1`] = ` -"
-
-
+"
+
+
@@ -67,9 +67,9 @@ exports[`components > N8nCallout > should render secondary theme correctly 1`] = `; exports[`components > N8nCallout > should render success theme correctly 1`] = ` -"
-
-
+"
+
+
@@ -80,9 +80,9 @@ exports[`components > N8nCallout > should render success theme correctly 1`] = ` `; exports[`components > N8nCallout > should render warning theme correctly 1`] = ` -"
-
-
+"
+
+
diff --git a/packages/design-system/src/components/N8nCard/__tests__/__snapshots__/Card.spec.ts.snap b/packages/design-system/src/components/N8nCard/__tests__/__snapshots__/Card.spec.ts.snap index 049af6f9c751a..3de00eec2337f 100644 --- a/packages/design-system/src/components/N8nCard/__tests__/__snapshots__/Card.spec.ts.snap +++ b/packages/design-system/src/components/N8nCard/__tests__/__snapshots__/Card.spec.ts.snap @@ -1,11 +1,11 @@ // Vitest Snapshot v1 exports[`components > N8nCard > should render correctly 1`] = ` -"
+"
-
+
-
This is a card.
+
This is a card.
@@ -13,12 +13,12 @@ exports[`components > N8nCard > should render correctly 1`] = ` `; exports[`components > N8nCard > should render correctly with header and footer 1`] = ` -"
+"
-
-
Header
-
This is a card.
- +
+
Header
+
This is a card.
+
" diff --git a/packages/design-system/src/components/N8nInfoTip/__tests__/__snapshots__/InfoTip.spec.ts.snap b/packages/design-system/src/components/N8nInfoTip/__tests__/__snapshots__/InfoTip.spec.ts.snap index 5db03b96e6c73..935602355fd4a 100644 --- a/packages/design-system/src/components/N8nInfoTip/__tests__/__snapshots__/InfoTip.spec.ts.snap +++ b/packages/design-system/src/components/N8nInfoTip/__tests__/__snapshots__/InfoTip.spec.ts.snap @@ -1,9 +1,9 @@ // Vitest Snapshot v1 -exports[`N8nInfoTip > should render correctly as note 1`] = `"
Need help doing something?Open docs
"`; +exports[`N8nInfoTip > should render correctly as note 1`] = `"
Need help doing something?Open docs
"`; exports[`N8nInfoTip > should render correctly as tooltip 1`] = ` -"
- +"
+
" `; diff --git a/packages/design-system/src/components/N8nNotice/__tests__/__snapshots__/Notice.spec.ts.snap b/packages/design-system/src/components/N8nNotice/__tests__/__snapshots__/Notice.spec.ts.snap index ea1dcc04750ff..ee1db7bef8812 100644 --- a/packages/design-system/src/components/N8nNotice/__tests__/__snapshots__/Notice.spec.ts.snap +++ b/packages/design-system/src/components/N8nNotice/__tests__/__snapshots__/Notice.spec.ts.snap @@ -1,31 +1,31 @@ // Vitest Snapshot v1 exports[`components > N8nNotice > props > content > should render HTML 1`] = ` -"
+"
- Hello world! This is a notice. + Hello world! This is a notice.
" `; exports[`components > N8nNotice > props > content > should render correctly with content prop 1`] = ` -"
+"
- This is a notice. + This is a notice.
" `; exports[`components > N8nNotice > props > content > should sanitize rendered HTML 1`] = ` -"
+"
- This is a notice. + This is a notice.
" `; exports[`components > N8nNotice > should render correctly 1`] = ` -"
+"
This is a notice.
diff --git a/packages/design-system/src/components/N8nSelect/__tests__/__snapshots__/Select.spec.ts.snap b/packages/design-system/src/components/N8nSelect/__tests__/__snapshots__/Select.spec.ts.snap index 4264564e057fe..4a2f2fa9abcc7 100644 --- a/packages/design-system/src/components/N8nSelect/__tests__/__snapshots__/Select.spec.ts.snap +++ b/packages/design-system/src/components/N8nSelect/__tests__/__snapshots__/Select.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1 exports[`components > N8nSelect > should render correctly 1`] = ` -"
+"
diff --git a/packages/design-system/src/components/N8nTree/__tests__/__snapshots__/Tree.spec.ts.snap b/packages/design-system/src/components/N8nTree/__tests__/__snapshots__/Tree.spec.ts.snap index 4911913d314cf..9418ee33b273b 100644 --- a/packages/design-system/src/components/N8nTree/__tests__/__snapshots__/Tree.spec.ts.snap +++ b/packages/design-system/src/components/N8nTree/__tests__/__snapshots__/Tree.spec.ts.snap @@ -5,8 +5,8 @@ exports[`components > N8nTree > should render each tree with node class 1`] = `
hello
-
-
test:world
+
+
test:world
@@ -14,11 +14,11 @@ exports[`components > N8nTree > should render each tree with node class 1`] = `
options
-
-
0:yes
+
+
0:yes
-
-
1:no
+
+
1:no
@@ -29,7 +29,7 @@ exports[`components > N8nTree > should render each tree with node class 1`] = ` exports[`components > N8nTree > should render simple tree 1`] = ` "
-
hello:world
+
hello:world
" `; @@ -39,8 +39,8 @@ exports[`components > N8nTree > should render tree 1`] = `
hello
-
-
test:world
+
+
test:world
@@ -48,11 +48,11 @@ exports[`components > N8nTree > should render tree 1`] = `
options
-
-
0:yes
+
+
0:yes
-
-
1:no
+
+
1:no
@@ -65,8 +65,8 @@ exports[`components > N8nTree > should render tree with slots 1`] = `
label
-
-
label:value
+
+
label:value
@@ -74,11 +74,11 @@ exports[`components > N8nTree > should render tree with slots 1`] = `
label
-
-
label:value
+
+
label:value
-
-
label:value
+
+
label:value
diff --git a/packages/design-system/vite.config.ts b/packages/design-system/vite.config.ts index 08bda689a2e29..58252e3afebe3 100644 --- a/packages/design-system/vite.config.ts +++ b/packages/design-system/vite.config.ts @@ -39,5 +39,10 @@ export default mergeConfig( environment: 'jsdom', setupFiles: ['./src/__tests__/setup.ts'], }, + css: { + modules: { + generateScopedName: (name) => `_${name}_`, + }, + }, }), ); diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 4c500a6d60c73..2362f258d067a 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -1,6 +1,6 @@ { "name": "n8n-editor-ui", - "version": "0.177.0", + "version": "0.177.1", "description": "Workflow Editor UI for n8n", "license": "SEE LICENSE IN LICENSE.md", "homepage": "https://n8n.io", @@ -57,8 +57,8 @@ "lodash.set": "^4.3.2", "luxon": "^2.3.0", "monaco-editor": "^0.33.0", - "n8n-design-system": "~0.51.0", - "n8n-workflow": "~0.133.0", + "n8n-design-system": "~0.51.1", + "n8n-workflow": "~0.133.1", "normalize-wheel": "^1.0.1", "pinia": "^2.0.22", "prismjs": "^1.17.1", diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index 93b2e35efc424..91a9cbab80d4b 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -963,6 +963,7 @@ export interface ITemplatesNode extends IVersionNode { export interface INodeMetadata { parametersLastUpdatedAt?: number; + pristine: boolean; } export interface IUsedCredential { diff --git a/packages/editor-ui/src/components/MainHeader/ExecutionDetails/ExecutionDetails.vue b/packages/editor-ui/src/components/MainHeader/ExecutionDetails/ExecutionDetails.vue deleted file mode 100644 index b7c0264613f0a..0000000000000 --- a/packages/editor-ui/src/components/MainHeader/ExecutionDetails/ExecutionDetails.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - diff --git a/packages/editor-ui/src/components/MainHeader/ExecutionDetails/ReadOnly.vue b/packages/editor-ui/src/components/MainHeader/ExecutionDetails/ReadOnly.vue deleted file mode 100644 index c25955ce1f581..0000000000000 --- a/packages/editor-ui/src/components/MainHeader/ExecutionDetails/ReadOnly.vue +++ /dev/null @@ -1,27 +0,0 @@ - - - - - diff --git a/packages/editor-ui/src/components/MainHeader/MainHeader.vue b/packages/editor-ui/src/components/MainHeader/MainHeader.vue index e19c4650affe7..6d052bce3b25a 100644 --- a/packages/editor-ui/src/components/MainHeader/MainHeader.vue +++ b/packages/editor-ui/src/components/MainHeader/MainHeader.vue @@ -2,10 +2,9 @@
- - +
-
+
@@ -47,7 +48,7 @@ -
+