pub fn node_modules(
package_json: &Path,
dest: &Path,
) -> Result<Vec<Resolved>, Box<dyn Error>>Expand description
Resolve package_json’s dependencies transitively and extract the flat tree into
<dest>/node_modules/. Returns the resolved package set (sorted by name).
Skips all work when the resolved version set is unchanged and node_modules/ is
already populated. Serialized across concurrent invocations by a lock kept beside
node_modules/ (a refresh wipes node_modules/ itself, so the lock/marker can’t
live inside it).