Fix npm deprecation warnings and minimize dependency overrides
Bump @n8n/node-cli to 0.37.1 (the `^0.24.1` range was trapping it at 0.24.x), which pulls an updated toolchain and clears the eslint@8, glob@7, inflight, rimraf@3, @humanwhocodes/*, node-domexception and uuid@10 deprecation warnings at the source. Add a glob override (^13.0.6) so rimraf@6 no longer pulls the deprecated glob@11, and trim the overrides list down to the three that actually do work (uuid, js-yaml, glob); the rest were redundant or dead. npm audit reports 0 vulnerabilities. The upgraded @n8n/eslint-plugin-community-nodes rules flagged two pre-existing issues in the Probo node, now fixed: handle continueOnFail() in execute() and throw NodeOperationError instead of raw Error. The only remaining warning is @langchain/community, whose entire package is deprecated upstream and is a hard dependency of @n8n/ai-utilities. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
import {
|
||||
NodeConnectionTypes,
|
||||
NodeOperationError,
|
||||
type IExecuteFunctions,
|
||||
type INodeExecutionData,
|
||||
type INodeType,
|
||||
@@ -249,12 +250,23 @@ export class Probo implements INodeType {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const resource = this.getNodeParameter('resource', i) as string;
|
||||
const operation = this.getNodeParameter('operation', i, 'execute') as string;
|
||||
try {
|
||||
const resource = this.getNodeParameter('resource', i) as string;
|
||||
const operation = this.getNodeParameter('operation', i, 'execute') as string;
|
||||
|
||||
const executeFunction = getExecuteFunction(resource, operation);
|
||||
const result = await executeFunction.call(this, i);
|
||||
returnData.push(result);
|
||||
const executeFunction = getExecuteFunction(resource, operation);
|
||||
const result = await executeFunction.call(this, i);
|
||||
returnData.push(result);
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({
|
||||
json: { error: error instanceof Error ? error.message : String(error) },
|
||||
pairedItem: { item: i },
|
||||
});
|
||||
continue;
|
||||
}
|
||||
throw new NodeOperationError(this.getNode(), error as Error, { itemIndex: i });
|
||||
}
|
||||
}
|
||||
|
||||
return [returnData];
|
||||
|
||||
Reference in New Issue
Block a user