Skip to content

perf: switch to tinyglobby #1635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 15 additions & 54 deletions deno.lock

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

4 changes: 2 additions & 2 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"minimatch": "^10.0.1",
"path-browserify": "^1.0.1",
"fast-glob": "^3.3.3"
"tinyglobby": "^0.2.14"
},
"devDependencies": {
"@rollup/plugin-typescript": "^12.1.2",
Expand All @@ -48,7 +48,7 @@
"mkdirp": false,
"dir-glob": false,
"graceful-fs": false,
"fast-glob": false,
"tinyglobby": false,
"source-map-support": false,
"glob-parent": false,
"glob": false,
Expand Down
2 changes: 1 addition & 1 deletion packages/common/scripts/buildDeno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ commonFile.getClassOrThrow("BrowserRuntimePath").remove();
commonFile.getFunctionOrThrow("isNodeJs").remove();
commonFile.getImportDeclarationOrThrow("node:path").remove();
commonFile.getImportDeclarationOrThrow("minimatch").remove();
commonFile.getImportDeclarationOrThrow("fast-glob").remove();
commonFile.getImportDeclarationOrThrow("tinyglobby").remove();
commonFile.getImportDeclarationOrThrow("node:os").remove();
commonFile.getImportDeclarationOrThrow("node:fs").remove();
commonFile.getImportDeclarationOrThrow("node:fs/promises").remove();
Expand Down
8 changes: 5 additions & 3 deletions packages/common/src/runtimes/NodeRuntime.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import fastGlob from "fast-glob";
import * as minimatch from "minimatch";
import * as fs from "node:fs";
import * as fsp from "node:fs/promises";
import * as os from "node:os";
import * as path from "node:path";
import { glob, globSync } from "tinyglobby";
import { Runtime, RuntimeFileInfo, RuntimeFileSystem, RuntimePath } from "./Runtime";

export class NodeRuntime implements Runtime {
Expand Down Expand Up @@ -163,14 +163,16 @@ class NodeRuntimeFileSystem implements RuntimeFileSystem {
}

glob(patterns: ReadonlyArray<string>) {
return fastGlob(patterns as string[], {
return glob(patterns as string[], {
expandDirectories: false,
cwd: this.getCurrentDirectory(),
absolute: true,
});
}

globSync(patterns: ReadonlyArray<string>) {
return fastGlob.sync(patterns as string[], {
return globSync(patterns as string[], {
expandDirectories: false,
cwd: this.getCurrentDirectory(),
absolute: true,
});
Expand Down
3 changes: 2 additions & 1 deletion packages/ts-morph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"graceful-fs": false,
"source-map-support": false,
"glob-parent": false,
"glob": false
"glob": false,
"tinyglobby": false
}
}
Loading