pub async fn fetch(
npm: &mut Npm,
name: &str,
range: Option<&str>,
dir: &Path,
) -> Result<Pinned, NpmError>Expand description
Downloads name (at range, else the latest version), verifies its
tarball and unpacks it in place of dir, without its dependencies.
Returns its pin, whose path is empty: the package is dir itself.