refactor: Use NodeConnectionType consistently across the code base (no-changelog) (#10595)

This commit is contained in:
Ricardo Espinoza
2024-08-29 09:55:53 -04:00
committed by GitHub
parent 1491cbd228
commit c4eb3746d7
521 changed files with 2259 additions and 1999 deletions

View File

@@ -4,9 +4,8 @@ import {
type INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import { numberInputsProperty } from '../../helpers/descriptions';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [numberInputsProperty];

View File

@@ -1,9 +1,8 @@
import { NodeOperationError } from 'n8n-workflow';
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { preparePairedItemDataArray, updateDisplayOptions } from '@utils/utilities';
import { numberInputsProperty } from '../../helpers/descriptions';
import { preparePairedItemDataArray, updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
numberInputsProperty,

View File

@@ -5,13 +5,12 @@ import type {
IPairedItemData,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import merge from 'lodash/merge';
import type { ClashResolveOptions } from '../../helpers/interfaces';
import { clashHandlingProperties, fuzzyCompareProperty } from '../../helpers/descriptions';
import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils';
import merge from 'lodash/merge';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
{

View File

@@ -5,8 +5,6 @@ import type {
INodeProperties,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import type {
ClashResolveOptions,
MatchFieldsJoinMode,
@@ -22,6 +20,7 @@ import {
findMatches,
mergeMatched,
} from '../../helpers/utils';
import { updateDisplayOptions } from '@utils/utilities';
const multipleMatchesProperty: INodeProperties = {
displayName: 'Multiple Matches',

View File

@@ -6,13 +6,12 @@ import {
type IPairedItemData,
} from 'n8n-workflow';
import { updateDisplayOptions } from '@utils/utilities';
import merge from 'lodash/merge';
import type { ClashResolveOptions } from '../../helpers/interfaces';
import { clashHandlingProperties, numberInputsProperty } from '../../helpers/descriptions';
import { addSuffixToEntriesKeys, selectMergeMethod } from '../../helpers/utils';
import merge from 'lodash/merge';
import { updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
numberInputsProperty,

View File

@@ -7,11 +7,10 @@ import type {
} from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import { getResolvables, updateDisplayOptions } from '@utils/utilities';
import { numberInputsProperty } from '../../helpers/descriptions';
import alasql from 'alasql';
import type { Database } from 'alasql';
import { numberInputsProperty } from '../../helpers/descriptions';
import { getResolvables, updateDisplayOptions } from '@utils/utilities';
export const properties: INodeProperties[] = [
numberInputsProperty,

View File

@@ -1,7 +1,7 @@
import { NodeExecutionOutput, type IExecuteFunctions } from 'n8n-workflow';
import { getNodeInputsData } from '../helpers/utils';
import type { MergeType } from './node.type';
import * as mode from './mode';
import { getNodeInputsData } from '../helpers/utils';
export async function router(this: IExecuteFunctions) {
const inputsData = getNodeInputsData.call(this);

View File

@@ -1,9 +1,8 @@
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
import type { INodeTypeDescription } from 'n8n-workflow';
import * as mode from './mode';
import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow';
import { configuredInputs } from '../helpers/utils';
import * as mode from './mode';
export const versionDescription: INodeTypeDescription = {
displayName: 'Merge',
@@ -15,7 +14,7 @@ export const versionDescription: INodeTypeDescription = {
name: 'Merge',
},
inputs: `={{(${configuredInputs})($parameter)}}`,
outputs: ['main'],
outputs: [NodeConnectionType.Main],
// If mode is chooseBranch data from both branches is required
// to continue, else data from any input suffices
requiredInputs: '={{ $parameter["mode"] === "chooseBranch" ? [0, 1] : 1 }}',

View File

@@ -15,9 +15,8 @@ import get from 'lodash/get';
import merge from 'lodash/merge';
import mergeWith from 'lodash/mergeWith';
import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';
import type { ClashResolveOptions, MatchFieldsJoinMode, MatchFieldsOptions } from './interfaces';
import { fuzzyCompare, preparePairedItemDataArray } from '@utils/utilities';
type PairToMatch = {
field1: string;