Current Behavior:
If you install any package with the bundled dependency flag:
npm install <package-name> --save-bundle
... <package-name> is not added to the bundledDependencies array in your package.json file.
Expected Behavior:
When installing any package with the bundled dependency flag (--save-bundle or -B), the package should be installed and added to the bundledDependencies array in your package.json file.
Steps To Reproduce:
- In this environment, create a new directory, step into it, and run
npm init.
- After creating a plain/empty package.json, run
npm install <package-name> --save-bundle.
- Open package.json, and discover that the
bundledDependencies field does not exist, and <package-name> is not listed within it.
Environment:
- OS: Ubuntu 20.10
- Node: 14.15.0
- npm: 7.11.2
Additional Comments:
Interestingly enough, if you run npm install --help on v7.11.2, you'll see:
npm install [<@scope>/]<pkg>
npm install [<@scope>/]<pkg>@<tag>
npm install [<@scope>/]<pkg>@<version>
npm install [<@scope>/]<pkg>@<version range>
npm install <alias>@npm:<name>
npm install <folder>
npm install <tarball file>
npm install <tarball url>
npm install <git:// url>
npm install <github username>/<github project>
Options:
[-S|--save|--no-save|--save-prod|--save-dev|--save-optional|--save-peer]
[-E|--save-exact]
Notice that the --save-bundle flag IS NOT documented. However, if you read the v7 npm install docs, you'll see that the bundled dependency flags and behaviors ARE documented.
Current Behavior:
If you install any package with the bundled dependency flag:
...
<package-name>is not added to thebundledDependenciesarray in your package.json file.Expected Behavior:
When installing any package with the bundled dependency flag (
--save-bundleor-B), the package should be installed and added to thebundledDependenciesarray in your package.json file.Steps To Reproduce:
npm init.npm install <package-name> --save-bundle.bundledDependenciesfield does not exist, and<package-name>is not listed within it.Environment:
Additional Comments:
Interestingly enough, if you run
npm install --helpon v7.11.2, you'll see:Notice that the
--save-bundleflag IS NOT documented. However, if you read the v7 npm install docs, you'll see that the bundled dependency flags and behaviors ARE documented.