Skip to content

Conversation

piotrzarycki
Copy link

@piotrzarycki piotrzarycki commented Sep 5, 2025

#59763

This PR introduces changes which, instead of forcing the autocompleted version when you press Enter and saving it to history, allow users to:

Execute commands exactly as typed when pressing Enter
Use Tab key for explicit autocomplete acceptance

output

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem. labels Sep 5, 2025
@piotrzarycki piotrzarycki force-pushed the feat/prevent-autocompletion-on-enter branch from 554f8af to fb544a4 Compare September 5, 2025 20:27
@piotrzarycki piotrzarycki force-pushed the feat/prevent-autocompletion-on-enter branch from fb544a4 to 69ad98d Compare September 5, 2025 20:55
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.94%. Comparing base (0f58a3d) to head (69ad98d).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59777      +/-   ##
==========================================
- Coverage   89.95%   89.94%   -0.01%     
==========================================
  Files         667      667              
  Lines      197197   197202       +5     
  Branches    38525    38524       -1     
==========================================
- Hits       177386   177382       -4     
+ Misses      12243    12216      -27     
- Partials     7568     7604      +36     
Files with missing lines Coverage Δ
lib/internal/repl/utils.js 94.17% <100.00%> (-2.31%) ⬇️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@piotrzarycki piotrzarycki force-pushed the feat/prevent-autocompletion-on-enter branch 3 times, most recently from 0b49c30 to 69ad98d Compare September 7, 2025 11:23
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR itself looks fine on a first glimpse from what it wants to achieve.
As outlined in the mentioned issue, this just seems rather a bug in the autocompletion suggestions than in the enter handling.

We should definitely pick up construct as property and the autocompletion would than handle it as expected.

I would therefore rather have that change than removing the enter behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. repl Issues and PRs related to the REPL subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants