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