Skip to content

Commit

Permalink
fix: πŸ› always ignore node_modules when listing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Feb 28, 2021
1 parent 1899e91 commit 3defc7a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ interface FindPackagesOption {
cwd?: string
}

const DEFAULT_IGNORE = [
"**/node_modules/**",
"**/bower_components/**",
"**/test/**",
"**/tests/**",
"**/__tests__/**",
]
const BASIC_IGNORE = ["**/node_modules/**", "**/bower_components/**"]

const DEFAULT_IGNORE = ["**/test/**", "**/tests/**", "**/__tests__/**"]

export async function findPackages(
patterns: string[],
Expand All @@ -36,6 +32,7 @@ export async function findPackages(
if (!options) options = {}

if (!options.ignore) options.ignore = DEFAULT_IGNORE
options.ignore.push(...BASIC_IGNORE)

if (options.includeRoot) patterns.push(".")

Expand Down

0 comments on commit 3defc7a

Please sign in to comment.