This commit is contained in:
Andras Schmelczer 2025-05-24 19:02:50 +01:00
parent 1b21e194cf
commit 5c8b02f69c
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 8 additions and 6 deletions

View file

@ -3,7 +3,7 @@ import { globsToRegexes } from "./globs-to-regexes";
describe("globsToRegexes", () => {
it("basicExample", async () => {
const regex = globsToRegexes([".git/**"], new Logger())[0];
const [regex] = globsToRegexes([".git/**"], new Logger());
expect(regex.test(".git/objects/object")).toBeTruthy();
expect(regex.test(".git/objects/.object")).toBeTruthy();

View file

@ -1,5 +1,5 @@
import { makeRe } from "minimatch";
import { Logger } from "../tracing/logger";
import type { Logger } from "../tracing/logger";
export function globsToRegexes(globs: string[], logger: Logger): RegExp[] {
return globs