-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
readline: deprecate undocumented exports #3862
Conversation
LGTM |
Looks like |
Yes, semver-major for sure |
Are four functions mentioned in #3836 the only exports removed in this commit? |
The four functions from #3836, plus |
Hm… I am not sure if those are unused. Will post greps later, probably tomorrow. |
There are deprecation messages in place for all of them. |
@cjihrig Ah, sorry, I missed that =), was too sleepy yesterday. |
👍 |
CI is red but failures look unrelated. Do we want to go ahead and land or give it a bit? |
@jasnell Give me some time, I will take a quick look at the usage of those methods. |
@ChALkeR : +1 |
@nodejs/ctc ... a quick sanity check review on this would be appreciated |
return str.replace(new RegExp(metaKeyCodeReAnywhere.source, 'g'), ''); | ||
} | ||
exports.stripVTControlCharacters = stripVTControlCharacters; | ||
exports.emitKeypressEvents = internalUtil.deprecate(emitKeypressEvents, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should at least keep the style consistent here, preferably with each argument on a separate line (for better readability).
One minor nit, otherwise LGTM. |
https://gist.github.com/ChALkeR/9cd0a398093bc6161d36 — |
Out of those, |
@ChALkeR ... I'm sorry, is there a reason why it should what? |
Would there be value to leaving |
@cjihrig ... that's definitely a good possibility. I'd be ok with that. |
@jasnell Sorry, English is not my native language. I wanted to ask if there are any specific reasons why several modules have to call Note: I'm not familiar with |
@ChALkeR ... no worries :-) There may or may not be good reasons for modules calling it but given that they are and we made the mistake of not explicitly marking those as private using the |
@jasnell It's directly used by only 7 modules (plus the false negatives), so deprecating it shouldn't be such a problem. The question is — is that method a valuable addition the the API that we could want to keep? |
The ability to emit keypress events seems useful to me. |
Undid changes regarding |
This commit moves several of readline's undocumented functions into an internal module. Specifically, isFullWidthCodePoint, stripVTControlCharacters, getStringWidth, and emitKeys are moved to the internal module. The existing public exports of the first three functions are given a deprecation notice. Refs: #3847 Fixes: #3836 PR-URL: #3862 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
This commit removes the deprecated exports getStringWidth(), stripVTControlCharacters(), and isFullWidthCodePoint(). It also removes codePointAt() in its entirety, as it was deprecated and not being used by core. Refs: nodejs#3862 PR-URL: nodejs#6423 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit removes the deprecated exports getStringWidth(), stripVTControlCharacters(), and isFullWidthCodePoint(). It also removes codePointAt() in its entirety, as it was deprecated and not being used by core. Refs: nodejs#3862 PR-URL: nodejs#6423 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit moves the readline's undocumented exports into an internal module. The existing public exports are given a deprecation notice.
Refs: #3847
Fixes: #3836
R= @jasnell