mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Avoid passing around static state like default timezone (no-changelog) (#7221)
This commit is contained in:
committed by
GitHub
parent
62c096710f
commit
35bb42c1b9
@@ -1,10 +1,7 @@
|
||||
import type { IDataObject } from '@/Interfaces';
|
||||
import { Expression } from '@/Expression';
|
||||
import { Workflow } from '@/Workflow';
|
||||
import * as Helpers from '../Helpers';
|
||||
|
||||
export const TEST_TIMEZONE = 'America/New_York';
|
||||
|
||||
export const nodeTypes = Helpers.NodeTypes();
|
||||
export const workflow = new Workflow({
|
||||
nodes: [
|
||||
@@ -20,11 +17,8 @@ export const workflow = new Workflow({
|
||||
connections: {},
|
||||
active: false,
|
||||
nodeTypes,
|
||||
settings: {
|
||||
timezone: TEST_TIMEZONE,
|
||||
},
|
||||
});
|
||||
export const expression = new Expression(workflow);
|
||||
export const expression = workflow.expression;
|
||||
|
||||
export const evaluate = (value: string, values?: IDataObject[]) =>
|
||||
expression.getParameterValue(
|
||||
@@ -35,7 +29,6 @@ export const evaluate = (value: string, values?: IDataObject[]) =>
|
||||
'node',
|
||||
values?.map((v) => ({ json: v })) ?? [],
|
||||
'manual',
|
||||
TEST_TIMEZONE,
|
||||
{},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user