Skip to content

Commit 0ae43b9

Browse files
fiskersindresorhus
andauthoredJul 5, 2023
Update dependencies (#253)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
1 parent 51a5e34 commit 0ae43b9

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
 

‎package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,21 @@
6060
],
6161
"dependencies": {
6262
"dir-glob": "^3.0.1",
63-
"fast-glob": "^3.2.11",
64-
"ignore": "^5.2.0",
63+
"fast-glob": "^3.3.0",
64+
"ignore": "^5.2.4",
6565
"merge2": "^1.4.1",
6666
"slash": "^4.0.0"
6767
},
6868
"devDependencies": {
6969
"@globby/main-branch": "sindresorhus/globby#main",
70-
"@types/node": "^17.0.18",
70+
"@types/node": "^20.3.3",
7171
"ava": "^5.3.1",
7272
"benchmark": "2.1.4",
73-
"get-stream": "^6.0.1",
74-
"glob-stream": "^7.0.0",
75-
"rimraf": "^3.0.2",
73+
"glob-stream": "^8.0.0",
74+
"rimraf": "^5.0.1",
7675
"tempy": "^3.0.0",
7776
"tsd": "^0.28.1",
78-
"typescript": "^4.5.5",
77+
"typescript": "^5.1.6",
7978
"xo": "^0.54.2"
8079
},
8180
"xo": {

‎tests/globby.js

+11-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import fs from 'node:fs';
33
import path from 'node:path';
44
import util from 'node:util';
55
import test from 'ava';
6-
import getStream from 'get-stream';
76
import {temporaryDirectory} from 'tempy';
87
import {
98
globby,
@@ -42,11 +41,20 @@ const stabilizeResult = result => result
4241
})
4342
.sort((a, b) => (a.path || a).localeCompare(b.path || b));
4443

44+
const streamToArray = async stream => {
45+
const result = [];
46+
for await (const chunk of stream) {
47+
result.push(chunk);
48+
}
49+
50+
return result;
51+
};
52+
4553
const runGlobby = async (t, patterns, options) => {
4654
const syncResult = globbySync(patterns, options);
4755
const promiseResult = await globby(patterns, options);
48-
// TODO: Use `Array.fromAsync` when Node.js supports it
49-
const streamResult = await getStream.array(globbyStream(patterns, options));
56+
// TODO: Use `stream.toArray()` when targeting Node.js 16.
57+
const streamResult = await streamToArray(globbyStream(patterns, options));
5058

5159
const result = stabilizeResult(promiseResult);
5260
t.deepEqual(

0 commit comments

Comments
 (0)
Please sign in to comment.