Skip to content

Commit 3d7bdfa

Browse files
authored
refactor: replace globby and is-glob with tinyglobby (#134)
1 parent 229be98 commit 3d7bdfa

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,5 @@ dist
108108
/tests/fixtures/**/actual-types.svelte
109109
/tests/fixtures/**/actual-types.astro
110110
/tests/fixtures/**/actual-types.ts
111-
/lib
111+
/lib
112+
/yarn.lock

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@
6969
}
7070
},
7171
"dependencies": {
72-
"globby": "^11.1.0",
73-
"is-glob": "^4.0.3"
72+
"tinyglobby": "^0.2.12"
7473
},
7574
"devDependencies": {
7675
"@changesets/changelog-github": "^0.5.0",

src/utils/resolve-project-list.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import { sync as globSync } from "globby";
2-
import isGlob from "is-glob";
1+
import { globSync, isDynamicPattern } from "tinyglobby";
32
import path from "path";
43
import * as ts from "typescript";
54

@@ -42,9 +41,11 @@ export function resolveProjectList(
4241

4342
// Transform glob patterns into paths
4443
const nonGlobProjects = sanitizedProjects.filter(
45-
(project) => !isGlob(project),
44+
(project) => !isDynamicPattern(project),
45+
);
46+
const globProjects = sanitizedProjects.filter((project) =>
47+
isDynamicPattern(project),
4648
);
47-
const globProjects = sanitizedProjects.filter((project) => isGlob(project));
4849

4950
const uniqueCanonicalProjectPaths = new Set(
5051
nonGlobProjects

0 commit comments

Comments
 (0)