Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-10-24 11:19:29 +0400
committerisaacs <i@izs.me>2013-10-24 11:25:26 +0400
commitc75a0d876b8ab9a6056aa716f1352443eed24a8f (patch)
treeed3a806a92da89ae0370d0243edf564cac8fa069 /node_modules/read-package-json
parent4989b4d4f23272bdf6e56b774760c634b7236d4c (diff)
various minor dep updates
Diffstat (limited to 'node_modules/read-package-json')
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS3
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/README.md2
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json29
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js1
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js35
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/package.json16
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/test/consistency.js2
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/test/fixtures/no-description.json4
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js68
-rw-r--r--node_modules/read-package-json/package.json6
10 files changed, 140 insertions, 26 deletions
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS b/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS
index c64debf74..10860f72b 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/AUTHORS
@@ -1,3 +1,4 @@
# Names sorted by how much code was originally theirs.
Isaac Z. Schlueter <i@izs.me>
-Meryn Stol <merynstol@gmail.com> \ No newline at end of file
+Meryn Stol <merynstol@gmail.com>
+Robert Kowalski <rok@kowalski.gd> \ No newline at end of file
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/README.md b/node_modules/read-package-json/node_modules/normalize-package-data/README.md
index ee1d72d81..9b9adcc2d 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/README.md
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/README.md
@@ -70,11 +70,13 @@ If the supplied data has an invalid name or version vield, `normalizeData` will
* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.
* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.
* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `"git"`.
+* If `repository.url` is not a valid url, but in the style of "[owner-name]/[repo-name]", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]
* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.
* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.
* If `homepage` field is not a string, it will be removed.
* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.
+* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.
### Rules for name field
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json b/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json
new file mode 100644
index 000000000..637c2f073
--- /dev/null
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/lib/core_module_names.json
@@ -0,0 +1,29 @@
+[
+"http",
+"events",
+"util",
+"domain",
+"cluster",
+"buffer",
+"stream",
+"crypto",
+"tls",
+"fs",
+"string_decoder",
+"path",
+"net",
+"dgram",
+"dns",
+"https",
+"url",
+"punycode",
+"readline",
+"repl",
+"vm",
+"child_process",
+"assert",
+"zlib",
+"tty",
+"os",
+"querystring"
+]
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js b/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js
index dbeef218b..83f10aa0a 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/lib/extract_description.js
@@ -3,6 +3,7 @@ module.exports = extractDescription
// Extracts description from contents of a readme file in markdown format
function extractDescription (d) {
if (!d) return;
+ if (d === "ERROR: No README data found!") return;
// the first block of text before the first heading
// that isn't the first line heading
d = d.trim().split('\n')
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js b/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js
index 7477b0839..eeb5bbd78 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js
@@ -4,6 +4,7 @@ var depTypes = ["dependencies","devDependencies","optionalDependencies"]
var extractDescription = require("./extract_description")
var url = require("url")
var typos = require("./typos")
+var coreModuleNames = require("./core_module_names")
var fixer = module.exports = {
// default warning function
@@ -183,8 +184,8 @@ var fixer = module.exports = {
, fixPeople: function(data) {
modifyPeople(data, unParsePerson)
- modifyPeople(data, parsePerson)
- }
+ modifyPeople(data, parsePerson)
+ }
, fixNameField: function(data, strict) {
if (!data.name && !strict) {
@@ -197,8 +198,10 @@ var fixer = module.exports = {
if (!strict)
data.name = data.name.trim()
ensureValidName(data.name, strict)
+ if (coreModuleNames.indexOf(data.name) !== -1)
+ this.warn(data.name + " is also the name of a node core module.")
}
-
+
, fixDescriptionField: function (data) {
if (data.description && typeof data.description !== 'string') {
@@ -207,16 +210,17 @@ var fixer = module.exports = {
}
if (data.readme && !data.description)
data.description = extractDescription(data.readme)
+ if(data.description === undefined) delete data.description;
if (!data.description) this.warn('No description')
}
-
+
, fixReadmeField: function (data) {
if (!data.readme) {
this.warn("No README data")
data.readme = "ERROR: No README data found!"
}
}
-
+
, fixBugsField: function(data) {
if (!data.bugs && data.repository && data.repository.url) {
var gh = parseGitHubURL(data.repository.url)
@@ -261,8 +265,16 @@ var fixer = module.exports = {
}
}
-, fixHomepageField: function(data) {
- if(!data.homepage) return true;
+, fixHomepageField: function(data) {
+ if (!data.homepage && data.repository && data.repository.url) {
+ var gh = parseGitHubURL(data.repository.url)
+ if (gh)
+ data.homepage = gh
+ else
+ return true
+ } else if (!data.homepage)
+ return true
+
if(typeof data.homepage !== "string") {
this.warn("homepage field must be a string url. Deleted.")
return delete data.homepage
@@ -323,19 +335,20 @@ function addOptionalDepsToDeps (data, warn) {
Object.keys(o).forEach(function (k) {
d[k] = o[k]
})
- data.dependencies = d
+ data.dependencies = d
}
-function depObjectify (deps) {
+function depObjectify (deps, type, warn) {
if (!deps) return {}
if (typeof deps === "string") {
deps = deps.trim().split(/[\n\r\s\t ,]+/)
}
if (!Array.isArray(deps)) return deps
+ warn("specifying " + type + " as array is deprecated")
var o = {}
deps.filter(function (d) {
return typeof d === "string"
- }).forEach(function(d) {
+ }).forEach(function(d) {
d = d.trim().split(/(:?[@\s><=])/)
var dn = d.shift()
var dv = d.join("")
@@ -349,7 +362,7 @@ function depObjectify (deps) {
function objectifyDeps (data, warn) {
depTypes.forEach(function (type) {
if (!data[type]) return;
- data[type] = depObjectify(data[type])
+ data[type] = depObjectify(data[type], type, warn)
})
}
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/package.json b/node_modules/read-package-json/node_modules/normalize-package-data/package.json
index 91509b7fa..049a1094f 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/package.json
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/package.json
@@ -1,6 +1,6 @@
{
"name": "normalize-package-data",
- "version": "0.2.2",
+ "version": "0.2.6",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
@@ -31,17 +31,17 @@
{
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
+ },
+ {
+ "name": "Robert Kowalski",
+ "email": "rok@kowalski.gd"
}
],
- "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
+ "readme": "# normalize-package-data [![Build Status](https://travis-ci.org/meryn/normalize-package-data.png?branch=master)](https://travis-ci.org/meryn/normalize-package-data)\n\nnormalize-package data exports a function that normalizes package metadata. This data is typically found in a package.json file, but in principle could come from any source - for example the npm registry.\n\nnormalize-package-data is used by [read-package-json](https://npmjs.org/package/read-package-json) to normalize the data it reads from a package.json file. In turn, read-package-json is used by [npm](https://npmjs.org/package/npm) and various npm-related tools.\n\n## Installation\n\n```\nnpm install normalize-package-data\n```\n\n## Usage\n\nBasic usage is really simple. You call the function that normalize-package-data exports. Let's call it `normalizeData`.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nnormalizeData(packageData)\n// packageData is now normalized\n```\n\n#### Strict mode\n\nYou may activate strict validation by passing true as the second argument.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, true)\n// packageData is now normalized\n```\n\nIf strict mode is activated, only Semver 2.0 version strings are accepted. Otherwise, Semver 1.0 strings are accepted as well. Packages must have a name, and the name field must not have contain leading or trailing whitespace.\n\n#### Warnings\n\nOptionally, you may pass a \"warning\" function. It gets called whenever the `normalizeData` function encounters something that doesn't look right. It indicates less than perfect input data.\n\n```javascript\nnormalizeData = require('normalize-package-data')\npackageData = fs.readfileSync(\"package.json\")\nwarnFn = function(msg) { console.error(msg) }\nnormalizeData(packageData, warnFn)\n// packageData is now normalized. Any number of warnings may have been logged.\n```\n\nYou may combine strict validation with warnings by passing `true` as the second argument, and `warnFn` as third.\n\nWhen `private` field is set to `true`, warnings will be suppressed.\n\n### Potential exceptions\n\nIf the supplied data has an invalid name or version vield, `normalizeData` will throw an error. Depending on where you call `normalizeData`, you may want to catch these errors so can pass them to a callback.\n\n## What normalization (currently) entails\n\n* The value of `name` field gets trimmed (unless in strict mode).\n* The value of the `version` field gets cleaned by `semver.clean`. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n* If `name` and/or `version` fields are missing, they are set to empty strings.\n* If `files` field is not an array, it will be removed.\n* If `bin` field is a string, then `bin` field will become an object with `name` set to the value of the `name` field, and `bin` set to the original string value.\n* If `man` field is a string, it will become an array with the original string as its sole member.\n* If `keywords` field is string, it is considered to be a list of keywords separated by one or more white-space characters. It gets converted to an array by splitting on `\\s+`.\n* All people fields (`author`, `maintainers`, `contributors`) get converted into objects with name, email and url properties.\n* If `bundledDependencies` field (a typo) exists and `bundleDependencies` field does not, `bundledDependencies` will get renamed to `bundleDependencies`.\n* If the value of any of the dependencies fields (`dependencies`, `devDependencies`, `optionalDependencies`) is a string, it gets converted into an object with familiar `name=>value` pairs.\n* The values in `optionalDependencies` get added to `dependencies`. The `optionalDependencies` array is left untouched.\n* If `description` field does not exists, but `readme` field does, then (more or less) the first paragraph of text that's found in the readme is taken as value for `description`.\n* If `repository` field is a string, it will become an object with `url` set to the original string value, and `type` set to `\"git\"`.\n* If `repository.url` is not a valid url, but in the style of \"[owner-name]/[repo-name]\", `repository.url` will be set to git://github.com/[owner-name]/[repo-name]\n* If `bugs` field is a string, the value of `bugs` field is changed into an object with `url` set to the original string value.\n* If `bugs` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `bugs` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/issues . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n* If `bugs` field is an object, the resulting value only has email and url properties. If email and url properties are not strings, they are ignored. If no valid values for either email or url is found, bugs field will be removed.\n* If `homepage` field is not a string, it will be removed.\n* If the url in the `homepage` field does not specify a protocol, then http is assumed. For example, `myproject.org` will be changed to `http://myproject.org`.\n* If `homepage` field does not exist, but `repository` field points to a repository hosted on GitHub, the value of the `homepage` field gets set to an url in the form of https://github.com/[owner-name]/[repo-name]/ . If the repository field points to a GitHub Gist repo url, the associated http url is chosen.\n\n### Rules for name field\n\nIf `name` field is given, the value of the name field must be a string. The string may not:\n\n* start with a period.\n* contain the following characters: `/@\\s+%`\n* contain and characters that would need to be encoded for use in urls.\n* resemble the word `node_modules` or `favicon.ico` (case doesn't matter).\n\n### Rules for version field\n\nIf `version` field is given, the value of the version field must be a valid *semver* string, as determined by the `semver.valid` method. See [documentation for the semver module](https://github.com/isaacs/node-semver).\n\n## Credits\n\nThis package contains code based on read-package-json written by Isaac Z. Schlueter. Used with permisson.\n\n## License\n\nnormalize-package-data is released under the [BSD 2-Clause License](http://opensource.org/licenses/MIT). \nCopyright (c) 2013 Meryn Stol ",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
},
- "_id": "normalize-package-data@0.2.2",
- "dist": {
- "shasum": "ff276c97296154b99ca2af9cefbe3a6a3bde07bb"
- },
- "_from": "normalize-package-data@~0.2",
- "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.2.2.tgz"
+ "_id": "normalize-package-data@0.2.6",
+ "_from": "normalize-package-data@~0.2"
}
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/consistency.js b/node_modules/read-package-json/node_modules/normalize-package-data/test/consistency.js
index 8ae6b2730..4082be25c 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/test/consistency.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/consistency.js
@@ -24,7 +24,7 @@ tap.test("consistent normalization", function(t) {
clonedData = _.clone(data)
normalize(data, warn)
t.deepEqual(clonedData, data,
- "Normalization of " + entryName + "is consistent.")
+ "Normalization of " + entryName + " is consistent.")
next(null)
}) // fs.readFile
} // verifyConsistency
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/fixtures/no-description.json b/node_modules/read-package-json/node_modules/normalize-package-data/test/fixtures/no-description.json
new file mode 100644
index 000000000..9ea70b6bf
--- /dev/null
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/fixtures/no-description.json
@@ -0,0 +1,4 @@
+{
+ "name": "foo-bar-package",
+ "version": "0.0.1"
+} \ No newline at end of file
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js b/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js
index 1178fc647..6e96e6dc9 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/normalize.js
@@ -55,6 +55,30 @@ tap.test("empty object", function(t) {
t.end()
})
+tap.test("core module name", function(t) {
+ var warnings = []
+ function warn(m) {
+ warnings.push(m)
+ }
+ var a
+ normalize(a={
+ name: "http",
+ readme: "read yourself how about",
+ homepage: 123,
+ bugs: "what is this i don't even",
+ repository: "Hello."
+ }, warn)
+
+ var expect = [
+ "http is also the name of a node core module.",
+ "Bug string field must be url, email, or {email,url}",
+ "Normalized value of bugs field is an empty object. Deleted.",
+ "homepage field must be a string url. Deleted."
+ ]
+ t.same(warnings, expect)
+ t.end()
+})
+
tap.test("urls required", function(t) {
var warnings = []
function warn(w) {
@@ -143,6 +167,50 @@ tap.test("treat isaacs/node-graceful-fs as github repo", function(t) {
t.end()
});
+tap.test("homepage field will set to github url if repository is a github repo", function(t) {
+ var a
+ normalize(a={
+ repository: { type: "git", url: "git://github.com/isaacs/node-graceful-fs" }
+ })
+ t.same(a.homepage, 'https://github.com/isaacs/node-graceful-fs')
+ t.end()
+})
+
+tap.test("homepage field will set to github gist url if repository is a gist", function(t) {
+ var a
+ normalize(a={
+ repository: { type: "git", url: "git@gist.github.com:123456.git" }
+ })
+ t.same(a.homepage, 'https://gist.github.com/123456')
+ t.end()
+})
+
+tap.test("homepage field will set to github gist url if repository is a shorthand reference", function(t) {
+ var a
+ normalize(a={
+ repository: { type: "git", url: "sindresorhus/chalk" }
+ })
+ t.same(a.homepage, 'https://github.com/sindresorhus/chalk')
+ t.end()
+})
+
+tap.test("deprecation warning for array in dependencies fields", function(t) {
+ var a
+ var warnings = []
+ function warn(w) {
+ warnings.push(w)
+ }
+ normalize(a={
+ dependencies: [],
+ devDependencies: [],
+ optionalDependencies: []
+ }, warn)
+ t.ok(~warnings.indexOf("specifying dependencies as array is deprecated"), "deprecation warning")
+ t.ok(~warnings.indexOf("specifying devDependencies as array is deprecated"), "deprecation warning")
+ t.ok(~warnings.indexOf("specifying optionalDependencies as array is deprecated"), "deprecation warning")
+ t.end()
+})
+
tap.test('no new globals', function(t) {
t.same(Object.keys(global), globals)
t.end()
diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json
index 0e7e107db..58e8d5908 100644
--- a/node_modules/read-package-json/package.json
+++ b/node_modules/read-package-json/package.json
@@ -34,9 +34,5 @@
"url": "https://github.com/isaacs/read-package-json/issues"
},
"_id": "read-package-json@1.1.3",
- "dist": {
- "shasum": "0c2fbf428e324026e29812eebdfbacfe729a4c71"
- },
- "_from": "read-package-json@~1.1.3",
- "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.1.3.tgz"
+ "_from": "read-package-json@latest"
}