Skip to content

Commit 697caf7

Browse files
authored
Merge pull request #406 from mrmlnc/ISSUE-404_fix_patterns.reduce
ISSUE-404: fix error for the ignore field misuse
2 parents 9a1361f + 2a0c808 commit 697caf7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@types/merge2": "^1.1.4",
3232
"@types/micromatch": "^4.0.0",
3333
"@types/mocha": "^5.2.7",
34-
"@types/node": "^12.7.8",
34+
"@types/node": "^14.18.53",
3535
"@types/picomatch": "^2.3.0",
3636
"@types/sinon": "^7.5.0",
3737
"bencho": "^0.1.1",

src/benchmark/suites/product/stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class Glob {
2121
});
2222

2323
const action = new Promise<string[]>((resolve, reject) => {
24-
stream.once('error', (error) => reject(error));
24+
stream.on('error', (error) => reject(error));
2525
stream.on('data', (entry: string) => entries.push(entry));
26-
stream.once('end', () => resolve(entries));
26+
stream.on('end', () => resolve(entries));
2727
});
2828

2929
await this._measure(() => action);

src/settings.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ export default class Settings {
185185
if (this.stats) {
186186
this.objectMode = true;
187187
}
188+
189+
// Remove the cast to the array in the next major (#404).
190+
this.ignore = ([] as Pattern[]).concat(this.ignore);
188191
}
189192

190193
private _getValue<T>(option: T | undefined, value: T): T {

0 commit comments

Comments
 (0)