gulpjs / glob-stream

Readable streamx interface over anymatch.
MIT License
178 stars 53 forks source link

Add Use-Strict to Prevent Version Conflict #12

Closed azweb76 closed 10 years ago

azweb76 commented 10 years ago

Using "module.exports = us = {" causes the instance to be added to the global object that spans all packages. If module A references version 1 of glob-stream and module B references version 2, both modules will use the same version.

I left the failed test as is per your last request.

yocontra commented 10 years ago

Nice

yocontra commented 10 years ago

I'll merge this in because it fixes a linting problem but this actually isn't a problem AFAIK. Every node module is evaluated in a vm.runInContext so unless you attach something to global specifically then you can't leak out.

azweb76 commented 10 years ago

We actually proved it to be a problem when using gulp and rpmbuild at the same time.

If I get time, I will create a test project. On Jan 3, 2014 6:53 PM, "Eric Schoffstall" notifications@github.com wrote:

I'll merge this in because it fixes a linting problem but this actually isn't a problem AFAIK. Every node module is evaluated in a vm.runInContext so unless you attach something to global specifically then you can't leak out.

— Reply to this email directly or view it on GitHubhttps://github.com/wearefractal/glob-stream/pull/12#issuecomment-31568379 .

azweb76 commented 10 years ago

Thank you On Jan 3, 2014 6:53 PM, "Eric Schoffstall" notifications@github.com wrote:

I'll merge this in because it fixes a linting problem but this actually isn't a problem AFAIK. Every node module is evaluated in a vm.runInContext so unless you attach something to global specifically then you can't leak out.

— Reply to this email directly or view it on GitHubhttps://github.com/wearefractal/glob-stream/pull/12#issuecomment-31568379 .