Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove overlay json support

  • Loading branch information...
commit 3024e968630081a28d8c32404880ea81bf268b75 1 parent 8ee3c3e
@isaacs isaacs authored
Showing with 0 additions and 40 deletions.
  1. +0 −34 doc/json.md
  2. +0 −6 lib/utils/read-json.js
View
34 doc/json.md
@@ -389,37 +389,3 @@ specify "*" as the version), then any version of node will do.
If you specify an "engines" field, then npm will require that "node" be
somewhere on that list. If "engines" is omitted, then npm will just assume
that it works on node.
-
-## overlay
-
-npm responds to the `node` and `npm` env-specific package.json values, which
-you can hang on the "overlay" key.
-
-For example:
-
- { "name" : "foo"
- , "version" : 7
- , "description" : "generic description"
- , "overlay" :
- { "node" :
- { "name" : "bar"
- , "description" : "description for node"
- }
- , "npm" :
- { "version" : "1.0.7"
- , "description" : "description for npm"
- }
- , "narwhal" :
- { "description" : "description for narwhal" }
- }
- }
-
-In this case, this is what npm will treat it as:
-
- { "name" : "bar"
- , "version" : "1.0.7"
- , "description" : "description for npm"
- }
-
-This way, even if npm is not exactly the same as some other package management
-system, you can still use both, and it can be a happy planet.
View
6 lib/utils/read-json.js
@@ -79,12 +79,6 @@ function processJsonString (opts, cb) { return function (er, jsonString) {
return processObject(opts, cb)(er, json)
}}
function processObject (opts, cb) { return function (er, json) {
- if (json.overlay) {
- ;["node", "npm"].forEach(function (k) {
- if (!json.overlay[k]) return undefined
- for (var i in json.overlay[k]) json[i] = json.overlay[k][i]
- })
- }
// slashes would be a security risk.
// anything else will just fail harmlessly.
Please sign in to comment.
Something went wrong with that request. Please try again.