Skip to content

Commit

Permalink
fix: 🐛 #85 - Use the default list of ignore patterns only for workspa…
Browse files Browse the repository at this point in the history
…ce type "recursive"
  • Loading branch information
folke committed May 14, 2020
1 parent dd9ca3f commit d4afba9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ export async function findPackages(
const fastGlob = (await import("fast-glob")).default
if (!options) options = {}

if (!options.ignore) options.ignore = []
options.ignore.push(...DEFAULT_IGNORE)
if (!options.ignore) options.ignore = DEFAULT_IGNORE

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

Expand Down
5 changes: 4 additions & 1 deletion src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ export class Workspace {
if (info) {
if (options.includeRoot) info.patterns.push(".")
const packages = (
await findPackages(info.patterns, { cwd: info.root })
await findPackages(info.patterns, {
cwd: info.root,
ignore: type == WorkspaceProviderType.recursive ? undefined : [],
})
).map((p) => getPackage(p)) as PackageJsonWithRoot[]
return new Workspace(info.root, packages, type)
}
Expand Down

0 comments on commit d4afba9

Please sign in to comment.