- Version: 8.3.0
- Platform: macOS
- Subsystem: repl
If a folder name ends in .js, the autocomplete suggestion in the repl will incorrectly remove the extension from the folder name.
To reproduce:
mkdir foo_bar.js
touch foo_bar.js/index.js
node
- In the repl, enter
require('./foo_ and press Tab
The autocomplete suggestion is require('./foo_bar') rather than require('./foo_bar.js'). Since foo_bar is a folder, removing the .js extension results in an error when calling require.
(I originally noticed this because I have a local clone of Inquirer.js, which was cloned into a folder with a .js extension.)