Skip to content

Commit 1ed9401

Browse files
committed
chore: add glob as devDependencies
Signed-off-by: Wei Wu <[email protected]>
1 parent a1ec805 commit 1ed9401

File tree

5 files changed

+109
-9
lines changed

5 files changed

+109
-9
lines changed

client/test/index.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import glob from "glob";
1+
import { glob } from "glob";
22
import Mocha from "mocha";
33
import path from "path";
44

@@ -17,11 +17,7 @@ export function run(): Promise<void> {
1717
: "**/**.test.js";
1818

1919
return new Promise((resolve, reject) => {
20-
glob(pattern, { cwd: testsRoot }, (err, files) => {
21-
if (err) {
22-
return reject(err);
23-
}
24-
20+
glob(pattern, { cwd: testsRoot }).then((files) => {
2521
// Add files to the test suite
2622
files.forEach((f) => mocha.addFile(path.resolve(testsRoot, f)));
2723

@@ -38,6 +34,6 @@ export function run(): Promise<void> {
3834
console.error(err);
3935
reject(err);
4036
}
41-
});
37+
}, reject);
4238
});
4339
}

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@
11191119
"eslint": "^9.12.0",
11201120
"eslint-plugin-react": "^7.37.1",
11211121
"eslint-plugin-react-hooks": "^5.0.0",
1122+
"glob": "^11.0.0",
11221123
"mocha": "^10.7.3",
11231124
"nock": "^13.5.4",
11241125
"papaparse": "^5.4.1",

tools/check-copyright.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { readFileSync, writeFileSync } from "fs";
2-
import glob from "glob";
2+
import { glob } from "glob";
33

44
// These files will not be checked for copyright information
55
const filesToIgnore = [

tools/locale.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { readFileSync, writeFileSync } from "fs";
2-
import glob from "glob";
2+
import { glob } from "glob";
33
import csv from "papaparse";
44
import { dirname, isAbsolute, join } from "path";
55
import { fileURLToPath } from "url";

0 commit comments

Comments
 (0)