From c089430016fb78764f5dec291e862e6edbfbef15 Mon Sep 17 00:00:00 2001 From: mrmlnc Date: Fri, 14 Jul 2023 16:37:02 +0300 Subject: [PATCH] build: fix build benchmark files --- package.json | 2 +- src/benchmark/suites/product/stream.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);