diff --git a/src/mongo.db.ts b/src/mongo.db.ts index bff7891..bc210cb 100644 --- a/src/mongo.db.ts +++ b/src/mongo.db.ts @@ -1,4 +1,4 @@ -import { Transform } from 'stream' +import { Transform } from 'node:stream' import { BaseCommonDB, CommonDB, @@ -245,6 +245,7 @@ export class MongoDB extends BaseCommonDB implements CommonDB { .collection(q.table) .find(query, options) // eslint-disable-line unicorn/no-array-method-this-argument .stream() + .on('error', err => transform.emit('error', err)) .pipe(transform) }) .catch(err => transform.emit('error', err)) diff --git a/src/test/paths.cnst.ts b/src/test/paths.cnst.ts index cebaf50..b37968c 100644 --- a/src/test/paths.cnst.ts +++ b/src/test/paths.cnst.ts @@ -1,4 +1,4 @@ -import * as path from 'path' +import * as path from 'node:path' export const projectDir = path.join(`${__dirname}/../..`) export const tmpDir = `${projectDir}/tmp`