mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Replace all moment imports with moment-timezone (#8337)
This commit is contained in:
committed by
GitHub
parent
e3cedf7db0
commit
52a2e25a25
@@ -7,7 +7,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import type { IRecord } from './v1/GenericFunctions';
|
||||
import { apiRequestAllItems, downloadRecordAttachments } from './v1/GenericFunctions';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import { capitalCase } from 'change-case';
|
||||
import { apiRequest } from '../../../transport';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { IExecuteFunctions, IDataObject, INodeExecutionData } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import { capitalCase } from 'change-case';
|
||||
import { apiRequest } from '../../../transport';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
export async function cortexApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import type { IExecuteFunctions } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers';
|
||||
|
||||
const workflows = getWorkflowFilenames(__dirname);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { INode, NodeParameterValue } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
const isDateObject = (value: NodeParameterValue) =>
|
||||
Object.prototype.toString.call(value) === '[object Date]';
|
||||
|
||||
@@ -10,7 +10,7 @@ import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import type { OptionsWithUri } from 'request';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import * as losslessJSON from 'lossless-json';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import {
|
||||
encodeURIComponentOnce,
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import {
|
||||
allFields,
|
||||
cleanData,
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants';
|
||||
import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions';
|
||||
import { fileSearch, folderSearch } from './v2/methods/listSearch';
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
export async function hubspotApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
export async function hubspotApiRequest(
|
||||
this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import {
|
||||
campaignFieldsMetadata,
|
||||
mailchimpApiRequest,
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import map from 'lodash/map';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { nasaApiRequest, nasaApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
export class Nasa implements INodeType {
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { notionApiRequest, simplifyObjects } from './GenericFunctions';
|
||||
|
||||
import { getDatabases } from './SearchFunctions';
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { orbitApiRequest, orbitApiRequestAllItems, resolveIdentities } from './GenericFunctions';
|
||||
|
||||
import { activityFields, activityOperations } from './ActivityDescription';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { ouraApiRequest } from './GenericFunctions';
|
||||
|
||||
import { profileOperations } from './ProfileDescription';
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { couponFields, couponOperations } from './CouponDescription';
|
||||
|
||||
import { paddleApiRequest, paddleApiRequestAllItems, validateJSON } from './GenericFunctions';
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import Parser from 'rss-parser';
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
export class RssFeedReadTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { getColumns, rowFormatColumns, seaTableApiRequest, simplify } from './GenericFunctions';
|
||||
|
||||
import type { ICtx, IRow, IRowResponse } from './Interfaces';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { companyFields, companyOperations } from './descriptions/CompanyDescription';
|
||||
|
||||
import { industryFields, industryOperations } from './descriptions/IndustryDescription';
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { channelFields, channelOperations } from './ChannelDescription';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
import { starFields, starOperations } from './StarDescription';
|
||||
|
||||
@@ -17,7 +17,7 @@ import type {
|
||||
|
||||
import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { channelFields, channelOperations } from './ChannelDescription';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
import { starFields, starOperations } from './StarDescription';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { spontitApiRequest } from './GenericFunctions';
|
||||
|
||||
import { pushFields, pushOperations } from './PushDescription';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { stravaApiRequest, stravaApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
import { activityFields, activityOperations } from './ActivityDescription';
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { ApplicationError, jsonParse } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { Eq } from './QueryFunctions';
|
||||
|
||||
export async function theHiveApiRequest(
|
||||
|
||||
@@ -8,7 +8,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { togglApiRequest } from './GenericFunctions';
|
||||
|
||||
export class TogglTrigger implements INodeType {
|
||||
|
||||
@@ -9,7 +9,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import { twistApiRequest } from './GenericFunctions';
|
||||
|
||||
import { channelFields, channelOperations } from './ChannelDescription';
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
import {
|
||||
convertNETDates,
|
||||
unleashedApiRequest,
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import { venafiApiRequest } from './GenericFunctions';
|
||||
|
||||
|
||||
@@ -860,7 +860,6 @@
|
||||
"luxon": "3.3.0",
|
||||
"mailparser": "3.5.0",
|
||||
"minifaker": "1.34.1",
|
||||
"moment": "2.29.4",
|
||||
"moment-timezone": "0.5.37",
|
||||
"mongodb": "4.17.1",
|
||||
"mqtt": "5.0.2",
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -1308,9 +1308,6 @@ importers:
|
||||
minifaker:
|
||||
specifier: 1.34.1
|
||||
version: 1.34.1
|
||||
moment:
|
||||
specifier: 2.29.4
|
||||
version: 2.29.4
|
||||
moment-timezone:
|
||||
specifier: 0.5.37
|
||||
version: 0.5.37
|
||||
|
||||
Reference in New Issue
Block a user