| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Why add the _ prefix?
Sorry, something went wrong.
There was a problem hiding this comment.
This is to avoid conflict with afterTransform that is called on next line.
Sorry, something went wrong.
There was a problem hiding this comment.
since these are being changed to arrow functions, the self can be switched to this
Sorry, something went wrong.
There was a problem hiding this comment.
oups, you're right, thanks
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe use a camel case name like readableResume ?
Sorry, something went wrong.
There was a problem hiding this comment.
I was thinking to change it to _resume, in order to be consistent
Sorry, something went wrong.
There was a problem hiding this comment.
This is to avoid conflict with afterTransform that is called on next line.
Sorry, something went wrong.
|
I wonder if some of these changes, like _afterTransform, conflict with #9113. |
Sorry, something went wrong.
|
@lpinca I just look at those and we both change _stream_wrap.js but in different lines, so it shouldn't conflict, but thank for pointing it out, I didn't review other PRs |
Sorry, something went wrong.
|
@maasencioh my bad, I thought #9113 was proposing an eslint rule to check if names matched. Ignore me. |
Sorry, something went wrong.
|
@jasnell not all the self were removed, because in some cases the arrow funtion was inside a regular function, I run the tests and everithing it's currently passing |
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe call this one resume and rename the local function to resumeReadable ?
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if CI is green
Sorry, something went wrong.
Sorry, something went wrong.
|
I'm not sure that the CI failures are related to the changes |
Sorry, something went wrong.
|
@jasnell sorry it's anything else needed in this PR? |
Sorry, something went wrong.
There was a problem hiding this comment.
Some nits.
Sorry, something went wrong.
There was a problem hiding this comment.
Can you please revert all of those to function and name them?
Sorry, something went wrong.
There was a problem hiding this comment.
can you please name this one?
Sorry, something went wrong.
There was a problem hiding this comment.
can you please convert this forEach in a for loop, it can probably save us a couple of ticks.
Sorry, something went wrong.
There was a problem hiding this comment.
can you please name this?
Sorry, something went wrong.
There was a problem hiding this comment.
this should be named as well, also can you make this function top level, so that the for loop under can be optimized.
Sorry, something went wrong.
|
@maasencioh would you mind addressing the comments above? We can land this! |
Sorry, something went wrong.
|
Hello @mcollina, I thought that this was forgotten, but here I just added the new nits |
Sorry, something went wrong.
There was a problem hiding this comment.
Why not name this?
Sorry, something went wrong.
There was a problem hiding this comment.
sorry I miss that one, I'll check on the other ones
Sorry, something went wrong.
There was a problem hiding this comment.
Feel free to ignore, but I prefer naming handlers like onEnd, onData, etc.
Sorry, something went wrong.
There was a problem hiding this comment.
I wasn't sure which name could be more useful, so this comments are great, thanks
Sorry, something went wrong.
There was a problem hiding this comment.
A couple of nits and we are good to go.
Can you squash the commits as well?
Sorry, something went wrong.
There was a problem hiding this comment.
can this have a different name? Like _hasInstancePolyfill?
Sorry, something went wrong.
There was a problem hiding this comment.
can we name this writableHasInstance?
Sorry, something went wrong.
|
how does it looks now @mcollina? |
Sorry, something went wrong.
There was a problem hiding this comment.
are you sure you can use this here?
Sorry, something went wrong.
There was a problem hiding this comment.
self is not defined anymore in this function.
Sorry, something went wrong.
There was a problem hiding this comment.
why this?
Sorry, something went wrong.
There was a problem hiding this comment.
can you please revert this to self?
Sorry, something went wrong.
Sorry, something went wrong.
|
@maasencioh can you swash all the streams commit into one? I think it'd be easier to move around. |
Sorry, something went wrong.
|
@mcollina I took my time to make it completely like it should be, I changed everything, but I hope that all it's correct now |
Sorry, something went wrong.
There was a problem hiding this comment.
I think the norm is to omit the space after the function name.
Sorry, something went wrong.
There was a problem hiding this comment.
@TimothyGu any tip to run the linter and test only on this files? thanks
Sorry, something went wrong.
There was a problem hiding this comment.
Can you restore these spaces?
Sorry, something went wrong.
|
@mcollina what do you think now? any tip to run the linter and test only on this files? thanks |
Sorry, something went wrong.
|
@maasencioh run make jslint to run the linter. It will check all files the first time but the results are cached so subsequent runs should only check modified files. |
Sorry, something went wrong.
|
LGTM if ci is green. |
Sorry, something went wrong.
|
@jasnell @mcollina @targos could you please help me whith this doubt? I renamed a function as proposed like this: Object.defineProperty(Writable, Symbol.hasInstance, {
value: function writableHasInstance(object) {
if (realHasInstance.call(this, object))
return true;
return object && object._writableState instanceof WritableState;
}
});But currently this throws a jslint error 137:5 error Function name `writableHasInstance` should match property name `value` func-name-matching Should I follow the func-name-matching rule? because this will force me to rename several functions to avoid conflicts |
Sorry, something went wrong.
|
@maasencioh I think you can go ahead and leave that function anonymous. |
Sorry, something went wrong.
|
@maasencioh, alternatively, you can use an ESLint annotation to suppress that error. See this example in lib/internal/url.js. |
Sorry, something went wrong.
|
There hasn't been any activity here. I'm closing this. Feel free to reopen (or ping a collaborator) if I closed this in error. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Checklist
Description of change
Ref: #8913
For some callbacks I made a change to arrow funtions and for _stream_readable there was a change in Readable.prototype.wrap that I would like some opinions because I'm not sure if it's going to work as spected