Skip to content

Commit

Permalink
Upgrade dev dependencies
Browse files Browse the repository at this point in the history
Closes #198
  • Loading branch information
sindresorhus committed Dec 6, 2021
1 parent 6e09986 commit 79765fb
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
5 changes: 3 additions & 2 deletions bench.js
@@ -1,4 +1,5 @@
/* global after, before, bench, suite */
import process from 'node:process';
import fs from 'node:fs';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
Expand Down Expand Up @@ -56,7 +57,7 @@ const runners = [
run: patterns => {
fastGlob.sync(patterns);
},
}
},
];

const benchs = [
Expand All @@ -80,7 +81,7 @@ const benchs = [
'a/*',
'b/*',
],
}
},
];

before(() => {
Expand Down
11 changes: 9 additions & 2 deletions gitignore.js
@@ -1,3 +1,4 @@
import process from 'node:process';
import {promisify} from 'node:util';
import fs from 'node:fs';
import path from 'node:path';
Expand Down Expand Up @@ -90,7 +91,10 @@ export const isGitIgnored = async options => {
options = normalizeOptions(options);

const paths = await fastGlob('**/.gitignore', {
ignore: DEFAULT_IGNORE.concat(options.ignore),
ignore: [
...DEFAULT_IGNORE,
...options.ignore,
],
cwd: options.cwd,
});

Expand All @@ -104,7 +108,10 @@ export const isGitIgnoredSync = options => {
options = normalizeOptions(options);

const paths = fastGlob.sync('**/.gitignore', {
ignore: DEFAULT_IGNORE.concat(options.ignore),
ignore: [
...DEFAULT_IGNORE,
...options.ignore,
],
cwd: options.cwd,
});

Expand Down
1 change: 1 addition & 0 deletions index.test-d.ts
@@ -1,3 +1,4 @@
import {Buffer} from 'node:buffer';
import {expectType} from 'tsd';
import {
GlobTask,
Expand Down
15 changes: 7 additions & 8 deletions package.json
Expand Up @@ -17,8 +17,7 @@
},
"scripts": {
"bench": "npm update glob-stream fast-glob && matcha bench.js",
"//test": "xo && ava && tsd",
"test": "echo foo"
"test": "xo && ava && tsd"
},
"files": [
"index.js",
Expand Down Expand Up @@ -63,21 +62,21 @@
"array-union": "^3.0.1",
"dir-glob": "^3.0.1",
"fast-glob": "^3.2.7",
"ignore": "^5.1.8",
"ignore": "^5.1.9",
"merge2": "^1.4.1",
"slash": "^4.0.0"
},
"devDependencies": {
"@types/node": "^16.6.1",
"@types/node": "^16.11.11",
"ava": "^3.15.0",
"get-stream": "^6.0.1",
"glob-stream": "^6.1.0",
"glob-stream": "^7.0.0",
"globby": "sindresorhus/globby#main",
"matcha": "^0.7.0",
"rimraf": "^3.0.2",
"tsd": "^0.17.0",
"typescript": "^4.3.5",
"xo": "^0.44.0"
"tsd": "^0.19.0",
"typescript": "^4.5.2",
"xo": "^0.47.0"
},
"xo": {
"ignores": [
Expand Down
7 changes: 5 additions & 2 deletions test.js
@@ -1,3 +1,4 @@
import process from 'node:process';
import fs from 'node:fs';
import path from 'node:path';
import util from 'node:util';
Expand Down Expand Up @@ -45,7 +46,8 @@ test.after(() => {
});

test('glob - async', async t => {
t.deepEqual((await globby('*.tmp')).sort(), ['a.tmp', 'b.tmp', 'c.tmp', 'd.tmp', 'e.tmp']);
const result = await globby('*.tmp');
t.deepEqual(result.sort(), ['a.tmp', 'b.tmp', 'c.tmp', 'd.tmp', 'e.tmp']);
});

test('glob - async - multiple file paths', t => {
Expand Down Expand Up @@ -83,7 +85,8 @@ test('return [] for all negative patterns - async', async t => {
});

test('glob - stream', async t => {
t.deepEqual((await getStream.array(globbyStream('*.tmp'))).sort(), ['a.tmp', 'b.tmp', 'c.tmp', 'd.tmp', 'e.tmp']);
const result = await getStream.array(globbyStream('*.tmp'));
t.deepEqual(result.sort(), ['a.tmp', 'b.tmp', 'c.tmp', 'd.tmp', 'e.tmp']);
});

test('glob - stream async iterator support', async t => {
Expand Down

0 comments on commit 79765fb

Please sign in to comment.