Skip to content

Commit 36669ad

Browse files
committed
Merged conditions
1 parent bdf2351 commit 36669ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/bump/bump-utils.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export function findFileBySuffix({
6161
const foundFiles = []
6262
;(function search(currentDir) {
6363
for (const entry of fs.readdirSync(currentDir)) {
64-
if (entry.startsWith('.') && !dotFolders && fs.statSync(path.join(currentDir, entry)).isDirectory())
65-
continue // skip dotfolders if disabled
66-
if (entry == 'node_modules') continue
64+
if (entry == 'node_modules' // or dotfolder but disabled
65+
|| (entry.startsWith('.') && !dotFolders && fs.statSync(path.join(currentDir, entry)).isDirectory())
66+
) continue // skip it
6767
const entryPath = path.join(currentDir, entry), stat = fs.statSync(entryPath)
6868
if (stat.isDirectory() && recursive) search(entryPath)
6969
else if (stat.isFile() && entry.endsWith(suffix) // file w/ `suffix`

0 commit comments

Comments
 (0)