fix(core): Replace all moment imports with moment-timezone (#8337)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-01-15 15:45:33 +01:00 committed by GitHub
parent e3cedf7db0
commit 52a2e25a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 33 additions and 37 deletions

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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,

View file

@ -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';

View file

@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';
import { testWorkflows, getWorkflowFilenames } from '@test/nodes/Helpers';
const workflows = getWorkflowFilenames(__dirname);

View file

@ -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]';

View file

@ -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';

View file

@ -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,

View file

@ -8,7 +8,7 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import moment from 'moment';
import moment from 'moment-timezone';
import {
allFields,
cleanData,

View file

@ -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';

View file

@ -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,

View file

@ -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,

View file

@ -1,4 +1,4 @@
import moment from 'moment';
import moment from 'moment-timezone';
import type {
IExecuteFunctions,
INodeExecutionData,

View file

@ -8,7 +8,7 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import moment from 'moment';
import moment from 'moment-timezone';
import {
campaignFieldsMetadata,
mailchimpApiRequest,

View file

@ -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';

View file

@ -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 {

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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 = {

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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';

View file

@ -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(

View file

@ -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 {

View file

@ -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';

View file

@ -6,7 +6,7 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import moment from 'moment';
import moment from 'moment-timezone';
import {
convertNETDates,
unleashedApiRequest,

View file

@ -6,7 +6,7 @@ import type {
INodeTypeDescription,
} from 'n8n-workflow';
import moment from 'moment';
import moment from 'moment-timezone';
import { venafiApiRequest } from './GenericFunctions';

View file

@ -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",

View file

@ -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