Skip to content

Commit 886a8f6

Browse files
committed
perf: switch to tinyglobby
1 parent fa5d14d commit 886a8f6

File tree

5 files changed

+25
-61
lines changed

5 files changed

+25
-61
lines changed

deno.lock

Lines changed: 15 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"dependencies": {
2222
"minimatch": "^10.0.1",
2323
"path-browserify": "^1.0.1",
24-
"fast-glob": "^3.3.3"
24+
"tinyglobby": "^0.2.14"
2525
},
2626
"devDependencies": {
2727
"@rollup/plugin-typescript": "^12.1.2",
@@ -48,7 +48,7 @@
4848
"mkdirp": false,
4949
"dir-glob": false,
5050
"graceful-fs": false,
51-
"fast-glob": false,
51+
"tinyglobby": false,
5252
"source-map-support": false,
5353
"glob-parent": false,
5454
"glob": false,

packages/common/scripts/buildDeno.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ commonFile.getClassOrThrow("BrowserRuntimePath").remove();
2222
commonFile.getFunctionOrThrow("isNodeJs").remove();
2323
commonFile.getImportDeclarationOrThrow("node:path").remove();
2424
commonFile.getImportDeclarationOrThrow("minimatch").remove();
25-
commonFile.getImportDeclarationOrThrow("fast-glob").remove();
25+
commonFile.getImportDeclarationOrThrow("tinyglobby").remove();
2626
commonFile.getImportDeclarationOrThrow("node:os").remove();
2727
commonFile.getImportDeclarationOrThrow("node:fs").remove();
2828
commonFile.getImportDeclarationOrThrow("node:fs/promises").remove();

packages/common/src/runtimes/NodeRuntime.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import fastGlob from "fast-glob";
21
import * as minimatch from "minimatch";
32
import * as fs from "node:fs";
43
import * as fsp from "node:fs/promises";
54
import * as os from "node:os";
65
import * as path from "node:path";
6+
import { glob, globSync } from "tinyglobby";
77
import { Runtime, RuntimeFileInfo, RuntimeFileSystem, RuntimePath } from "./Runtime";
88

99
export class NodeRuntime implements Runtime {
@@ -163,14 +163,16 @@ class NodeRuntimeFileSystem implements RuntimeFileSystem {
163163
}
164164

165165
glob(patterns: ReadonlyArray<string>) {
166-
return fastGlob(patterns as string[], {
166+
return glob(patterns as string[], {
167+
expandDirectories: false,
167168
cwd: this.getCurrentDirectory(),
168169
absolute: true,
169170
});
170171
}
171172

172173
globSync(patterns: ReadonlyArray<string>) {
173-
return fastGlob.sync(patterns as string[], {
174+
return globSync(patterns as string[], {
175+
expandDirectories: false,
174176
cwd: this.getCurrentDirectory(),
175177
absolute: true,
176178
});

packages/ts-morph/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"graceful-fs": false,
8181
"source-map-support": false,
8282
"glob-parent": false,
83-
"glob": false
83+
"glob": false,
84+
"tinyglobby": false
8485
}
8586
}

0 commit comments

Comments
 (0)