From 2a89513886afb1aa449561e2f98f7ef409944226 Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Tue, 6 Dec 2022 20:21:47 +0100 Subject: [PATCH 1/2] fix: Exclude `domainEmitter` from output (#26) --- index.js | 1 + test/index.js | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/index.js b/index.js index 1677dcb..1f36b17 100644 --- a/index.js +++ b/index.js @@ -10,6 +10,7 @@ var ignored = new Set( 'showProperties', 'showStack', 'domain', + 'domainEmitter', 'domainThrown', ]) ); diff --git a/test/index.js b/test/index.js index ca7fc01..d7abaed 100644 --- a/test/index.js +++ b/test/index.js @@ -252,6 +252,19 @@ describe('PluginError()', function () { done(); }); + it('should not show additional properties added by a domain', function (done) { + var Duplex = require('stream').Duplex; + var stream = new Duplex({ objectMode: true }); + var domain = require('domain').create(); + domain.add(stream); + domain.on('error', function (err) { + expect(err).toBeInstanceOf(PluginError); + expect(err.toString()).not.toContain('domain'); + done(); + }); + stream.emit('error', new PluginError('plugin', 'message')); + }); + it('should not modify error argument', function (done) { var realErr = { message: 'something broke' }; new PluginError('test', realErr); From 93926320fb69c37f6c90580ea5883924fe3cc625 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 12:28:27 -0700 Subject: [PATCH 2/2] chore: Release 2.0.1 (#27) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4582410..6d0b36b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.0.1](https://www.github.com/gulpjs/plugin-error/compare/v2.0.0...v2.0.1) (2022-12-06) + + +### Bug Fixes + +* Exclude `domainEmitter` from output ([#26](https://www.github.com/gulpjs/plugin-error/issues/26)) ([2a89513](https://www.github.com/gulpjs/plugin-error/commit/2a89513886afb1aa449561e2f98f7ef409944226)) + ## [2.0.0](https://www.github.com/gulpjs/plugin-error/compare/v1.0.1...v2.0.0) (2022-07-01) diff --git a/package.json b/package.json index 05c8584..dd325aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plugin-error", - "version": "2.0.0", + "version": "2.0.1", "description": "Error handling for Vinyl plugins.", "author": "Gulp Team (https://gulpjs.com/)", "contributors": [