Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to leverate the latest cloneable readable #109

Merged
merged 3 commits into from
Sep 21, 2016

Conversation

mcollina
Copy link
Contributor

@phated phated changed the base branch from master to test-refactor September 20, 2016 21:33
@@ -111,10 +111,6 @@ File.prototype.clone = function(opt) {
// Clone our file contents
var contents;
if (this.isStream()) {
if (typeof this.contents.clone !== 'function') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed? I'm concerned that someone may set file._contents to a non-wrapped stream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of notes here:

a. the API compatible way to set file._contents is via file.contents. Are we supporting direct access to _contents? If so, yes, we should keep that check.
b. I've added a cloneable.isCloneable(stream) which is stricter.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, I am always scared that people will use anything exposed (even did a talk about it!)

@phated phated merged commit 1a1e0de into gulpjs:test-refactor Sep 21, 2016
@mcollina
Copy link
Contributor Author

I agree with you, but that's when I need to do something that is not supported by the API. contents is widely available and well documented.

@phated
Copy link
Member

phated commented Sep 21, 2016

Thanks @mcollina! The tests are working awesome now.

@mcollina mcollina deleted the test-refactor branch September 22, 2016 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants