diff --git a/package.json b/package.json index 3baf47eb..31f7396f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/benchmark/suites/product/stream.ts b/src/benchmark/suites/product/stream.ts index f1259bf5..15705af5 100644 --- a/src/benchmark/suites/product/stream.ts +++ b/src/benchmark/suites/product/stream.ts @@ -21,9 +21,9 @@ class Glob { }); const action = new Promise((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); diff --git a/src/settings.ts b/src/settings.ts index 3000541a..8cc9d681 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -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(option: T | undefined, value: T): T {