Skip to content

Commit

Permalink
Fallback to graceful-fs@4 if graceful-fs@3 is unsupported
Browse files Browse the repository at this point in the history
This uses a vinyl-fs@0.3 version coupled with graceful-fs@4 as a
fallback for the regular combination of vinyl-fs@0.3 and graceful-fs@3,
so that gulp@3 doesn't break on newer Node.js versions where
graceful-fs@3 is unsupported.

Current setups and Node.js versions (6.x and below) are not affected.
  • Loading branch information
Myles Borins committed Aug 18, 2016
1 parent 347ed5a commit 138a824
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ var util = require('util');
var Orchestrator = require('orchestrator');
var gutil = require('gulp-util');
var deprecated = require('deprecated');
var vfs = require('vinyl-fs');

var vfs;
try {
vfs = require('vinyl-fs');
} catch (e) {
vfs = require('vinyl-fs-03-compat');
}

function Gulp() {
Orchestrator.call(this);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"semver": "^4.1.0",
"tildify": "^1.0.0",
"v8flags": "^2.0.2",
"vinyl-fs": "^0.3.0"
"vinyl-fs": "^0.3.0",
"vinyl-fs-03-compat": "^0.3.15"
},
"devDependencies": {
"coveralls": "^2.7.0",
Expand Down

0 comments on commit 138a824

Please sign in to comment.