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

repl: Extra / on completion after require #33238

Closed
coreyfarrell opened this issue May 4, 2020 · 0 comments
Closed

repl: Extra / on completion after require #33238

coreyfarrell opened this issue May 4, 2020 · 0 comments
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.

Comments

@coreyfarrell
Copy link
Member

  • Version: v14.1.0
  • Platform: Linux lt2.cfware.com 5.5.10-100.fc30.x86_64 deps: update openssl to 1.0.1j #1 SMP Wed Mar 18 14:34:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: REPL

What steps will reproduce the bug?

Install a package that has sub-directories (lets say nano for an example). Run repl with node and type require('nano without the closing quote:
Screenshot from 2020-05-04 14-29-04

Note the position of the cursor and the suggested /, this is valid. Typing ') to close the require call does not remove the suggested /. At this point pressing keyboard left, end or tab causes an additional / to be displayed.

Typing require('nano/') then pressing tab causes nano/lib/ and nano/package to be suggested.

How often does it reproduce? Is there a required condition?

Every time.

What is the expected behavior?

Completion of the string passed to require() should end as soon as the closing ' is typed.

What do you see instead?

Screenshot from 2020-05-04 14-40-51

Additional information

Sorry for using screen-captures it's difficult to show what I'm seeing otherwise.

@BridgeAR BridgeAR added confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem. labels May 4, 2020
BridgeAR added a commit to BridgeAR/node that referenced this issue May 7, 2020
This improves the autocompletion for require calls. It had multiple
small issues so far. Most important: it won't suggest completions for
require statements that are fully written out. Second, it'll detect
require calls that have whitespace behind the opening bracket. Third,
it makes sure node modules are detected as such instead of only
suggesting them as folders. Last, it adds suggestions for input that
starts with backticks.

Fixes: nodejs#33238

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
codebytere pushed a commit that referenced this issue May 16, 2020
This improves the autocompletion for require calls. It had multiple
small issues so far. Most important: it won't suggest completions for
require statements that are fully written out. Second, it'll detect
require calls that have whitespace behind the opening bracket. Third,
it makes sure node modules are detected as such instead of only
suggesting them as folders. Last, it adds suggestions for input that
starts with backticks.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: #33282
Fixes: #33238
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Feb 2, 2021
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Feb 2, 2021
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Feb 4, 2021
Refs: nodejs#33238
Refs: nodejs#33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Feb 4, 2021
Refs: nodejs#33238
Refs: nodejs#33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Trott pushed a commit to ExE-Boss/node that referenced this issue Feb 6, 2021
Refs: nodejs#33238
Refs: nodejs#33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: nodejs#37178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
danielleadams pushed a commit that referenced this issue Feb 16, 2021
Refs: #33238
Refs: #33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: #37178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this issue Aug 8, 2021
Refs: nodejs#33238
Refs: nodejs#33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: nodejs#37178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this issue Aug 8, 2021
Refs: nodejs#33238
Refs: nodejs#33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: nodejs#37178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this issue Sep 1, 2021
Refs: #33238
Refs: #33282

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

PR-URL: #37178
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants