Skip to content

Commit

Permalink
switch to tinyglobby
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 7, 2024
1 parent 4f7a8be commit dc896fd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 15 deletions.
4 changes: 2 additions & 2 deletions packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"license": "MIT",
"main": "dist/manypkg-tools.cjs.js",
"dependencies": {
"fast-glob": "^3.3.2",
"fs-extra": "^8.1.0",
"jju": "^1.4.0",
"read-yaml-file": "^1.1.0"
"read-yaml-file": "^1.1.0",
"tinyglobby": "^0.2.2"
},
"devDependencies": {
"@types/jju": "^1.4.2",
Expand Down
6 changes: 4 additions & 2 deletions packages/tools/src/expandPackageGlobs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from "path";
import fs from "fs-extra";
import glob from "fast-glob";
import { glob, globSync } from "tinyglobby";

import { Tool, Package, PackageJSON, Packages, MonorepoRoot } from "./Tool";

Expand All @@ -16,6 +16,7 @@ export async function expandPackageGlobs(
const relativeDirectories: string[] = await glob(packageGlobs, {
cwd: directory,
onlyDirectories: true,
expandDirectories: false,
ignore: ["**/node_modules"],
});
const directories = relativeDirectories
Expand Down Expand Up @@ -54,9 +55,10 @@ export function expandPackageGlobsSync(
packageGlobs: string[],
directory: string
): Package[] {
const relativeDirectories: string[] = glob.sync(packageGlobs, {
const relativeDirectories: string[] = globSync(packageGlobs, {
cwd: directory,
onlyDirectories: true,
expandDirectories: false,
ignore: ["**/node_modules"],
});
const directories = relativeDirectories
Expand Down
29 changes: 18 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6036,17 +6036,6 @@ fast-glob@^3.2.4:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-glob@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
Expand Down Expand Up @@ -6127,6 +6116,11 @@ fbjs@^1.0.0:
setimmediate "^1.0.5"
ua-parser-js "^0.7.18"

fdir@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.2.0.tgz#9120f438d566ef3e808ca37864d9dd18e1a4f9b5"
integrity sha512-9XaWcDl0riOX5j2kYfy0kKdg7skw3IY6kA4LFT8Tk2yF9UdrADUy8D6AJuBLtf7ISm/MksumwAHE3WVbMRyCLw==

figgy-pudding@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
Expand Down Expand Up @@ -11333,6 +11327,11 @@ picomatch@^2.2.2, picomatch@^2.2.3, picomatch@^2.3.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

picomatch@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==

pify@^2.0.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
Expand Down Expand Up @@ -14083,6 +14082,14 @@ timsort@^0.3.0:
resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"
integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=

tinyglobby@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.2.tgz#c3b21f177d41a3c86b122cfbd3dd618870f3689f"
integrity sha512-mZ2sDMaySvi1PkTp4lTo1In2zjU+cY8OvZsfwrDrx3YGRbXPX1/cbPwCR9zkm3O/Fz9Jo0F1HNgIQ1b8BepqyQ==
dependencies:
fdir "^6.2.0"
picomatch "^4.0.2"

title-case@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa"
Expand Down

0 comments on commit dc896fd

Please sign in to comment.