| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
IMHO it would be better to add clearBufferedCommand to REPLServer.prototype.
About Object.defineProperty(this, 'bufferedCommand' I'm not sure since that will change the .hasOwnProperty('bufferedCommand')
Sorry, something went wrong.
There was a problem hiding this comment.
Does this function need to be exposed at all? Would it work to create a function in this file that has the symbol in scope and takes the REPL as an argument?
Sorry, something went wrong.
There was a problem hiding this comment.
Nit: in general kBufferedCommandSymbol is prefered to ALL_CAPS.
Sorry, something went wrong.
There was a problem hiding this comment.
Should this probably be REPLACEME till landing? Anyway, even 8.1.1 has not this fix.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes. I wasn't sure what to put here (and didn't realize 8.1.1 was released yesterday).
Sorry, something went wrong.
There was a problem hiding this comment.
I am not sure about rules here. Maybe it is usually replaced on backporting from master to current?
Sorry, something went wrong.
|
Added some comments. |
Sorry, something went wrong.
There was a problem hiding this comment.
Do you foresee this being something that is needed at all outside of core? Also, I'm not sure that we can just remove bufferedCommand with no notice.
Sorry, something went wrong.
There was a problem hiding this comment.
Space after the period please.
Sorry, something went wrong.
There was a problem hiding this comment.
Does this function need to be exposed at all? Would it work to create a function in this file that has the symbol in scope and takes the REPL as an argument?
Sorry, something went wrong.
|
@cjihrig I really only see the bufferedCommand being useful outside of core in cases where users have used REPLServer.defineCommand and want to clear what may exist within the buffer. This is the doc example in which it was exposed, and it seems more break-y to remove it completely vs. a deprecation. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM if this isn't being used.
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
add enumerable: true here.
Sorry, something went wrong.
There was a problem hiding this comment.
This would need an assigned deprecation code. See doc/api/deprecations.md.
Before this lands, make the code DEP00XX and whom ever does the landing would assign the actual code.
The code would be passed in as the third argument for the util.deprecate() method.
Sorry, something went wrong.
There was a problem hiding this comment.
Needs a bit more work. Left a couple comments.
Sorry, something went wrong.
|
@jasnell thanks - I've added a temporary deprecation code to util.deprecate but it wasn't clear from your comment if I should also add this to deprecations.md or if that happens when the PR lands. |
Sorry, something went wrong.
|
Yes, an entry should be added to deprecations.md using the temporary code. |
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/8741/ @jasnell documentation bits added. |
Sorry, something went wrong.
|
Hmnm feebsd test failed with not ok 535 parallel/test-http-agent-keepalive
---
duration_ms: 0.753
severity: crashed
stack: |-
oh no!
exit code: CRASHED (Signal: 11)
which seems unrelated. |
Sorry, something went wrong.
|
'nother CI https://ci.nodejs.org/job/node-test-commit/10701/ @jasnell look ok to you? |
Sorry, something went wrong.
|
I've cleared my review. I'd like to get more input from @nodejs/ctc about whether this is something we definitely want to do. |
Sorry, something went wrong.
|
ping @ChALkeR ... any way to get a usage analysis |
Sorry, something went wrong.
|
Awaiting CTC review @nodejs/ctc |
Sorry, something went wrong.
|
@Trott any movement on this from @nodjs/ctc? |
Sorry, something went wrong.
|
@lance Can you rebase to get rid of conflicts? (I'm guessing it's all white-space stuff based on new stricter indentation linting. Be sure to run make jslint before pushing to GitHub to resolve the conflicts.) |
Sorry, something went wrong.
|
Needs one more CTC approval. Pinging some CTC folks who have several commits modifying lib/repl.js: @indutny @bnoordhuis @mscdex @addaleax @thefourtheye @evanlucas |
Sorry, something went wrong.
|
https://github.com/search?l=JavaScript&p=2&q=bufferedCommand&type=Code&utf8=%E2%9C%93 has some real world use cases for this currently. Are we sure that we can justify this breaking change? I'm on the fence |
Sorry, something went wrong.
Relates to #12686 The `REPLServer.bufferedCommand` property was undocumented, except for its usage appearing, unexplained, in an example for `REPLServer.defineCommand`. This commit deprecates that property, privatizes it, and adds a `REPLServer.clearBufferedCommand()` function that will clear the buffer.
Change to kBufferedCommandSymbol instead of BUFFERED_COMMAND. Made `clearBufferedCommand` exist on `REPLServer.prototype`. Minor typo corrections.
and make REPLServer.bufferedCommand enumerable
|
@evanlucas there are a lot of results returned from that query, but the vast majority of them are for jquery-buffer.js which is unrelated. I skimmed through the first 10 pages of results, and other than jquery-buffer.js, most of the references fall into two categories.
The first case is covered by the addition of REPLServer.clearBufferedCommand(), and the second will not be affected by this change. I tried to figure out a way to eliminate jquery-buffer.js from search results, but my GitHub search foo is not quite there. |
Sorry, something went wrong.
There was a problem hiding this comment.
Given the usage data and that its only deprecation at this point it seems reasonable to me.
Sorry, something went wrong.
|
@lance I un-landed this PR because the DEP00XX should have been replaced while landing… if you want to re-land with that, please do so, otherwise I can. :) |
Sorry, something went wrong.
|
Re-landed in 2ca9f94 I realized I made the same mistake a couple of days ago, maybe that was a bit confusing … sorry! |
Sorry, something went wrong.
The `REPLServer.bufferedCommand` property was undocumented, except for its usage appearing, unexplained, in an example for `REPLServer.defineCommand`. This commit deprecates that property, privatizes it, and adds a `REPLServer.clearBufferedCommand()` function that will clear the buffer. PR-URL: #13687 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <mhdawson@ibm.com> Reviewed-By: Ruben Bridgewater <ruben.bridgewater@fintura.de> Refs: #12686
|
@addaleax I realized my mistake after I walked away from my computer today. Thanks for fixing it up. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
The REPLServer.bufferedCommand property was undocumented, except
for its usage appearing, unexplained, in an example for
REPLServer.defineCommand. This commit deprecates that property,
privatizes it, and adds a REPLServer.clearBufferedCommand()
function that will clear the buffer.
Refs: #12686
Checklist
Affected core subsystem(s)
repl, doc