Closed as not planned
Description
Expected Behavior
The following command would allow a user to add the bar
and baz
packages to the foo
package.
lerna add --scope=foo bar baz
Current Behavior
Currently you can only add one package at a time. To achieve the goal of the previous example, you must run the following.
lerna add --scope=foo bar
lerna add --scope=foo baz
Context
It's quite common to install multiple npm packages as dependencies.
npm i -D eslint eslint-config-standard eslint-plugin-standard eslint-plugin-node eslint-plugin-import eslint-plugin-promise eslint-plugin-react
npm i -D @babel/core @babel/preset-env @babel/preset-react
npm i -D react react-dom redux react-redux react-router-dom
npm i -D webpack webpack-cli webpack-dev-server babel-loader file-loader css-loader style-loader
Intuitively, lerna should also allow this behavior.
#1608 was opened to request this feature, but no discussion came from it. The result was essentially "lerna doesn't do this" and the reason given was vague.
The ambiguity of targets forced a simplification of logic.
I'm not sure what that is supposed to mean, but this behavior caught me out the first time I tried to use lerna because I just expected it to work like npm.