Skip to content

Commit

Permalink
setup: switch to fdir from fast-glob
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Aug 1, 2023
1 parent 5a5e072 commit ba72a92
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
25 changes: 24 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"dependencies": {
"@nrwl/nx-cloud": "^14.6.2",
"eslint-plugin-header": "^3.1.1",
"fast-glob": "^3.3.0",
"fdir": "^6.0.2",
"listr": "^0.14.3",
"nx": "^16.3.2",
"patch-package": "^7.0.0",
Expand Down
14 changes: 9 additions & 5 deletions scripts/bootstrap.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { readFile } from "fs/promises";
import path from "path";
import os from "os";
import parser from "yargs-parser";
import glob from "fast-glob";
import { fdir } from "fdir";
import Listr from "listr";

const THREADS = Math.min(4, process.env.THREADS || os.cpus().length / 2);
Expand All @@ -43,10 +43,14 @@ if (args.scope && !scopes[args.scope])
const IS_BOOTSTRAP_ALL = !args.scope;

if (IS_BOOTSTRAP_ALL) {
const allPackages = await glob(["packages/**", "apps/**", "extensions/**"], {
deep: 1,
onlyDirectories: true
});
const allPackages = (
await new fdir()
.onlyDirs()
.withMaxDepth(2)
.glob("packages/**", "apps/**", "extensions/**")
.crawl(".")
.withPromise()
).slice(3);

const dependencies = Array.from(
new Set(
Expand Down

0 comments on commit ba72a92

Please sign in to comment.