Skip to content

Commit 45eb771

Browse files
committed
PRO-11028 feat: replace globby with glob from node:fs/promises
1 parent 995e435 commit 45eb771

7 files changed

Lines changed: 38 additions & 16 deletions

File tree

.eslintrc.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ rules:
9090
- src/config.ts
9191
- src/createLocator.ts
9292
- src/getModulesGraph.ts
93-
- src/globby.ts
9493
- src/index.ts
9594
missingExports: true
9695
unusedExports: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ You can define the `SkipTests` type and `skipTests` processing rules in the hook
365365
at the time of the test error, for display in the HTML report.
366366

367367
`testFileGlobs: readonly string[]`: an array of globs with pack test (task) files.
368-
https://www.npmjs.com/package/globby is used for matching globs.
368+
`fs.glob` from `nodejs` is used for matching globs.
369369

370370
`testIdleTimeout: number`: timeout (in milliseconds) for each individual test step.
371371
If the test step (interval between two `log` function calls) takes longer than this timeout,

package-lock.json

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

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"@playwright/test": "1.51.1",
2929
"create-locator": "0.0.27",
3030
"get-modules-graph": "0.0.11",
31-
"globby": "11.1.0",
3231
"sort-json-keys": "1.0.3"
3332
},
3433
"devDependencies": {
@@ -61,7 +60,6 @@
6160
"./createLocator": "./createLocator.js",
6261
"./generators": "./generators/index.js",
6362
"./getModulesGraph": "./getModulesGraph.js",
64-
"./globby": "./globby.js",
6563
"./selectors": "./selectors/index.js",
6664
"./types": "./types/index.js",
6765
"./utils": "./utils/index.js"

src/globby.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/types/config/ownE2edConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export type OwnE2edConfig<
233233

234234
/**
235235
* An array of globs with pack test (task) files.
236-
* {@link https://www.npmjs.com/package/globby} is used for matching globs.
236+
* `fs.glob` from `nodejs` is used for matching globs.
237237
*/
238238
testFileGlobs: readonly string[];
239239

src/utils/testFilePaths/collectTestFilePaths.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import {glob} from 'node:fs/promises';
12
import {normalize} from 'node:path';
23

3-
import globby from 'globby';
4-
54
import {TESTS_DIRECTORY_PATH} from '../../constants/internal';
65

76
import {getFullPackConfig} from '../config';
@@ -15,8 +14,12 @@ import type {TestFilePath} from '../../types/internal';
1514
*/
1615
export const collectTestFilePaths = async (): Promise<readonly TestFilePath[]> => {
1716
const {testFileGlobs} = getFullPackConfig();
17+
const rawTestFilesPaths: string[] = [];
18+
19+
for await (const directory of glob(testFileGlobs as string[])) {
20+
rawTestFilesPaths.push(directory);
21+
}
1822

19-
const rawTestFilesPaths = await globby(testFileGlobs);
2023
const testFilesPaths = rawTestFilesPaths
2124
.map(normalize as (path: string) => TestFilePath)
2225
.filter(

0 commit comments

Comments
 (0)