Skip to content

Commit

Permalink
Fix: Upgrade glob-stream to remove path.normalize workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Nov 30, 2017
1 parent 0878094 commit 8cfb322
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions lib/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

var path = require('path');
var assign = require('object-assign');
var through2 = require('through2');
var gs = require('glob-stream');
Expand All @@ -14,21 +13,6 @@ var isValidGlob = require('is-valid-glob');
var getContents = require('./getContents');
var resolveSymlinks = require('./resolveSymlinks');

function normalizePath(options) {

function normalize(globFile, enc, cb) {
// TODO: probably move this somewhere
// Ref https://github.com/gulpjs/vinyl/issues/80
var normalizedFile = assign({}, globFile, {
path: path.normalize(globFile.path),
});

cb(null, normalizedFile);
}

return through2.obj(options, normalize);
}

function createFile(globFile, enc, cb) {
cb(null, new File(globFile));
}
Expand Down Expand Up @@ -56,7 +40,6 @@ function src(glob, opt) {
var globStream = gs.create(glob, options);

var outputStream = globStream
.pipe(normalizePath(options))
.pipe(resolveSymlinks(options))
.pipe(through2.obj(options, createFile));

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"dependencies": {
"duplexify": "^3.2.0",
"glob-stream": "^5.2.0",
"glob-stream": "^5.3.2",
"graceful-fs": "^4.0.0",
"gulp-sourcemaps": "^1.5.2",
"is-valid-glob": "^0.3.0",
Expand Down

0 comments on commit 8cfb322

Please sign in to comment.