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

readline: make tab size configurable #31318

Conversation

@BridgeAR
Copy link
Member

BridgeAR commented Jan 11, 2020

This adds the tabSize option to readline to allow different tab
sizes. It also cleans up some code and unifies the linebreak RegExp.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

Copy link
Member

bnoordhuis left a comment

The historySize changes should be a separate commit and arguably a separate PR because it's unrelated.

lib/readline.js Show resolved Hide resolved
@nodejs-github-bot

This comment was marked as outdated.

@BridgeAR BridgeAR force-pushed the BridgeAR:2020-01-11-readline-make-tab-size-configurable branch Jan 12, 2020
@BridgeAR

This comment has been minimized.

Copy link
Member Author

BridgeAR commented Jan 12, 2020

@bnoordhuis I removed the refactoring.

@BridgeAR BridgeAR force-pushed the BridgeAR:2020-01-11-readline-make-tab-size-configurable branch Jan 12, 2020
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment has been minimized.

Copy link

nodejs-github-bot commented Jan 12, 2020

@BridgeAR

This comment has been minimized.

Copy link
Member Author

BridgeAR commented Jan 13, 2020

@nodejs/readline @nodejs/repl PTAL (this is the basis to add the same option to the repl).

test/parallel/test-readline-interface.js Outdated Show resolved Hide resolved
@Trott

This comment has been minimized.

Copy link
Member

Trott commented Jan 14, 2020

Not opposed to this, but curious what the motivation is. Is this something you've needed but didn't have? Is it something someone has asked for?

@BridgeAR

This comment has been minimized.

Copy link
Member Author

BridgeAR commented Jan 14, 2020

@Trott neither. The reason is that it's possible to change the tab size in terminals.

@BridgeAR

This comment has been minimized.

Copy link
Member Author

BridgeAR commented Jan 17, 2020

@nodejs/repl @nodejs/readline this could use some reviews.

@BridgeAR BridgeAR requested review from targos, jasnell, lundibundi and mcollina Jan 20, 2020
Copy link
Member

mcollina left a comment

I would prefer if this did not edit existings tests as well, it makes the review harder.

@BridgeAR

This comment has been minimized.

Copy link
Member Author

BridgeAR commented Jan 20, 2020

I updated the tests to be independent but I want to note that we just copy 95% of the test code all the time.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

lib/readline.js Show resolved Hide resolved
@BridgeAR BridgeAR force-pushed the BridgeAR:2020-01-11-readline-make-tab-size-configurable branch Jan 22, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@Trott
Trott approved these changes Jan 27, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

@addaleax addaleax removed the author ready label Feb 5, 2020
Copy link
Member

addaleax left a comment

This needs a rebase

@BridgeAR BridgeAR force-pushed the BridgeAR:2020-01-11-readline-make-tab-size-configurable branch Feb 6, 2020
This adds the `tabSize` option to readline to allow different tab
sizes.
@BridgeAR BridgeAR force-pushed the BridgeAR:2020-01-11-readline-make-tab-size-configurable branch to c7571e2 Feb 6, 2020
@nodejs-github-bot

This comment has been minimized.

@nodejs-github-bot

This comment has been minimized.

addaleax added a commit that referenced this pull request Feb 7, 2020
This adds the `tabSize` option to readline to allow different tab
sizes.

PR-URL: #31318
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@addaleax

This comment has been minimized.

Copy link
Member

addaleax commented Feb 7, 2020

Landed in f9a27ea

@addaleax addaleax closed this Feb 7, 2020
codebytere added a commit that referenced this pull request Feb 17, 2020
This adds the `tabSize` option to readline to allow different tab
sizes.

PR-URL: #31318
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@codebytere codebytere mentioned this pull request Feb 17, 2020
codebytere added a commit that referenced this pull request Feb 18, 2020
Notable changes:

* async_hooks
  * add executionAsyncResource (Matteo Collina) #30959
* crypto
  * add crypto.diffieHellman (Tobias Nießen) #31178
  * add DH support to generateKeyPair (Tobias Nießen) #31178
  * simplify DH groups (Tobias Nießen) #31178
  * add key type 'dh' (Tobias Nießen) #31178
* test
  * skip keygen tests on arm systems (Tobias Nießen) #31178
* perf_hooks
  * add property flags to GCPerformanceEntry (Kirill Fomichev) #29547
* process
  * report ArrayBuffer memory in `memoryUsage()` (Anna Henningsen) #31550
* readline
  * make tab size configurable (Ruben Bridgewater) #31318
* report
  * add support for Workers (Anna Henningsen) #31386
* worker
  * add ability to take heap snapshot from parent thread (Anna Henningsen) #31569
* added new collaborators
  * add ronag to collaborators (Robert Nagy) #31498

PR-URL: #31837
codebytere added a commit that referenced this pull request Feb 18, 2020
Notable changes:

* async_hooks
  * add executionAsyncResource (Matteo Collina) #30959
* crypto
  * add crypto.diffieHellman (Tobias Nießen) #31178
  * add DH support to generateKeyPair (Tobias Nießen) #31178
  * simplify DH groups (Tobias Nießen) #31178
  * add key type 'dh' (Tobias Nießen) #31178
* test
  * skip keygen tests on arm systems (Tobias Nießen) #31178
* perf_hooks
  * add property flags to GCPerformanceEntry (Kirill Fomichev) #29547
* process
  * report ArrayBuffer memory in `memoryUsage()` (Anna Henningsen) #31550
* readline
  * make tab size configurable (Ruben Bridgewater) #31318
* report
  * add support for Workers (Anna Henningsen) #31386
* worker
  * add ability to take heap snapshot from parent thread (Anna Henningsen) #31569
* added new collaborators
  * add ronag to collaborators (Robert Nagy) #31498

PR-URL: #31837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

9 participants
You can’t perform that action at this time.