mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
fix(editor): Show retry information in execution list only when it exists (#6587)
* fix(editor): Show retry information in execution list only when it exists * build: Fix checking for test files
This commit is contained in:
20
.github/scripts/check-tests.mjs
vendored
20
.github/scripts/check-tests.mjs
vendored
@@ -17,6 +17,18 @@ const filterAsync = async (asyncPredicate, arr) => {
|
||||
return filterResults.filter(({shouldKeep}) => shouldKeep).map(({item}) => item);
|
||||
}
|
||||
|
||||
const isAbstractClass = (node) => {
|
||||
if (ts.isClassDeclaration(node)) {
|
||||
return node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.AbstractKeyword) || false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const isAbstractMethod = (node) => {
|
||||
return ts.isMethodDeclaration(node) && Boolean(node.modifiers?.find((modifier) => modifier.kind === ts.SyntaxKind.AbstractKeyword));
|
||||
}
|
||||
|
||||
|
||||
// Function to check if a file has a function declaration, function expression, object method or class
|
||||
const hasFunctionOrClass = async filePath => {
|
||||
const fileContent = await readFileAsync(filePath, 'utf-8');
|
||||
@@ -24,7 +36,13 @@ const hasFunctionOrClass = async filePath => {
|
||||
|
||||
let hasFunctionOrClass = false;
|
||||
const visit = node => {
|
||||
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) || ts.isMethodDeclaration(node) || ts.isClassDeclaration(node)) {
|
||||
if (
|
||||
ts.isFunctionDeclaration(node)
|
||||
|| ts.isFunctionExpression(node)
|
||||
|| ts.isArrowFunction(node)
|
||||
|| (ts.isMethodDeclaration(node) && !isAbstractMethod(node))
|
||||
|| (ts.isClassDeclaration(node) && !isAbstractClass(node))
|
||||
) {
|
||||
hasFunctionOrClass = true;
|
||||
}
|
||||
node.forEachChild(visit);
|
||||
|
||||
Reference in New Issue
Block a user