Duplicate package installed. ESM?
Closed this issue · 1 comments
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
The package depends on:
@angular-devkit/schematics-cli@npm:17.3.11
inquirer@9.2.15
inquirer@8.2.6
Which causes us to install multiple versions of inquirer.
Describe the solution you'd like
Upgrading to inquirer@9:
However, this version of inquirer is esm only, which means we'll have to do migrate nest-cli to be esm, or use something to make it work.
Upgrading the version of angular-devkit to >= 18.0.0
The newer angular-devkit version uses @inquirer/prompt
which is a dual package (uses tshy). Which means that we will be able to use the new package without adding duplicate packages
However, this opens up a whole new pack of worms (a quick look into the angular cli repo leads me to believe this would be easy)
Teachability, documentation, adoption, migration strategy
I think the best course of action is:
- choose a new version of devkit
- upgrade inquirer to the version used in that devkit version
- upgrade devkit to the newer version
(steps 2 and 3 can be done in parallel)
*@angular-devkit/schematics-cli@18.2.12
uses @inquirer/prompts@5.3.8
*@angular-devkit/schematics-cli@19.0.4
uses @inquirer/prompts@7.1.0
btw, inquirer 8 and 9 use different major versions of:
- chalk
- cli-width
- mute-stream
- run-async
- thorough
(I didn't investigate further but I think if we go down a level we will find more packages)
What is the motivation / use case for changing the behavior?
The idea is to reduce the number of packages installed. The gains are not huge, and I don't know if it is worth it, but I just noticed this duplication and thought to report here.