//! `add` — resolve package(s), record them in `package.json`, write `package-lock.json`, install
//! (= `npm install <pkg>`).
use Path;
use common;
use Progress;
use Res;
use cratePackumentDetail;
/// Record each package (latest → `^x.y.z` when no range given) in `package.json` (scaffolding one
/// if absent), then `sync` the lock + `node_modules/`. The spec parsing and manifest work live in
/// [`common::add_specs`], shared with `install <SOURCES>`.
pub