From a7482851330ed0617d450392c41a0b20c2201d11 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Fri, 6 Sep 2024 09:21:40 +0200 Subject: [PATCH 1/3] Improve loose type validation for booleans, version filter param, update description --- .../FilterConditions/FilterConditions.vue | 6 +- .../nodes-base/nodes/Filter/Filter.node.ts | 3 +- .../nodes/Filter/V2/FilterV2.node.ts | 3 +- packages/nodes-base/nodes/If/If.node.ts | 3 +- packages/nodes-base/nodes/If/V2/IfV2.node.ts | 3 +- .../nodes/If/test/v2/IfV2.boolean.json | 174 ++++++++++++++++++ .../nodes-base/nodes/Switch/Switch.node.ts | 3 +- .../nodes/Switch/V3/SwitchV3.node.ts | 3 +- packages/nodes-base/utils/constants.ts | 2 +- packages/nodes-base/utils/descriptions.ts | 2 +- packages/workflow/src/Interfaces.ts | 16 +- .../src/NodeParameters/FilterParameter.ts | 21 ++- .../workflow/test/FilterParameter.test.ts | 43 +++++ pnpm-lock.yaml | 79 +++++--- 14 files changed, 314 insertions(+), 47 deletions(-) create mode 100644 packages/nodes-base/nodes/If/test/v2/IfV2.boolean.json diff --git a/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue b/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue index 095015d0c3992..6b58fb4290be5 100644 --- a/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue +++ b/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue @@ -42,6 +42,8 @@ const i18n = useI18n(); const ndvStore = useNDVStore(); const { debounce } = useDebounce(); +const debouncedEmitChange = debounce(emitChange, { debounceTime: 1000 }); + function createCondition(): FilterConditionValue { return { id: uuid(), leftValue: '', rightValue: '', operator: DEFAULT_OPERATOR_VALUE }; } @@ -86,7 +88,7 @@ watch( try { newOptions = { ...DEFAULT_FILTER_OPTIONS, - ...resolveParameter(typeOptions as NodeParameterValue), + ...resolveParameter(typeOptions as unknown as NodeParameterValue), }; } catch (error) {} @@ -117,8 +119,6 @@ function emitChange() { }); } -const debouncedEmitChange = debounce(emitChange, { debounceTime: 1000 }); - function addCondition(): void { state.paramValue.conditions.push(createCondition()); debouncedEmitChange(); diff --git a/packages/nodes-base/nodes/Filter/Filter.node.ts b/packages/nodes-base/nodes/Filter/Filter.node.ts index 7eb36ca4f0565..01db3b986874c 100644 --- a/packages/nodes-base/nodes/Filter/Filter.node.ts +++ b/packages/nodes-base/nodes/Filter/Filter.node.ts @@ -13,13 +13,14 @@ export class Filter extends VersionedNodeType { iconColor: 'light-blue', group: ['transform'], description: 'Remove items matching a condition', - defaultVersion: 2.1, + defaultVersion: 2.2, }; const nodeVersions: IVersionedNodeType['nodeVersions'] = { 1: new FilterV1(baseDescription), 2: new FilterV2(baseDescription), 2.1: new FilterV2(baseDescription), + 2.2: new FilterV2(baseDescription), }; super(nodeVersions, baseDescription); diff --git a/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts b/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts index 0bb9e0505378f..46c32d5912df4 100644 --- a/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts +++ b/packages/nodes-base/nodes/Filter/V2/FilterV2.node.ts @@ -19,7 +19,7 @@ export class FilterV2 implements INodeType { constructor(baseDescription: INodeTypeBaseDescription) { this.description = { ...baseDescription, - version: [2, 2.1], + version: [2, 2.1, 2.2], defaults: { name: 'Filter', color: '#229eff', @@ -39,6 +39,7 @@ export class FilterV2 implements INodeType { filter: { caseSensitive: '={{!$parameter.options.ignoreCase}}', typeValidation: getTypeValidationStrictness(2.1), + version: '={{ $nodeVersion >= 2.2 ? 2 : 1 }}', }, }, }, diff --git a/packages/nodes-base/nodes/If/If.node.ts b/packages/nodes-base/nodes/If/If.node.ts index 4942fdebf278a..48732ea75b568 100644 --- a/packages/nodes-base/nodes/If/If.node.ts +++ b/packages/nodes-base/nodes/If/If.node.ts @@ -13,13 +13,14 @@ export class If extends VersionedNodeType { iconColor: 'green', group: ['transform'], description: 'Route items to different branches (true/false)', - defaultVersion: 2.1, + defaultVersion: 2.2, }; const nodeVersions: IVersionedNodeType['nodeVersions'] = { 1: new IfV1(baseDescription), 2: new IfV2(baseDescription), 2.1: new IfV2(baseDescription), + 2.2: new IfV2(baseDescription), }; super(nodeVersions, baseDescription); diff --git a/packages/nodes-base/nodes/If/V2/IfV2.node.ts b/packages/nodes-base/nodes/If/V2/IfV2.node.ts index 4eab5d4f3a45b..6ef2dcb626723 100644 --- a/packages/nodes-base/nodes/If/V2/IfV2.node.ts +++ b/packages/nodes-base/nodes/If/V2/IfV2.node.ts @@ -19,7 +19,7 @@ export class IfV2 implements INodeType { constructor(baseDescription: INodeTypeBaseDescription) { this.description = { ...baseDescription, - version: [2, 2.1], + version: [2, 2.1, 2.2], defaults: { name: 'If', color: '#408000', @@ -39,6 +39,7 @@ export class IfV2 implements INodeType { filter: { caseSensitive: '={{!$parameter.options.ignoreCase}}', typeValidation: getTypeValidationStrictness(2.1), + version: '={{ $nodeVersion >= 2.2 ? 2 : 1 }}', }, }, }, diff --git a/packages/nodes-base/nodes/If/test/v2/IfV2.boolean.json b/packages/nodes-base/nodes/If/test/v2/IfV2.boolean.json new file mode 100644 index 0000000000000..3579d00c43c07 --- /dev/null +++ b/packages/nodes-base/nodes/If/test/v2/IfV2.boolean.json @@ -0,0 +1,174 @@ +{ + "name": "Filter test: boolean", + "nodes": [ + { + "parameters": {}, + "id": "9e2c2dc5-bd37-460b-a5a4-943860dcc03e", + "name": "When clicking \"Execute Workflow\"", + "type": "n8n-nodes-base.manualTrigger", + "typeVersion": 1, + "position": [ + -720, + 160 + ] + }, + { + "parameters": {}, + "id": "3184fda2-b1d0-400a-a882-5844bbe99ae3", + "name": "false", + "type": "n8n-nodes-base.noOp", + "typeVersion": 1, + "position": [ + 0, + 260 + ] + }, + { + "parameters": { + "jsCode": "return [\n {\n email: \"shane@yahoo.com\",\n admin: false\n },\n {\n email: \"sharon@yahoo.com\",\n admin: true\n },\n {\n email: \"sarah@gmail.com\",\n admin: 'false'\n },\n {\n email: \"tom@gmail.com\",\n admin: '0'\n },\n {\n email: \"jane@gmail.com\",\n admin: 1\n }\n]" + }, + "id": "85de5f5c-0a4c-4da1-805b-9e056089bcd5", + "name": "Code", + "type": "n8n-nodes-base.code", + "typeVersion": 2, + "position": [ + -500, + 160 + ] + }, + { + "parameters": {}, + "id": "8577ab3b-b9f8-4c4d-a3a1-abb6a9269473", + "name": "true", + "type": "n8n-nodes-base.noOp", + "typeVersion": 1, + "position": [ + 0, + 100 + ] + }, + { + "parameters": { + "conditions": { + "options": { + "caseSensitive": true, + "leftValue": "", + "typeValidation": "loose", + "version": 2 + }, + "conditions": [ + { + "id": "307e4ea0-3a82-4722-aca6-68d882115e8b", + "leftValue": "={{ $json.admin }}", + "rightValue": "", + "operator": { + "type": "boolean", + "operation": "true", + "singleValue": true + } + } + ], + "combinator": "and" + }, + "looseTypeValidation": true, + "options": {} + }, + "type": "n8n-nodes-base.if", + "typeVersion": 2.2, + "position": [ + -280, + 160 + ], + "id": "d5d17556-45e6-44a1-8580-a08395ca38c4", + "name": "loose" + } + ], + "pinData": { + "true": [ + { + "json": { + "email": "sharon@yahoo.com", + "admin": true + } + }, + { + "json": { + "email": "jane@gmail.com", + "admin": 1 + } + } + ], + "false": [ + { + "json": { + "email": "shane@yahoo.com", + "admin": false + } + }, + { + "json": { + "email": "sarah@gmail.com", + "admin": "false" + } + }, + { + "json": { + "email": "tom@gmail.com", + "admin": "0" + } + } + ] + }, + "connections": { + "When clicking \"Execute Workflow\"": { + "main": [ + [ + { + "node": "Code", + "type": "main", + "index": 0 + } + ] + ] + }, + "Code": { + "main": [ + [ + { + "node": "loose", + "type": "main", + "index": 0 + } + ] + ] + }, + "loose": { + "main": [ + [ + { + "node": "true", + "type": "main", + "index": 0 + } + ], + [ + { + "node": "false", + "type": "main", + "index": 0 + } + ] + ] + } + }, + "active": false, + "settings": { + "executionOrder": "v1" + }, + "versionId": "35631b37-dc5e-4155-a54f-41b38584f38e", + "meta": { + "instanceId": "27cc9b56542ad45b38725555722c50a1c3fee1670bbb67980558314ee08517c4" + }, + "id": "JQsdJ4gnZtuDb7Oo", + "tags": [] +} diff --git a/packages/nodes-base/nodes/Switch/Switch.node.ts b/packages/nodes-base/nodes/Switch/Switch.node.ts index fb7262f742fa7..1a85852a1cd33 100644 --- a/packages/nodes-base/nodes/Switch/Switch.node.ts +++ b/packages/nodes-base/nodes/Switch/Switch.node.ts @@ -14,7 +14,7 @@ export class Switch extends VersionedNodeType { iconColor: 'light-blue', group: ['transform'], description: 'Route items depending on defined expression or rules', - defaultVersion: 3.1, + defaultVersion: 3.2, }; const nodeVersions: IVersionedNodeType['nodeVersions'] = { @@ -22,6 +22,7 @@ export class Switch extends VersionedNodeType { 2: new SwitchV2(baseDescription), 3: new SwitchV3(baseDescription), 3.1: new SwitchV3(baseDescription), + 3.2: new SwitchV3(baseDescription), }; super(nodeVersions, baseDescription); diff --git a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts index 6892bc2d212f2..ccc634597bcd8 100644 --- a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts +++ b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts @@ -50,7 +50,7 @@ export class SwitchV3 implements INodeType { this.description = { ...baseDescription, subtitle: `=mode: {{(${capitalize})($parameter["mode"])}}`, - version: [3, 3.1], + version: [3, 3.1, 3.2], defaults: { name: 'Switch', color: '#506000', @@ -160,6 +160,7 @@ export class SwitchV3 implements INodeType { filter: { caseSensitive: '={{!$parameter.options.ignoreCase}}', typeValidation: getTypeValidationStrictness(3.1), + version: '={{ $nodeVersion >= 3.2 ? 2 : 1 }}', }, }, }, diff --git a/packages/nodes-base/utils/constants.ts b/packages/nodes-base/utils/constants.ts index b41e2bd054ad0..592f23d9017a8 100644 --- a/packages/nodes-base/utils/constants.ts +++ b/packages/nodes-base/utils/constants.ts @@ -4,4 +4,4 @@ export const NODE_RAN_MULTIPLE_TIMES_WARNING = export const LOCALHOST = '127.0.0.1'; export const ENABLE_LESS_STRICT_TYPE_VALIDATION = - "Try changing the type of comparison. Alternatively you can enable 'Less Strict Type Validation' in the options."; + "Try changing the type of comparison. Alternatively you can enable 'Convert Value Types'."; diff --git a/packages/nodes-base/utils/descriptions.ts b/packages/nodes-base/utils/descriptions.ts index 75a1116c81948..6921ca8c64ce9 100644 --- a/packages/nodes-base/utils/descriptions.ts +++ b/packages/nodes-base/utils/descriptions.ts @@ -34,7 +34,7 @@ export const returnAllOrLimit: INodeProperties[] = [ ]; export const looseTypeValidationProperty: INodeProperties = { - displayName: 'Less Strict Type Validation', + displayName: 'Convert Value Types', description: 'Whether to try casting value types based on the selected operator', name: 'looseTypeValidation', type: 'boolean', diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index ae6ce96f70a68..c8e3f307c9666 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -1292,13 +1292,14 @@ type NonEmptyArray = [T, ...T[]]; export type FilterTypeCombinator = 'and' | 'or'; -export type FilterTypeOptions = Partial<{ - caseSensitive: boolean | string; // default = true - leftValue: string; // when set, user can't edit left side of condition - allowedCombinators: NonEmptyArray; // default = ['and', 'or'] - maxConditions: number; // default = 10 - typeValidation: 'strict' | 'loose' | {}; // default = strict, `| {}` is a TypeScript trick to allow custom strings, but still give autocomplete -}>; +export type FilterTypeOptions = { + version: 1 | 2 | {}; // required so nodes are pinned on a version + caseSensitive?: boolean | string; // default = true + leftValue?: string; // when set, user can't edit left side of condition + allowedCombinators?: NonEmptyArray; // default = ['and', 'or'] + maxConditions?: number; // default = 10 + typeValidation?: 'strict' | 'loose' | {}; // default = strict, `| {}` is a TypeScript trick to allow custom strings (expressions), but still give autocomplete +}; export type AssignmentTypeOptions = Partial<{ hideType?: boolean; // visible by default @@ -2554,6 +2555,7 @@ export type FilterOptionsValue = { caseSensitive: boolean; leftValue: string; typeValidation: 'strict' | 'loose'; + version: 1 | 2; }; export type FilterValue = { diff --git a/packages/workflow/src/NodeParameters/FilterParameter.ts b/packages/workflow/src/NodeParameters/FilterParameter.ts index 2c2fabf96ba4f..39ca0af9d2fc9 100644 --- a/packages/workflow/src/NodeParameters/FilterParameter.ts +++ b/packages/workflow/src/NodeParameters/FilterParameter.ts @@ -32,12 +32,18 @@ function parseSingleFilterValue( value: unknown, type: FilterOperatorType, strict = false, + version: FilterOptionsValue['version'] = 1, ): ValidationResult { if (type === 'any' || value === null || value === undefined) { return { valid: true, newValue: value } as ValidationResult; } if (type === 'boolean' && !strict) { + if (version >= 2) { + const result = validateFieldType('filter', value, type); + if (result.valid) return result; + } + return { valid: true, newValue: Boolean(value) }; } @@ -53,6 +59,7 @@ const withIndefiniteArticle = (noun: string): string => { return `${article} ${noun}`; }; +// eslint-disable-next-line complexity function parseFilterConditionValues( condition: FilterConditionValue, options: FilterOptionsValue, @@ -62,10 +69,16 @@ function parseFilterConditionValues( const itemIndex = metadata.itemIndex ?? 0; const errorFormat = metadata.errorFormat ?? 'full'; const strict = options.typeValidation === 'strict'; + const version = options.version ?? 1; const { operator } = condition; const rightType = operator.rightType ?? operator.type; - const parsedLeftValue = parseSingleFilterValue(condition.leftValue, operator.type, strict); - const parsedRightValue = parseSingleFilterValue(condition.rightValue, rightType, strict); + const parsedLeftValue = parseSingleFilterValue( + condition.leftValue, + operator.type, + strict, + version, + ); + const parsedRightValue = parseSingleFilterValue(condition.rightValue, rightType, strict, version); const leftValid = parsedLeftValue.valid || (metadata.unresolvedExpressions && @@ -96,7 +109,7 @@ function parseFilterConditionValues( const getTypeDescription = (isStrict: boolean) => { if (isStrict) - return 'Try changing the type of the comparison, or enabling less strict type validation.'; + return "Try changing the type of comparison. Alternatively you can enable 'Convert Value Types'."; return 'Try changing the type of the comparison.'; }; @@ -122,7 +135,7 @@ function parseFilterConditionValues( return `

Try either:

    -
  1. Enabling less strict type validation
  2. +
  3. Enabling 'Convert Value Types'
  4. Converting the ${valuePosition} field to ${expectedType}${suggestFunction}
`; diff --git a/packages/workflow/test/FilterParameter.test.ts b/packages/workflow/test/FilterParameter.test.ts index c99dc59ba779a..b22460f998d89 100644 --- a/packages/workflow/test/FilterParameter.test.ts +++ b/packages/workflow/test/FilterParameter.test.ts @@ -19,6 +19,7 @@ const filterFactory = (data: DeepPartial = {}): FilterValue => combinator: 'and', conditions: [], options: { + version: 1, leftValue: '', caseSensitive: false, typeValidation: 'strict', @@ -234,6 +235,48 @@ describe('FilterParameter', () => { }); }); + describe('options.version', () => { + describe('version 1', () => { + it('should parse "false" as true', () => { + expect( + executeFilter( + filterFactory({ + conditions: [ + { + id: '1', + leftValue: 'false', + rightValue: false, + operator: { operation: 'equals', type: 'boolean' }, + }, + ], + options: { typeValidation: 'loose', version: 1 }, + }), + ), + ).toEqual(false); + }); + }); + + describe('version 2', () => { + it('should parse "false" as false', () => { + expect( + executeFilter( + filterFactory({ + conditions: [ + { + id: '1', + leftValue: 'false', + rightValue: false, + operator: { operation: 'equals', type: 'boolean' }, + }, + ], + options: { typeValidation: 'loose', version: 2 }, + }), + ), + ).toEqual(true); + }); + }); + }); + describe('operators', () => { describe('exists', () => { it.each([ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8895ba097b4b8..aff535a450d21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -601,7 +601,7 @@ importers: version: 7.2.0(eslint@8.57.0)(typescript@5.5.2) '@vue/eslint-config-prettier': specifier: ^9.0.0 - version: 9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.2.5) + version: 9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.3.3) '@vue/eslint-config-typescript': specifier: ^13.0.0 version: 13.0.0(eslint-plugin-vue@9.23.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.5.2) @@ -628,7 +628,7 @@ importers: version: 1.0.0 eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5) + version: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: ^51.0.1 version: 51.0.1(eslint@8.57.0) @@ -3604,16 +3604,23 @@ packages: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.2.1': resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/source-map@0.3.2': - resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} + '@jridgewell/source-map@0.3.6': + resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -6103,6 +6110,10 @@ packages: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} + acorn-walk@8.3.3: + resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} + engines: {node: '>=0.4.0'} + acorn@7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} @@ -11206,6 +11217,11 @@ packages: engines: {node: '>=14'} hasBin: true + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -13139,8 +13155,8 @@ packages: vue-component-type-helpers@2.0.19: resolution: {integrity: sha512-cN3f1aTxxKo4lzNeQAkVopswuImUrb5Iurll9Gaw5cqpnbTAxtEMM1mgi6ou4X79OCyqYv1U1mzBHJkzmiK82w==} - vue-component-type-helpers@2.1.4: - resolution: {integrity: sha512-aVqB3KxwpM76cYRkpnezl1J62E/1omzHQfx1yuz7zcbxmzmP/PeSgI20NEmkdeGnjZPVzm0V9fB4ZyRu5BBj4A==} + vue-component-type-helpers@2.1.6: + resolution: {integrity: sha512-ng11B8B/ZADUMMOsRbqv0arc442q7lifSubD0v8oDXIFoMg/mXwAPUunrroIDkY+mcD0dHKccdaznSVp8EoX3w==} vue-demi@0.14.5: resolution: {integrity: sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==} @@ -16408,9 +16424,12 @@ snapshots: '@jridgewell/resolve-uri@3.1.0': {} + '@jridgewell/resolve-uri@3.1.2': + optional: true + '@jridgewell/set-array@1.2.1': {} - '@jridgewell/source-map@0.3.2': + '@jridgewell/source-map@0.3.6': dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 @@ -16418,6 +16437,9 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': + optional: true + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.0 @@ -16425,8 +16447,8 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 optional: true '@js-joda/core@5.6.1': {} @@ -18296,7 +18318,7 @@ snapshots: node-fetch: 2.7.0(encoding@0.1.13) picomatch: 2.3.1 pkg-dir: 5.0.0 - prettier-fallback: prettier@3.2.5 + prettier-fallback: prettier@3.3.3 pretty-hrtime: 1.0.3 resolve-from: 5.0.0 semver: 7.6.0 @@ -18571,7 +18593,7 @@ snapshots: ts-dedent: 2.2.0 type-fest: 2.19.0 vue: 3.4.21(typescript@5.5.2) - vue-component-type-helpers: 2.1.4 + vue-component-type-helpers: 2.1.6 transitivePeerDependencies: - encoding - prettier @@ -19503,12 +19525,12 @@ snapshots: '@vue/devtools-api@6.5.0': {} - '@vue/eslint-config-prettier@9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.2.5)': + '@vue/eslint-config-prettier@9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.3.3)': dependencies: eslint: 8.57.0 eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-plugin-prettier: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5) - prettier: 3.2.5 + eslint-plugin-prettier: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) + prettier: 3.3.3 transitivePeerDependencies: - '@types/eslint' @@ -19677,6 +19699,11 @@ snapshots: acorn-walk@8.3.2: {} + acorn-walk@8.3.3: + dependencies: + acorn: 8.12.1 + optional: true + acorn@7.4.1: {} acorn@8.12.1: {} @@ -21622,7 +21649,7 @@ snapshots: eslint-import-resolver-node@0.3.9: dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7(supports-color@8.1.1) is-core-module: 2.13.1 resolve: 1.22.8 transitivePeerDependencies: @@ -21647,7 +21674,7 @@ snapshots: eslint-module-utils@2.8.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7(supports-color@8.1.1) optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 @@ -21667,7 +21694,7 @@ snapshots: array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7(supports-color@8.1.1) doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -21709,10 +21736,10 @@ snapshots: - supports-color - typescript - eslint-plugin-prettier@5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5): + eslint-plugin-prettier@5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): dependencies: eslint: 8.57.0 - prettier: 3.2.5 + prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 optionalDependencies: @@ -22537,7 +22564,7 @@ snapshots: array-parallel: 0.1.3 array-series: 0.1.5 cross-spawn: 4.0.2 - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -25558,7 +25585,7 @@ snapshots: pdf-parse@1.1.1: dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7(supports-color@8.1.1) node-ensure: 0.0.0 transitivePeerDependencies: - supports-color @@ -25803,6 +25830,8 @@ snapshots: prettier@3.2.5: {} + prettier@3.3.3: {} + pretty-bytes@5.6.0: {} pretty-format@27.5.1: @@ -26444,7 +26473,7 @@ snapshots: rhea@1.0.24: dependencies: - debug: 3.2.7(supports-color@5.5.0) + debug: 3.2.7(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -27346,7 +27375,7 @@ snapshots: terser@5.16.1: dependencies: - '@jridgewell/source-map': 0.3.2 + '@jridgewell/source-map': 0.3.6 acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -27516,7 +27545,7 @@ snapshots: '@tsconfig/node16': 1.0.4 '@types/node': 18.16.16 acorn: 8.12.1 - acorn-walk: 8.3.2 + acorn-walk: 8.3.3 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -28055,7 +28084,7 @@ snapshots: vue-component-type-helpers@2.0.19: {} - vue-component-type-helpers@2.1.4: {} + vue-component-type-helpers@2.1.6: {} vue-demi@0.14.5(vue@3.4.21(typescript@5.5.2)): dependencies: From fbdb2df501fed5169e31c407c3946c7485d0f501 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Fri, 6 Sep 2024 09:36:42 +0200 Subject: [PATCH 2/3] Fix typing issue --- packages/editor-ui/src/components/FilterConditions/constants.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/editor-ui/src/components/FilterConditions/constants.ts b/packages/editor-ui/src/components/FilterConditions/constants.ts index 4da26b9116f3d..4410191cf9bfd 100644 --- a/packages/editor-ui/src/components/FilterConditions/constants.ts +++ b/packages/editor-ui/src/components/FilterConditions/constants.ts @@ -8,6 +8,7 @@ export const DEFAULT_FILTER_OPTIONS: FilterOptionsValue = { caseSensitive: true, leftValue: '', typeValidation: 'strict', + version: 1, }; export const OPERATORS_BY_ID = { From a1e0b51a2ffbff8d6d1fc724f907cd20d1c693a2 Mon Sep 17 00:00:00 2001 From: Elias Meire Date: Fri, 6 Sep 2024 09:46:11 +0200 Subject: [PATCH 3/3] Revert lock file changes --- pnpm-lock.yaml | 79 ++++++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 54 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aff535a450d21..8895ba097b4b8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -601,7 +601,7 @@ importers: version: 7.2.0(eslint@8.57.0)(typescript@5.5.2) '@vue/eslint-config-prettier': specifier: ^9.0.0 - version: 9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.3.3) + version: 9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.2.5) '@vue/eslint-config-typescript': specifier: ^13.0.0 version: 13.0.0(eslint-plugin-vue@9.23.0(eslint@8.57.0))(eslint@8.57.0)(typescript@5.5.2) @@ -628,7 +628,7 @@ importers: version: 1.0.0 eslint-plugin-prettier: specifier: ^5.1.3 - version: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) + version: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5) eslint-plugin-unicorn: specifier: ^51.0.1 version: 51.0.1(eslint@8.57.0) @@ -3604,23 +3604,16 @@ packages: resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.2.1': resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/source-map@0.3.6': - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} + '@jridgewell/source-map@0.3.2': + resolution: {integrity: sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==} '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -6110,10 +6103,6 @@ packages: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - acorn-walk@8.3.3: - resolution: {integrity: sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==} - engines: {node: '>=0.4.0'} - acorn@7.4.1: resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==} engines: {node: '>=0.4.0'} @@ -11217,11 +11206,6 @@ packages: engines: {node: '>=14'} hasBin: true - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} @@ -13155,8 +13139,8 @@ packages: vue-component-type-helpers@2.0.19: resolution: {integrity: sha512-cN3f1aTxxKo4lzNeQAkVopswuImUrb5Iurll9Gaw5cqpnbTAxtEMM1mgi6ou4X79OCyqYv1U1mzBHJkzmiK82w==} - vue-component-type-helpers@2.1.6: - resolution: {integrity: sha512-ng11B8B/ZADUMMOsRbqv0arc442q7lifSubD0v8oDXIFoMg/mXwAPUunrroIDkY+mcD0dHKccdaznSVp8EoX3w==} + vue-component-type-helpers@2.1.4: + resolution: {integrity: sha512-aVqB3KxwpM76cYRkpnezl1J62E/1omzHQfx1yuz7zcbxmzmP/PeSgI20NEmkdeGnjZPVzm0V9fB4ZyRu5BBj4A==} vue-demi@0.14.5: resolution: {integrity: sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==} @@ -16424,12 +16408,9 @@ snapshots: '@jridgewell/resolve-uri@3.1.0': {} - '@jridgewell/resolve-uri@3.1.2': - optional: true - '@jridgewell/set-array@1.2.1': {} - '@jridgewell/source-map@0.3.6': + '@jridgewell/source-map@0.3.2': dependencies: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 @@ -16437,9 +16418,6 @@ snapshots: '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': - optional: true - '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.0 @@ -16447,8 +16425,8 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.15 optional: true '@js-joda/core@5.6.1': {} @@ -18318,7 +18296,7 @@ snapshots: node-fetch: 2.7.0(encoding@0.1.13) picomatch: 2.3.1 pkg-dir: 5.0.0 - prettier-fallback: prettier@3.3.3 + prettier-fallback: prettier@3.2.5 pretty-hrtime: 1.0.3 resolve-from: 5.0.0 semver: 7.6.0 @@ -18593,7 +18571,7 @@ snapshots: ts-dedent: 2.2.0 type-fest: 2.19.0 vue: 3.4.21(typescript@5.5.2) - vue-component-type-helpers: 2.1.6 + vue-component-type-helpers: 2.1.4 transitivePeerDependencies: - encoding - prettier @@ -19525,12 +19503,12 @@ snapshots: '@vue/devtools-api@6.5.0': {} - '@vue/eslint-config-prettier@9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.3.3)': + '@vue/eslint-config-prettier@9.0.0(@types/eslint@8.56.5)(eslint@8.57.0)(prettier@3.2.5)': dependencies: eslint: 8.57.0 eslint-config-prettier: 9.1.0(eslint@8.57.0) - eslint-plugin-prettier: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3) - prettier: 3.3.3 + eslint-plugin-prettier: 5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5) + prettier: 3.2.5 transitivePeerDependencies: - '@types/eslint' @@ -19699,11 +19677,6 @@ snapshots: acorn-walk@8.3.2: {} - acorn-walk@8.3.3: - dependencies: - acorn: 8.12.1 - optional: true - acorn@7.4.1: {} acorn@8.12.1: {} @@ -21649,7 +21622,7 @@ snapshots: eslint-import-resolver-node@0.3.9: dependencies: - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7(supports-color@5.5.0) is-core-module: 2.13.1 resolve: 1.22.8 transitivePeerDependencies: @@ -21674,7 +21647,7 @@ snapshots: eslint-module-utils@2.8.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7(supports-color@5.5.0) optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 @@ -21694,7 +21667,7 @@ snapshots: array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7(supports-color@5.5.0) doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -21736,10 +21709,10 @@ snapshots: - supports-color - typescript - eslint-plugin-prettier@5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3): + eslint-plugin-prettier@5.1.3(@types/eslint@8.56.5)(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.2.5): dependencies: eslint: 8.57.0 - prettier: 3.3.3 + prettier: 3.2.5 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 optionalDependencies: @@ -22564,7 +22537,7 @@ snapshots: array-parallel: 0.1.3 array-series: 0.1.5 cross-spawn: 4.0.2 - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -25585,7 +25558,7 @@ snapshots: pdf-parse@1.1.1: dependencies: - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7(supports-color@5.5.0) node-ensure: 0.0.0 transitivePeerDependencies: - supports-color @@ -25830,8 +25803,6 @@ snapshots: prettier@3.2.5: {} - prettier@3.3.3: {} - pretty-bytes@5.6.0: {} pretty-format@27.5.1: @@ -26473,7 +26444,7 @@ snapshots: rhea@1.0.24: dependencies: - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7(supports-color@5.5.0) transitivePeerDependencies: - supports-color @@ -27375,7 +27346,7 @@ snapshots: terser@5.16.1: dependencies: - '@jridgewell/source-map': 0.3.6 + '@jridgewell/source-map': 0.3.2 acorn: 8.12.1 commander: 2.20.3 source-map-support: 0.5.21 @@ -27545,7 +27516,7 @@ snapshots: '@tsconfig/node16': 1.0.4 '@types/node': 18.16.16 acorn: 8.12.1 - acorn-walk: 8.3.3 + acorn-walk: 8.3.2 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 @@ -28084,7 +28055,7 @@ snapshots: vue-component-type-helpers@2.0.19: {} - vue-component-type-helpers@2.1.6: {} + vue-component-type-helpers@2.1.4: {} vue-demi@0.14.5(vue@3.4.21(typescript@5.5.2)): dependencies: