[NPMCLI-14] Make the CLI command and package name the same Created: 12/May/16  Updated: 21/Feb/17  Resolved: 21/Feb/17

Status: Closed
Project: Magnolia CLI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Maxime Michel Assignee: Unassigned
Resolution: Won't Fix Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

While reviewing NPMCLI-10, it surprised me that there would be a difference between the command that you call in your terminal, and the name of the package you install. It seems like a pattern that's respected among the most popular NPM packages (gulp, browserify, ionic, bower, express, cordova, forever, etc.). To me breaking it is very likely to induce some unnecessary confusion.



 Comments   
Comment by Christopher Zimmermann [ 21/Jul/16 ]

I could see it being "mgnl" or "mgnl-cli". Both are preferable to package name "cli".

Ember has package name "ember-cli", while command is "ember".
Redux has package name "redux-cli", while command is "redux".

Angular is wierder. package name i s"angular-cli" while command is "ng".

Comment by Robert Kowalski [ 25/Jan/17 ]

for the migration period we can run npm deprecate with a message that informs the users about the new package name:

e.g.

npm deprecate @magnolia/cli "@magnolia/cli is called mgnl-cli now. use npm i -g mgnl-cli to install it"

this way everyone who installs the package under the old name gets a heads up where they can get the latest & greatest version.

doc reference:
https://docs.npmjs.com/cli/deprecate

Comment by Christopher Zimmermann [ 21/Feb/17 ]

After discussing further with Robert I agree that for the CLI we should use an unscoped package name. People are simply more familar with it - and its easy to tell people how to get it - especially those that use npm all the time.
"npm install mgnl -g"

Comment by Christopher Zimmermann [ 21/Feb/17 ]

Seeing as Angular just changed their name to @angular/cli this practice will become more familiar with devellopers. We keep the name as is.

Generated at Mon Feb 12 04:45:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.