Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #253

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions package.json
Expand Up @@ -60,22 +60,21 @@
],
"dependencies": {
"dir-glob": "^3.0.1",
"fast-glob": "^3.2.11",
"ignore": "^5.2.0",
"fast-glob": "^3.3.0",
"ignore": "^5.2.4",
"merge2": "^1.4.1",
"slash": "^4.0.0"
"slash": "^5.1.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requires Node.js 14

},
"devDependencies": {
"@globby/main-branch": "sindresorhus/globby#main",
"@types/node": "^17.0.18",
"@types/node": "^20.3.3",
"ava": "^5.3.1",
"benchmark": "2.1.4",
"get-stream": "^6.0.1",
"glob-stream": "^7.0.0",
"rimraf": "^3.0.2",
"glob-stream": "^8.0.0",
"rimraf": "^5.0.1",
"tempy": "^3.0.0",
"tsd": "^0.28.1",
"typescript": "^4.5.5",
"typescript": "^5.1.6",
"xo": "^0.54.2"
},
"xo": {
Expand Down
12 changes: 10 additions & 2 deletions tests/globby.js
Expand Up @@ -3,7 +3,6 @@ import fs from 'node:fs';
import path from 'node:path';
import util from 'node:util';
import test from 'ava';
import getStream from 'get-stream';
import {temporaryDirectory} from 'tempy';
import {
globby,
Expand Down Expand Up @@ -42,11 +41,20 @@ const stabilizeResult = result => result
})
.sort((a, b) => (a.path || a).localeCompare(b.path || b));

const streamToArray = async stream => {
const result = [];
for await (const chunk of stream) {
result.push(chunk);
}

return result;
};

const runGlobby = async (t, patterns, options) => {
const syncResult = globbySync(patterns, options);
const promiseResult = await globby(patterns, options);
// TODO: Use `Array.fromAsync` when Node.js supports it
fisker marked this conversation as resolved.
Show resolved Hide resolved
const streamResult = await getStream.array(globbyStream(patterns, options));
const streamResult = await streamToArray(globbyStream(patterns, options));

const result = stabilizeResult(promiseResult);
t.deepEqual(
Expand Down