Skip to content

Commit ceeb7cb

Browse files
VanTanevAndarist
andauthored
Replace fast-glob with tinyglobby (#232)
* Replace fast-glob with tinyglobby * changeset * update `tinyglobby` --------- Co-authored-by: Mateusz Burzyński <[email protected]>
1 parent 28c3ff4 commit ceeb7cb

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

.changeset/wild-starfishes-report.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@manypkg/tools": minor
3+
---
4+
5+
Replace the `fast-glob` dependency with `tinyglobby`

packages/tools/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"license": "MIT",
1010
"main": "dist/manypkg-tools.cjs.js",
1111
"dependencies": {
12-
"fast-glob": "^3.3.2",
1312
"jju": "^1.4.0",
14-
"js-yaml": "^4.1.0"
13+
"js-yaml": "^4.1.0",
14+
"tinyglobby": "^0.2.13"
1515
},
1616
"devDependencies": {
1717
"@types/jju": "^1.4.2",

packages/tools/src/expandPackageGlobs.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from "path";
22
import fsp from "fs/promises";
3-
import glob from "fast-glob";
3+
import { glob, globSync } from "tinyglobby";
44

55
import { Package, PackageJSON } from "./Tool";
66
import { readJsonSync } from "./utils";
@@ -18,6 +18,7 @@ export async function expandPackageGlobs(
1818
cwd: directory,
1919
onlyDirectories: true,
2020
ignore: ["**/node_modules"],
21+
expandDirectories: false,
2122
});
2223
const directories = relativeDirectories
2324
.map((p) => path.resolve(directory, p))
@@ -55,10 +56,11 @@ export function expandPackageGlobsSync(
5556
packageGlobs: string[],
5657
directory: string
5758
): Package[] {
58-
const relativeDirectories: string[] = glob.sync(packageGlobs, {
59+
const relativeDirectories: string[] = globSync(packageGlobs, {
5960
cwd: directory,
6061
onlyDirectories: true,
6162
ignore: ["**/node_modules"],
63+
expandDirectories: false,
6264
});
6365
const directories = relativeDirectories
6466
.map((p) => path.resolve(directory, p))

yarn.lock

+14-1
Original file line numberDiff line numberDiff line change
@@ -6140,6 +6140,11 @@ fbjs@^1.0.0:
61406140
setimmediate "^1.0.5"
61416141
ua-parser-js "^0.7.18"
61426142

6143+
fdir@^6.4.4:
6144+
version "6.4.4"
6145+
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.4.tgz#1cfcf86f875a883e19a8fab53622cfe992e8d2f9"
6146+
integrity sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==
6147+
61436148
figgy-pudding@^3.5.1:
61446149
version "3.5.1"
61456150
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
@@ -11203,7 +11208,7 @@ picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1:
1120311208
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
1120411209
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
1120511210

11206-
picomatch@^4.0.1:
11211+
picomatch@^4.0.1, picomatch@^4.0.2:
1120711212
version "4.0.2"
1120811213
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
1120911214
integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
@@ -13955,6 +13960,14 @@ tinyexec@^0.3.1:
1395513960
resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.1.tgz#0ab0daf93b43e2c211212396bdb836b468c97c98"
1395613961
integrity sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==
1395713962

13963+
tinyglobby@^0.2.13:
13964+
version "0.2.13"
13965+
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.13.tgz#a0e46515ce6cbcd65331537e57484af5a7b2ff7e"
13966+
integrity sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==
13967+
dependencies:
13968+
fdir "^6.4.4"
13969+
picomatch "^4.0.2"
13970+
1395813971
title-case@^2.1.0:
1395913972
version "2.1.1"
1396013973
resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa"

0 commit comments

Comments
 (0)