Any time a thing is added to the cache, by url, path or name@version/range/tag, set a lock file, and then clear it after completion. npm can now safely share the cache folder between separate processes. However, it is still *not* safe to do multiple parallel installs in the same prefix.
…e the full url.
Fixes crash when package only has `devDependencies` field.
When running `npm install` in a package, if one of the deps depends on the root package, it might not be require()-able (if the folder name doens't match, and/or if it's not in a node_modules folder). This makes that work. Originally by @SubStack, edited slightly by @isaacs. * failing test for pkg.name that can't be required * fix the false_name test by altering data.name when it's not in a requirable location * set data.name to null for unrequirable packages, less hackishly