refactor(core): Remove legacy expression evaluator (#14518)

This commit is contained in:
Iván Ovejero
2025-05-13 17:29:48 +02:00
committed by GitHub
parent 694af6c9f0
commit 131baabb7f
22 changed files with 221 additions and 423 deletions

View File

@@ -44,9 +44,6 @@ export const defaultSettings: FrontendSettings = {
},
},
},
expressions: {
evaluator: 'tournament',
},
executionMode: 'regular',
isMultiMain: false,
executionTimeout: 0,

View File

@@ -2,7 +2,7 @@ import { ref } from 'vue';
import { useHistoryStore } from '@/stores/history.store';
import { CUSTOM_API_CALL_KEY, PLACEHOLDER_FILLED_AT_EXECUTION_TIME } from '@/constants';
import { NodeHelpers, ExpressionEvaluatorProxy, NodeConnectionTypes } from 'n8n-workflow';
import { NodeHelpers, NodeConnectionTypes } from 'n8n-workflow';
import type {
INodeProperties,
INodeCredentialDescription,
@@ -37,7 +37,6 @@ import type {
import { isString } from '@/utils/typeGuards';
import { isObject } from '@/utils/objectUtils';
import { useSettingsStore } from '@/stores/settings.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
import { useCredentialsStore } from '@/stores/credentials.store';
@@ -702,9 +701,6 @@ export function useNodeHelpers() {
if (nodeType?.subtitle !== undefined) {
try {
ExpressionEvaluatorProxy.setEvaluator(
useSettingsStore().settings.expressions?.evaluator ?? 'tmpl',
);
return workflow.expression.getSimpleParameterValue(
data,
nodeType.subtitle,

View File

@@ -24,12 +24,7 @@ import type {
NodeParameterValue,
Workflow,
} from 'n8n-workflow';
import {
NodeConnectionTypes,
ExpressionEvaluatorProxy,
NodeHelpers,
WEBHOOK_NODE_TYPE,
} from 'n8n-workflow';
import { NodeConnectionTypes, NodeHelpers, WEBHOOK_NODE_TYPE } from 'n8n-workflow';
import type {
ICredentialsResponse,
@@ -60,7 +55,6 @@ import { useTemplatesStore } from '@/stores/templates.store';
import { useUIStore } from '@/stores/ui.store';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { getSourceItems } from '@/utils/pairedItemUtils';
import { useSettingsStore } from '@/stores/settings.store';
import { getCredentialTypeName, isCredentialOnlyNodeType } from '@/utils/credentialOnlyNodes';
import { useDocumentTitle } from '@/composables/useDocumentTitle';
import { useExternalHooks } from '@/composables/useExternalHooks';
@@ -229,9 +223,6 @@ export function resolveParameter<T = IDataObject>(
_executeData = executeData(parentNode, contextNode!.name, inputName, runIndexParent);
}
ExpressionEvaluatorProxy.setEvaluator(
useSettingsStore().settings.expressions?.evaluator ?? 'tmpl',
);
return workflow.expression.getParameterValue(
parameter,
runExecutionData,

View File

@@ -10,7 +10,6 @@ import type { ILdapConfig } from '@/Interface';
import { STORES, INSECURE_CONNECTION_WARNING } from '@/constants';
import { UserManagementAuthenticationMethod } from '@/Interface';
import type { IDataObject, WorkflowSettings } from 'n8n-workflow';
import { ExpressionEvaluatorProxy } from 'n8n-workflow';
import { defineStore } from 'pinia';
import { useRootStore } from './root.store';
import { useUIStore } from './ui.store';
@@ -300,8 +299,6 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
try {
await getSettings();
ExpressionEvaluatorProxy.setEvaluator(settings.value.expressions.evaluator);
initialized.value = true;
} catch (e) {
showToast({