Skip to content

Commit

Permalink
update dependencies and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de committed May 9, 2024
1 parent 32afd5e commit 68e94bb
Show file tree
Hide file tree
Showing 7 changed files with 2,378 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
node_modules/
temp/
coverage
.idea
.vscode
.nyc_output
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
temp/
coverage

.idea
.vscode
.nyc_output
.editorconfig
test
.gitattributes
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# :monkey: gulp-plumber

> ### Forked Version using updated dependencies
> Original repo at https://github.com/floatdrop/gulp-plumber
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]

> Prevent pipe breaking caused by errors from [gulp](https://github.com/wearefractal/gulp) plugins
Expand Down
41 changes: 17 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "gulp-plumber",
"name": "@fomantic/gulp-plumber",
"version": "1.2.1",
"description": "Prevent pipe breaking caused by errors from gulp plugins",
"keywords": [
"gulpplugin"
],
"homepage": "https://github.com/floatdrop/gulp-plumber",
"homepage": "https://github.com/fomantic/gulp-plumber",
"bugs": "https://github.com/floatdrop/gulp-plumber/issues",
"author": {
"name": "Vsevolod Strukchinsky",
Expand All @@ -15,36 +15,29 @@
"main": "./index.js",
"repository": {
"type": "git",
"url": "git://github.com/floatdrop/gulp-plumber.git"
"url": "git://github.com/fomantic/gulp-plumber.git"
},
"scripts": {
"test": "xo && mocha -R spec"
"test": "mocha -R spec",
"coverage": "nyc mocha -R spec"
},
"dependencies": {
"chalk": "^1.1.3",
"fancy-log": "^1.3.2",
"plugin-error": "^0.1.2",
"through2": "^2.0.3"
"chalk": "^4.1.2",
"fancy-log": "^2.0.0",
"plugin-error": "^2.0.1",
"through2": "^4.0.2"
},
"devDependencies": {
"coveralls": "^2.11.6",
"event-stream": "3.3.4",
"gulp": "^3.9.1",
"istanbul": "^0.4.2",
"mocha": "^2.4.5",
"mocha-lcov-reporter": "^1.0.0",
"should": "^8.2.2",
"through": "^2.3.8",
"xo": "^0.12.1"
"event-stream": "^4.0.1",
"gulp": "^5.0.0",
"mocha": "^9.2.2",
"nyc": "^15.1.0",
"should": "^13.2.3",
"through": "^2.3.8"
},
"engines": {
"node": ">=0.10",
"npm": ">=1.2.10"
},
"xo": {
"ignore": [
"test/**"
]
"node": ">=12",
"npm": ">=6"
},
"license": "MIT"
}
25 changes: 13 additions & 12 deletions test/errorHandling.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ var should = require('should'),
es = require('event-stream'),
through2 = require('through2'),
EE = require('events').EventEmitter,
gulp = require('gulp');
gulp = require('gulp'),
fancyLog = require('fancy-log');

var plumber = require('../');

Expand Down Expand Up @@ -67,17 +68,17 @@ describe('errorHandler', function () {
.pipe(this.failingQueueStream);
});

xit('default error handler should work', function (done) {
// TODO: Find alternative way to test error handler (`gutil.log` was replaced by `fancyLog`)
// var mario = plumber();
// var _ = gutil.log;
// gutil.log = done.bind(null, null);
// gulp.src(fixturesGlob)
// .pipe(mario)
// .pipe(this.failingQueueStream)
// .on('end', function () {
// gutil.log = _;
// });
it('default error handler should work', function (done) {
var mario = plumber();
var _ = fancyLog;
fancyLog = done.bind(null, null);
gulp.src(fixturesGlob)
.pipe(mario)
.pipe(this.failingQueueStream)
.on('end', function () {
fancyLog = _;
done();
});
});

describe('should attach error handler', function () {
Expand Down
15 changes: 15 additions & 0 deletions test/passThrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ describe('stream', function () {
.pipe(through2.obj())
.pipe(plumber())
.pipe(es.writeArray(function (err, array) {
array.map((f) => {
delete f.stat.atime;
delete f.stat.atimeMs;
return f;
});
array.should.eql(this.expected);
done();
}.bind(this)))
Expand Down Expand Up @@ -51,6 +56,11 @@ describe('stream', function () {
gulp.src(fixturesGlob)
.pipe(plumber({ errorHandler: done }))
.pipe(es.writeArray(function (err, array) {
array.map((f) => {
delete f.stat.atime;
delete f.stat.atimeMs;
return f;
});
array.should.eql(this.expected);
done();
}.bind(this)))
Expand All @@ -73,6 +83,11 @@ describe('stream', function () {
before(function (done) {
gulp.src(fixturesGlob)
.pipe(es.writeArray(function (err, array) {
array.map((f) => {
delete f.stat.atime;
delete f.stat.atimeMs;
return f;
});
this.expected = array;
done();
}.bind(this)));
Expand Down
Loading

0 comments on commit 68e94bb

Please sign in to comment.