Skip to content

Commit

Permalink
Merge pull request #406 from mrmlnc/ISSUE-404_fix_patterns.reduce
Browse files Browse the repository at this point in the history
ISSUE-404: fix error for the ignore field misuse
  • Loading branch information
mrmlnc authored Jul 16, 2023
2 parents 9a1361f + 2a0c808 commit 697caf7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/merge2": "^1.1.4",
"@types/micromatch": "^4.0.0",
"@types/mocha": "^5.2.7",
"@types/node": "^12.7.8",
"@types/node": "^14.18.53",
"@types/picomatch": "^2.3.0",
"@types/sinon": "^7.5.0",
"bencho": "^0.1.1",
Expand Down
4 changes: 2 additions & 2 deletions src/benchmark/suites/product/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class Glob {
});

const action = new Promise<string[]>((resolve, reject) => {
stream.once('error', (error) => reject(error));
stream.on('error', (error) => reject(error));
stream.on('data', (entry: string) => entries.push(entry));
stream.once('end', () => resolve(entries));
stream.on('end', () => resolve(entries));
});

await this._measure(() => action);
Expand Down
3 changes: 3 additions & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ export default class Settings {
if (this.stats) {
this.objectMode = true;
}

// Remove the cast to the array in the next major (#404).
this.ignore = ([] as Pattern[]).concat(this.ignore);
}

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

0 comments on commit 697caf7

Please sign in to comment.