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>2014-07-31 21:24:25 +0400
committerisaacs <i@izs.me>2014-07-31 21:24:25 +0400
commitd9a9e8448f093f59d8db71daad2d508c78a57192 (patch)
tree2ca028f32b395c123548fd2b64d5ab232d89ac03
parent86f0340fd0401011ba1d380c38b74340c49f0542 (diff)
read-package-json@1.2.4
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js19
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/package.json24
-rw-r--r--node_modules/read-package-json/node_modules/normalize-package-data/test/github-urls.js14
-rw-r--r--node_modules/read-package-json/package.json35
-rw-r--r--package.json2
5 files changed, 65 insertions, 29 deletions
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 cc560f30e..72836002f 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
@@ -290,10 +290,25 @@ var fixer = module.exports = {
}
}
+function isValidScopedPackageName(spec) {
+ if (spec.charAt(0) !== '@') return false
+
+ var rest = spec.slice(1).split('/')
+ if (rest.length !== 2) return false
+
+ return rest[0] && rest[1] &&
+ rest[0] === encodeURIComponent(rest[0]) &&
+ rest[1] === encodeURIComponent(rest[1])
+}
+
+function isCorrectlyEncodedName(spec) {
+ return !spec.match(/[\/@\s\+%:]/) &&
+ spec === encodeURIComponent(spec)
+}
+
function ensureValidName (name, strict) {
if (name.charAt(0) === "." ||
- name.match(/[\/@\s\+%:]/) ||
- name !== encodeURIComponent(name) ||
+ !(isValidScopedPackageName(name) || isCorrectlyEncodedName(name)) ||
(strict && name !== name.toLowerCase()) ||
name.toLowerCase() === "node_modules" ||
name.toLowerCase() === "favicon.ico") {
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 d368d4af5..751d234db 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.3.0",
+ "version": "0.4.2",
"author": {
"name": "Meryn Stol",
"email": "merynstol@gmail.com"
@@ -17,7 +17,7 @@
"dependencies": {
"github-url-from-git": "~1.1.1",
"github-url-from-username-repo": "^0.2.0",
- "semver": "2"
+ "semver": "2 || 3"
},
"devDependencies": {
"tap": "~0.2.5",
@@ -38,15 +38,15 @@
"email": "rok@kowalski.gd"
}
],
- "gitHead": "f4d4268894a23d6f37a335d4ae28bd90b14e4ef9",
+ "gitHead": "09ff709e33e611bb4e6ad5aa2b33e52e77b3fa36",
"bugs": {
"url": "https://github.com/meryn/normalize-package-data/issues"
},
"homepage": "https://github.com/meryn/normalize-package-data",
- "_id": "normalize-package-data@0.3.0",
- "_shasum": "70ea9e5b6caf69faa9d83e42f71489642372d815",
- "_from": "normalize-package-data@^0.3.0",
- "_npmVersion": "1.4.14",
+ "_id": "normalize-package-data@0.4.2",
+ "_shasum": "166dc052a74e2f5ac1d3d23903ab3f2e2b7dd8e6",
+ "_from": "normalize-package-data@0.4",
+ "_npmVersion": "2.0.0-alpha-5",
"_npmUser": {
"name": "isaacs",
"email": "i@izs.me"
@@ -59,12 +59,16 @@
{
"name": "isaacs",
"email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
}
],
"dist": {
- "shasum": "70ea9e5b6caf69faa9d83e42f71489642372d815",
- "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.3.0.tgz"
+ "shasum": "166dc052a74e2f5ac1d3d23903ab3f2e2b7dd8e6",
+ "tarball": "http://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.4.2.tgz"
},
"directories": {},
- "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.3.0.tgz"
+ "_resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-0.4.2.tgz"
}
diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/github-urls.js b/node_modules/read-package-json/node_modules/normalize-package-data/test/github-urls.js
index fd68d76e2..da78160a0 100644
--- a/node_modules/read-package-json/node_modules/normalize-package-data/test/github-urls.js
+++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/github-urls.js
@@ -1,25 +1,23 @@
var tap = require("tap")
var normalize = require("../lib/normalize")
-var path = require("path")
var fs = require("fs")
-var _ = require("underscore")
var async = require("async")
-var data, clonedData
+var data
var warn
tap.test("consistent normalization", function(t) {
- entries = [
+ var entries = [
'read-package-json.json',
'http-server.json',
"movefile.json",
"node-module_exist.json"
]
- verifyConsistency = function(entryName, next) {
- warn = function(msg) {
+ var verifyConsistency = function(entryName, next) {
+ warn = function(msg) {
// t.equal("",msg) // uncomment to have some kind of logging of warnings
}
- filename = __dirname + "/fixtures/" + entryName
+ var filename = __dirname + "/fixtures/" + entryName
fs.readFile(filename, function(err, contents) {
if (err) return next(err)
data = JSON.parse(contents.toString())
@@ -43,4 +41,4 @@ tap.test("consistent normalization", function(t) {
if (err) throw err
t.end()
})
-}) // tap.test \ No newline at end of file
+}) // tap.test
diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json
index 5d64ff0e3..f3c844b64 100644
--- a/node_modules/read-package-json/package.json
+++ b/node_modules/read-package-json/package.json
@@ -1,6 +1,6 @@
{
"name": "read-package-json",
- "version": "1.2.2",
+ "version": "1.2.4",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -18,7 +18,7 @@
"dependencies": {
"glob": "^4.0.2",
"lru-cache": "2",
- "normalize-package-data": "^0.3.0",
+ "normalize-package-data": "0.4",
"graceful-fs": "2 || 3"
},
"devDependencies": {
@@ -28,14 +28,33 @@
"graceful-fs": "2 || 3"
},
"license": "ISC",
- "readme": "# read-package-json\n\nThis is the thing that npm uses to read package.json files. It\nvalidates some stuff, and loads some default things.\n\nIt keeps a cache of the files you've read, so that you don't end\nup reading the same package.json file multiple times.\n\nNote that if you just want to see what's literally in the package.json\nfile, you can usually do `var data = require('some-module/package.json')`.\n\nThis module is basically only needed by npm, but it's handy to see what\nnpm will see when it looks at your package.\n\n## Usage\n\n```javascript\nvar readJson = require('read-package-json')\n\n// readJson(filename, [logFunction=noop], [strict=false], cb)\nreadJson('/path/to/package.json', console.error, false, function (er, data) {\n if (er) {\n console.error(\"There was an error reading the file\")\n return\n }\n\n console.error('the package data is', data)\n});\n```\n\n## readJson(file, [logFn = noop], [strict = false], cb)\n\n* `file` {String} The path to the package.json file\n* `logFn` {Function} Function to handle logging. Defaults to a noop.\n* `strict` {Boolean} True to enforce SemVer 2.0 version strings, and\n other strict requirements.\n* `cb` {Function} Gets called with `(er, data)`, as is The Node Way.\n\nReads the JSON file and does the things.\n\n## `package.json` Fields\n\nSee `man 5 package.json` or `npm help json`.\n\n## readJson.log\n\nBy default this is a reference to the `npmlog` module. But if that\nmodule can't be found, then it'll be set to just a dummy thing that does\nnothing.\n\nReplace with your own `{log,warn,error}` object for fun loggy time.\n\n## readJson.extras(file, data, cb)\n\nRun all the extra stuff relative to the file, with the parsed data.\n\nModifies the data as it does stuff. Calls the cb when it's done.\n\n## readJson.extraSet = [fn, fn, ...]\n\nArray of functions that are called by `extras`. Each one receives the\narguments `fn(file, data, cb)` and is expected to call `cb(er, data)`\nwhen done or when an error occurs.\n\nOrder is indeterminate, so each function should be completely\nindependent.\n\nMix and match!\n\n## readJson.cache\n\nThe `lru-cache` object that readJson uses to not read the same file over\nand over again. See\n[lru-cache](https://github.com/isaacs/node-lru-cache) for details.\n\n## Other Relevant Files Besides `package.json`\n\nSome other files have an effect on the resulting data object, in the\nfollowing ways:\n\n### `README?(.*)`\n\nIf there is a `README` or `README.*` file present, then npm will attach\na `readme` field to the data with the contents of this file.\n\nOwing to the fact that roughly 100% of existing node modules have\nMarkdown README files, it will generally be assumed to be Markdown,\nregardless of the extension. Please plan accordingly.\n\n### `server.js`\n\nIf there is a `server.js` file, and there is not already a\n`scripts.start` field, then `scripts.start` will be set to `node\nserver.js`.\n\n### `AUTHORS`\n\nIf there is not already a `contributors` field, then the `contributors`\nfield will be set to the contents of the `AUTHORS` file, split by lines,\nand parsed.\n\n### `bindings.gyp`\n\nIf a bindings.gyp file exists, and there is not already a\n`scripts.install` field, then the `scripts.install` field will be set to\n`node-gyp rebuild`.\n\n### `wscript`\n\nIf a wscript file exists, and there is not already a `scripts.install`\nfield, then the `scripts.install` field will be set to `node-waf clean ;\nnode-waf configure build`.\n\nNote that the `bindings.gyp` file supercedes this, since node-waf has\nbeen deprecated in favor of node-gyp.\n\n### `index.js`\n\nIf the json file does not exist, but there is a `index.js` file\npresent instead, and that file has a package comment, then it will try\nto parse the package comment, and use that as the data instead.\n\nA package comment looks like this:\n\n```javascript\n/**package\n * { \"name\": \"my-bare-module\"\n * , \"version\": \"1.2.3\"\n * , \"description\": \"etc....\" }\n **/\n\n// or...\n\n/**package\n{ \"name\": \"my-bare-module\"\n, \"version\": \"1.2.3\"\n, \"description\": \"etc....\" }\n**/\n```\n\nThe important thing is that it starts with `/**package`, and ends with\n`**/`. If the package.json file exists, then the index.js is not\nparsed.\n\n### `{directories.man}/*.[0-9]`\n\nIf there is not already a `man` field defined as an array of files or a\nsingle file, and\nthere is a `directories.man` field defined, then that directory will\nbe searched for manpages.\n\nAny valid manpages found in that directory will be assigned to the `man`\narray, and installed in the appropriate man directory at package install\ntime, when installed globally on a Unix system.\n\n### `{directories.bin}/*`\n\nIf there is not already a `bin` field defined as a string filename or a\nhash of `<name> : <filename>` pairs, then the `directories.bin`\ndirectory will be searched and all the files within it will be linked as\nexecutables at install time.\n\nWhen installing locally, npm links bins into `node_modules/.bin`, which\nis in the `PATH` environ when npm runs scripts. When\ninstalling globally, they are linked into `{prefix}/bin`, which is\npresumably in the `PATH` environment variable.\n",
- "readmeFilename": "README.md",
- "gitHead": "ed8df916a4432b3317e4d3c7154aac2a790844cb",
+ "gitHead": "7127ed4d9fe93bb0c2b2809b3c10a4f23f0c8236",
"bugs": {
"url": "https://github.com/isaacs/read-package-json/issues"
},
"homepage": "https://github.com/isaacs/read-package-json",
- "_id": "read-package-json@1.2.2",
- "_shasum": "545fc9044d135bf5fe0a67c6eab368c3186cbafe",
- "_from": "read-package-json@latest"
+ "_id": "read-package-json@1.2.4",
+ "_shasum": "7482e541baa70f2dc21cd1a51a68be82b904aa97",
+ "_from": "read-package-json@latest",
+ "_npmVersion": "2.0.0-alpha-5",
+ "_npmUser": {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ "maintainers": [
+ {
+ "name": "isaacs",
+ "email": "i@izs.me"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ }
+ ],
+ "dist": {
+ "shasum": "7482e541baa70f2dc21cd1a51a68be82b904aa97",
+ "tarball": "http://registry.npmjs.org/read-package-json/-/read-package-json-1.2.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-1.2.4.tgz"
}
diff --git a/package.json b/package.json
index 980775b34..eac6893cf 100644
--- a/package.json
+++ b/package.json
@@ -71,7 +71,7 @@
"path-is-inside": "~1.0.0",
"read": "~1.0.4",
"read-installed": "~2.0.5",
- "read-package-json": "~1.2.2",
+ "read-package-json": "~1.2.4",
"request": "~2.30.0",
"retry": "~0.6.0",
"rimraf": "~2.2.8",