build: Upgrade some of the backend dev-tooling (no-changelog) (#4589)

* upgrade ts-node

* move tslint and typescript to a single place

* source-map-support should be loaded in the `n8n` bin script, and not in core

* upgrade jest

* Support only node.js 14, 16, or 18
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-14 15:37:32 +01:00
committed by GitHub
parent edebad1a89
commit 0148631d28
15 changed files with 574 additions and 435 deletions

View File

@@ -583,8 +583,8 @@ export interface IExecuteFunctions {
outputIndex?: number,
): Promise<INodeExecutionData[][]>;
putExecutionToWait(waitTill: Date): Promise<void>;
sendMessageToUI(message: any): void; // tslint:disable-line:no-any
sendResponse(response: IExecuteResponsePromiseData): void; // tslint:disable-line:no-any
sendMessageToUI(message: any): void;
sendResponse(response: IExecuteResponsePromiseData): void;
helpers: {
httpRequest(
requestOptions: IHttpRequestOptions,
@@ -595,7 +595,7 @@ export interface IExecuteFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
[key: string]: (...args: any[]) => any;
};
}
@@ -629,7 +629,7 @@ export interface IExecuteSingleFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
[key: string]: (...args: any[]) => any;
};
}
@@ -679,7 +679,7 @@ export interface ILoadOptionsFunctions {
requestWithAuthentication(
this: IAllExecuteFunctions,
credentialsType: string,
requestOptions: any, // tslint:disable-line:no-any
requestOptions: any,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<any>;
httpRequestWithAuthentication(
@@ -688,7 +688,7 @@ export interface ILoadOptionsFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: ((...args: any[]) => any) | undefined; // tslint:disable-line:no-any
[key: string]: ((...args: any[]) => any) | undefined;
};
}
@@ -718,7 +718,7 @@ export interface IHookFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
[key: string]: (...args: any[]) => any;
};
}
@@ -752,7 +752,7 @@ export interface IPollFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
[key: string]: (...args: any[]) => any;
};
}
@@ -786,7 +786,7 @@ export interface ITriggerFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
[key: string]: (...args: any[]) => any;
};
}
@@ -824,7 +824,7 @@ export interface IWebhookFunctions {
requestOptions: IHttpRequestOptions,
additionalCredentialOptions?: IAdditionalCredentialOptions,
): Promise<IN8nHttpResponse | IN8nHttpFullResponse>;
[key: string]: (...args: any[]) => any; // tslint:disable-line:no-any
[key: string]: (...args: any[]) => any;
};
}

View File

@@ -38,7 +38,6 @@ export class WorkflowHooks {
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
async executeHookFunctions(hookName: string, parameters: any[]) {
// tslint:disable-line:no-any
if (this.hookFunctions[hookName] !== undefined && Array.isArray(this.hookFunctions[hookName])) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, no-restricted-syntax
for (const hookFunction of this.hookFunctions[hookName]!) {