Skip to content
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
2 changes: 1 addition & 1 deletion detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"find-up": "^5.0.0",
"fs-extra": "^11.0.0",
"funpermaproxy": "^1.1.0",
"glob": "^8.0.3",
"ini": "^1.3.4",
"jest-environment-emit": "^1.2.0",
"json-cycle": "^1.3.0",
Expand All @@ -118,6 +117,7 @@
"stream-json": "^1.7.4",
"strip-ansi": "^6.0.1",
"telnet-client": "1.2.8",
"tinyglobby": "^0.2.16",
"tmp": "^0.2.1",
"trace-event-lib": "^1.3.1",
"which": "^1.3.1",
Expand Down
5 changes: 1 addition & 4 deletions detox/src/artifacts/utils/temporaryPath.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
const path = require('path');
const { promisify } = require('util');

const glob = require('glob');
const _ = require('lodash');
const { globSync, glob: globAsync } = require('tinyglobby');

const { useForwardSlashes } = require('../../utils/shellUtils');
const tempfile = require('../../utils/tempfile');


const globSync = glob.sync;
const globAsync = promisify(glob);
const getRoot = _.once(() => path.dirname(tempfile()));

function createGlobber(ext) {
Expand Down
8 changes: 4 additions & 4 deletions detox/src/logger/utils/DetoxLogFinalizer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');
const { PassThrough } = require('stream');

const fs = require('fs-extra');
const glob = require('glob');
const { globSync } = require('tinyglobby');

const temporary = require('../../artifacts/utils/temporaryPath');
const tempfile = require('../../utils/tempfile');
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('DetoxLogFinalizer', () => {
await createLogFiles();
await finalizer.finalize();

const outFiles = glob.sync('*', { cwd: artifactsDir() });
const outFiles = globSync('*', { cwd: artifactsDir() });
expect(outFiles).toEqual([
'detox.log',
'detox.trace.json',
Expand Down Expand Up @@ -148,7 +148,7 @@ describe('DetoxLogFinalizer', () => {
await createLogFiles();
finalizer.finalizeSync();

const outFiles = glob.sync('*', { cwd: artifactsDir() });
const outFiles = globSync('*', { cwd: artifactsDir() });
expect(outFiles.map(f => path.extname(f))).toEqual([
'.jsonl',
'.jsonl',
Expand All @@ -171,7 +171,7 @@ describe('DetoxLogFinalizer', () => {
await createLogFiles();
finalizer.finalizeSync();

const outFiles = glob.sync('*', { cwd: artifactsDir() });
const outFiles = globSync('*', { cwd: artifactsDir() });
expect(outFiles.map(f => path.extname(f))).toEqual([
'.jsonl',
'.jsonl',
Expand Down
4 changes: 2 additions & 2 deletions detox/test/e2e/utils/artifactUtils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const _ = require('lodash');
const fs = require('fs');
const path = require('path');
const glob = require('glob');
const { globSync } = require('tinyglobby');

function getLatestArtifactsDir() {
if (!fs.existsSync('artifacts')) {
Expand All @@ -25,7 +25,7 @@ function assertDirExists(dirPath) {

function assertArtifactExists(pattern) {
const artifactsRootDir = getLatestArtifactsDir();
const matchingArtifacts = glob.sync(pattern, { cwd: artifactsRootDir });
const matchingArtifacts = globSync(pattern, { cwd: artifactsRootDir });
if (matchingArtifacts.length === 0) {
throw new Error('Assertion failed.\nFailed to find artifacts matching: ' + path.join(artifactsRootDir, pattern));
}
Expand Down
21 changes: 19 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10204,7 +10204,6 @@ __metadata:
find-up: "npm:^5.0.0"
fs-extra: "npm:^11.0.0"
funpermaproxy: "npm:^1.1.0"
glob: "npm:^8.0.3"
ini: "npm:^1.3.4"
jest: "npm:^30.0.3"
jest-allure2-reporter: "npm:^2.2.6"
Expand All @@ -10229,6 +10228,7 @@ __metadata:
stream-json: "npm:^1.7.4"
strip-ansi: "npm:^6.0.1"
telnet-client: "npm:1.2.8"
tinyglobby: "npm:^0.2.16"
tmp: "npm:^0.2.1"
trace-event-lib: "npm:^1.3.1"
typescript: "npm:^5.8.3"
Expand Down Expand Up @@ -13163,7 +13163,7 @@ __metadata:
languageName: node
linkType: hard

"glob@npm:^8.0.0, glob@npm:^8.0.3":
"glob@npm:^8.0.0":
version: 8.1.0
resolution: "glob@npm:8.1.0"
dependencies:
Expand Down Expand Up @@ -20430,6 +20430,13 @@ __metadata:
languageName: node
linkType: hard

"picomatch@npm:^4.0.4":
version: 4.0.4
resolution: "picomatch@npm:4.0.4"
checksum: 10/f6ef80a3590827ce20378ae110ac78209cc4f74d39236370f1780f957b7ee41c12acde0e4651b90f39983506fd2f5e449994716f516db2e9752924aff8de93ce
languageName: node
linkType: hard

"pify@npm:^2.0.0, pify@npm:^2.2.0, pify@npm:^2.3.0":
version: 2.3.0
resolution: "pify@npm:2.3.0"
Expand Down Expand Up @@ -25746,6 +25753,16 @@ __metadata:
languageName: node
linkType: hard

"tinyglobby@npm:^0.2.16":
version: 0.2.16
resolution: "tinyglobby@npm:0.2.16"
dependencies:
fdir: "npm:^6.5.0"
picomatch: "npm:^4.0.4"
checksum: 10/5c2c41b572ada38449e7c86a5fe034f204a1dbba577225a761a14f29f48dc3f2fc0d81a6c56fcc67c5a742cc3aa9fb5e2ca18dbf22b610b0bc0e549b34d5a0f8
languageName: node
linkType: hard

"tmp@npm:^0.2.1":
version: 0.2.5
resolution: "tmp@npm:0.2.5"
Expand Down