Closed callumacrae closed 9 years ago
I think this PR was based on the assumption that it should only fail if one direct path is passed in, but it should also fail for
gulp.src(['a.js', 'b.js'])
if either a or b are not found
and also
gulp.src(['a.js', 'b*.js'])
if a.js is not found
I think this PR was based on the assumption that it should only fail if one direct path is passed in, but it should also fail for
Would that behaviour be as intuitive?
It's also waay trickier to implement. I can't figure out how I would do it, because the match
event doesn't say which glob was matched.
@callumacrae Any direct path should fail if it wasn't found, only doing so when one is specified seems like the unintuitive route
Also you do have access to the glob in match events https://github.com/callumacrae/glob-stream/blob/empty-error/index.js#L39 ourGlob is within scope
Done. Not sure if the weird error emitting stuff I'm doing is the best way, but I don't know any other.
I got confused by the whole create / createStream thing, I thought it would be trickier.
Looks good, just need to tweak the error management and we are :+1:
Nice PR :+1:
@contra this really should have been a 5.0 bump, not a 4.1
@phated Agreed. This changed build behavior here at Netflix.
Is it worth reverting it for 4.1.1 and releasing it in 5.0?
@callumacrae i think so
@phated typo'd the np command, you have access to the repo and pkg - would you mind doing the revert and republish? on a plane right now and i can barely load this webpage let alone npm publish
@contra I have publish rights but not access to this repo
Okay published as 5.0, which means now vinyl-fs needs to be bumped to 5.0 if it wants to depend on this and then gulp needs to be updated to depend on the new vinyl-fs
@contra were you able to publish 4.1.1 that reverts the breaking change?
npm ERR! version not found: glob-stream@4.1.1
Doesn't look like it.
git checkout fac7fa8957867e7b1348261118b18185b09e5218^
git checkout -b 4.x
np
npm dist-tag add glob-stream@5.0.0 latest
should do the trick. You don't need to checkout a new branch if you don't use np
.
np totally fails when doing this, going to have to do it manually
Also npm unpublish is totally failing. np just published a 5.1.0 with 4.x code and now I can't unpublish it. going to have to contact npm support because everything is fucked in this toolchain
You can't unpublish. Did you try what I said or did you start from 5.0? Because you can't do that.
Okay all done. 4.1.1 === 4.0.1, 5.0.0 = new stuff, tagged as latest. For future reference adding --force to the end of anything makes npm work
:+1:
Would it be possible to display the glob/filename that is causing the error? Right now it's very undescriptive and I have no idea which glob is causing the issue:
Error: File not found with singular glob
at Glob.<anonymous> (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob-stream/index.js:34:30)
at emitOne (events.js:77:13)
at Glob.emit (events.js:169:7)
at Glob._finish (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob/glob.js:172:8)
at done (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob/glob.js:159:12)
at Glob._processSimple2 (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob/glob.js:652:12)
at /Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob/glob.js:640:10
at Glob._stat2 (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob/glob.js:736:12)
at lstatcb_ (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/glob/glob.js:728:12)
at RES (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/inflight/inflight.js:23:14)
at f (/Users/Adam/Sites/meanie/boilerplate/src/node_modules/once/once.js:17:25)
at FSReqWrap.oncomplete (fs.js:82:15)
This is master but we aren't able to cut a release yet.
gulpjs/gulp#374