mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor: Accumulate loadOptions from all node versions to validate (no-changelog) (#6014)
⚡ Accumulate loadOptions from node versions to validate
This commit is contained in:
@@ -31,7 +31,7 @@ function findReferencedMethods(obj, refs = {}, latestName = '') {
|
||||
|
||||
(async () => {
|
||||
const loader = new PackageDirectoryLoader(packageDir);
|
||||
await loader.loadAll({ withLoadOptionsMethods: true });
|
||||
await loader.loadAll();
|
||||
|
||||
const credentialTypes = Object.values(loader.credentialTypes).map((data) => data.type);
|
||||
|
||||
@@ -45,7 +45,12 @@ function findReferencedMethods(obj, refs = {}, latestName = '') {
|
||||
|
||||
const { name } = type.description;
|
||||
|
||||
acc[name] = acc[name] ? acc[name].push(methods) : methods;
|
||||
if (acc[name]) {
|
||||
acc[name] = [...new Set([...acc[name], ...methods])];
|
||||
return;
|
||||
}
|
||||
|
||||
acc[name] = methods;
|
||||
});
|
||||
|
||||
return acc;
|
||||
|
||||
Reference in New Issue
Block a user