From 8dd11d13479b9ebfa90252b4dcb0e7e544d27a32 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 31 Jul 2014 15:42:26 -0700 Subject: [PATCH] update several dependencies The quest to avoid SemVer '0.x' magic continues. --- node_modules/fstream-npm/LICENCE | 25 -- node_modules/fstream-npm/LICENSE | 15 + .../node_modules/fstream-ignore/LICENSE | 36 +- .../node_modules/fstream-ignore/ignore.js | 8 +- .../node_modules/fstream-ignore/package.json | 36 +- .../fstream-ignore/test/read-file-order.js | 81 +++++ node_modules/fstream-npm/package.json | 12 +- node_modules/fstream/package.json | 33 +- node_modules/github-url-from-git/LICENSE | 22 ++ node_modules/github-url-from-git/Readme.md | 15 + node_modules/github-url-from-git/index.js | 2 +- node_modules/github-url-from-git/package.json | 19 +- node_modules/github-url-from-git/test.js | 15 + node_modules/minimatch/.travis.yml | 4 + node_modules/minimatch/minimatch.js | 14 +- .../node_modules/sigmund/package.json | 6 +- node_modules/minimatch/package.json | 16 +- node_modules/minimatch/test/brace-expand.js | 7 + node_modules/mkdirp/.travis.yml | 2 +- node_modules/mkdirp/README.markdown | 49 ++- node_modules/mkdirp/bin/cmd.js | 33 ++ node_modules/mkdirp/bin/usage.txt | 12 + node_modules/mkdirp/index.js | 47 ++- .../mkdirp/node_modules/minimist/.travis.yml | 4 + .../mkdirp/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../mkdirp/node_modules/minimist/index.js | 187 ++++++++++ .../mkdirp/node_modules/minimist/package.json | 67 ++++ .../node_modules/minimist/readme.markdown | 73 ++++ .../mkdirp/node_modules/minimist/test/dash.js | 24 ++ .../minimist/test/default_bool.js | 20 ++ .../node_modules/minimist/test/dotted.js | 16 + .../mkdirp/node_modules/minimist/test/long.js | 31 ++ .../node_modules/minimist/test/parse.js | 318 ++++++++++++++++++ .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 ++++ .../node_modules/minimist/test/whitespace.js | 8 + node_modules/mkdirp/package.json | 39 ++- node_modules/mkdirp/test/mkdirp.js | 20 +- node_modules/mkdirp/test/opts_fs.js | 27 ++ node_modules/mkdirp/test/opts_fs_sync.js | 25 ++ node_modules/mkdirp/test/perm.js | 20 +- node_modules/mkdirp/test/perm_sync.js | 35 +- node_modules/mkdirp/test/race.js | 23 +- node_modules/mkdirp/test/rel.js | 22 +- node_modules/mkdirp/test/sync.js | 18 +- node_modules/mkdirp/test/umask.js | 22 +- node_modules/mkdirp/test/umask_sync.js | 18 +- node_modules/node-gyp/README.md | 3 +- node_modules/node-gyp/lib/install.js | 44 +-- node_modules/node-gyp/package.json | 46 +-- node_modules/npm-registry-client/LICENSE | 36 +- node_modules/npm-registry-client/package.json | 37 +- node_modules/npmconf/LICENSE | 36 +- node_modules/npmconf/package.json | 36 +- .../normalize-package-data/package.json | 39 +-- .../normalize-package-data/test/scoped.js | 51 +++ node_modules/read-package-json/package.json | 36 +- node_modules/tar/package.json | 12 +- package.json | 18 +- 60 files changed, 1568 insertions(+), 448 deletions(-) delete mode 100644 node_modules/fstream-npm/LICENCE create mode 100644 node_modules/fstream-npm/LICENSE create mode 100644 node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js create mode 100644 node_modules/github-url-from-git/LICENSE create mode 100644 node_modules/minimatch/.travis.yml create mode 100755 node_modules/mkdirp/bin/cmd.js create mode 100644 node_modules/mkdirp/bin/usage.txt create mode 100644 node_modules/mkdirp/node_modules/minimist/.travis.yml create mode 100644 node_modules/mkdirp/node_modules/minimist/LICENSE create mode 100644 node_modules/mkdirp/node_modules/minimist/example/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/index.js create mode 100644 node_modules/mkdirp/node_modules/minimist/package.json create mode 100644 node_modules/mkdirp/node_modules/minimist/readme.markdown create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dash.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/default_bool.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/dotted.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/long.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/parse_modified.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/short.js create mode 100644 node_modules/mkdirp/node_modules/minimist/test/whitespace.js create mode 100644 node_modules/mkdirp/test/opts_fs.js create mode 100644 node_modules/mkdirp/test/opts_fs_sync.js create mode 100644 node_modules/read-package-json/node_modules/normalize-package-data/test/scoped.js diff --git a/node_modules/fstream-npm/LICENCE b/node_modules/fstream-npm/LICENCE deleted file mode 100644 index 74489e2e265..00000000000 --- a/node_modules/fstream-npm/LICENCE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/fstream-npm/LICENSE b/node_modules/fstream-npm/LICENSE new file mode 100644 index 00000000000..19129e315fe --- /dev/null +++ b/node_modules/fstream-npm/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE b/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE index 0c44ae716db..19129e315fe 100644 --- a/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE +++ b/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js b/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js index 0728f7c8f14..212fc7bdea9 100644 --- a/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js +++ b/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js @@ -85,18 +85,18 @@ IgnoreReader.prototype.addIgnoreFiles = function () { this.pause() - var then = function then (er) { + var then = function (er) { if (errState) return if (er) return this.emit("error", errState = er) if (-- count === 0) { this.filterEntries() this.resume() + } else { + this.addIgnoreFile(newIg[newIg.length - count], then) } }.bind(this) - newIg.forEach(function (ig) { - this.addIgnoreFile(ig, then) - }, this) + this.addIgnoreFile(newIg[0], then) } diff --git a/node_modules/fstream-npm/node_modules/fstream-ignore/package.json b/node_modules/fstream-npm/node_modules/fstream-ignore/package.json index a4794004c3e..558d3dc9095 100644 --- a/node_modules/fstream-npm/node_modules/fstream-ignore/package.json +++ b/node_modules/fstream-npm/node_modules/fstream-ignore/package.json @@ -6,7 +6,7 @@ }, "name": "fstream-ignore", "description": "A thing for ignoring files based on globs", - "version": "0.0.8", + "version": "1.0.1", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream-ignore.git" @@ -16,40 +16,24 @@ "test": "tap test/*.js" }, "dependencies": { - "fstream": "~0.1.17", + "fstream": "^1.0.0", "inherits": "2", - "minimatch": "^0.3.0" + "minimatch": "^1.0.0" }, "devDependencies": { "tap": "", "rimraf": "", "mkdirp": "" }, - "license": "BSD", - "gitHead": "8dfc936e8b2d25c0d82042b73a22c659e6e69a1e", + "license": "ISC", + "readme": "# fstream-ignore\n\nA fstream DirReader that filters out files that match globs in `.ignore`\nfiles throughout the tree, like how git ignores files based on a\n`.gitignore` file.\n\nHere's an example:\n\n```javascript\nvar Ignore = require(\"fstream-ignore\")\nIgnore({ path: __dirname\n , ignoreFiles: [\".ignore\", \".gitignore\"]\n })\n .on(\"child\", function (c) {\n console.error(c.path.substr(c.root.path.length + 1))\n })\n .pipe(tar.Pack())\n .pipe(fs.createWriteStream(\"foo.tar\"))\n```\n\nThis will tar up the files in __dirname into `foo.tar`, ignoring\nanything matched by the globs in any .iginore or .gitignore file.\n", + "readmeFilename": "README.md", + "gitHead": "290f2b621fa4f8fe3eec97307d22527fa2065375", "bugs": { "url": "https://github.com/isaacs/fstream-ignore/issues" }, "homepage": "https://github.com/isaacs/fstream-ignore", - "_id": "fstream-ignore@0.0.8", - "_shasum": "cc4830fb9963178be5d9eb37569a4a0785cf9e53", - "_from": "fstream-ignore@~0.0", - "_npmVersion": "1.4.10", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "cc4830fb9963178be5d9eb37569a4a0785cf9e53", - "tarball": "http://registry.npmjs.org/fstream-ignore/-/fstream-ignore-0.0.8.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-0.0.8.tgz", - "readme": "ERROR: No README data found!" + "_id": "fstream-ignore@1.0.1", + "_shasum": "153df36c4fa2cb006fb915dc71ac9d75f6a17c82", + "_from": "fstream-ignore@^1.0.0" } diff --git a/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js b/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js new file mode 100644 index 00000000000..0d851164f2f --- /dev/null +++ b/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js @@ -0,0 +1,81 @@ +var IgnoreFile = require("../") +, fs = require('fs') + +// set the ignores just for this test +var c = require("./common.js") +c.ignores({ ".gitignore": ["a/b/c/abc"] }) +c.ignores({ ".ignore": ["*", "!a/b/c/abc"] }) + +// the only files we expect to see +var expected = + [ "/a" + , "/a/b" + , "/a/b/c" + , "/a/b/c/abc" ] + +var originalReadFile = fs.readFile +, parallelCount = 0 +, firstCall + +// Overwrite fs.readFile so that when .gitignore and .ignore are read in +// parallel, .ignore will always be read first. +fs.readFile = function (filename, options, callback) { + if (typeof options === 'function') { + callback = options + options = false + } + + parallelCount++ + + process.nextTick(function () { + if (parallelCount > 1) { + if (!firstCall) { + return firstCall = function (cb) { + originalReadFile(filename, options, function (err, data) { + callback(err, data) + if (cb) cb() + }) + } + } + + if (filename.indexOf('.gitignore') !== -1) { + firstCall(function () { + originalReadFile(filename, options, callback) + }) + } else { + originalReadFile(filename, options, function (err, data) { + callback(err, data) + firstCall() + }) + } + } else { + originalReadFile(filename, options, callback) + parallelCount = 0 + } + }) +} + +require("tap").test("read file order", function (t) { + t.pass("start") + + IgnoreFile({ path: __dirname + "/fixtures" + , ignoreFiles: [".gitignore", ".ignore"] }) + .on("ignoreFile", function (e) { + console.error("ignore file!", e) + }) + .on("child", function (e) { + var p = e.path.substr(e.root.path.length) + var i = expected.indexOf(p) + if (i === -1) { + t.fail("unexpected file found", {f: p}) + } else { + t.pass(p) + expected.splice(i, 1) + } + }) + .on("close", function () { + fs.readFile = originalReadFile + t.notOk(expected.length, "all expected files should be seen") + t.end() + }) +}) diff --git a/node_modules/fstream-npm/package.json b/node_modules/fstream-npm/package.json index 299148af50e..31a5af5d364 100644 --- a/node_modules/fstream-npm/package.json +++ b/node_modules/fstream-npm/package.json @@ -6,26 +6,26 @@ }, "name": "fstream-npm", "description": "fstream class for creating npm packages", - "version": "0.1.7", + "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream-npm.git" }, "main": "./fstream-npm.js", "dependencies": { - "fstream-ignore": "~0.0", + "fstream-ignore": "^1.0.0", "inherits": "2" }, - "license": "BSD", + "license": "ISC", "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n", "readmeFilename": "README.md", - "gitHead": "13839c9be784f2addc9352d525b35835fba01151", + "gitHead": "807e0a8653ab793dc2e1b3b798e6256d09f972e7", "bugs": { "url": "https://github.com/isaacs/fstream-npm/issues" }, "homepage": "https://github.com/isaacs/fstream-npm", - "_id": "fstream-npm@0.1.7", + "_id": "fstream-npm@1.0.0", "scripts": {}, - "_shasum": "423dc5d1d1fcb7d878501f43c7e11a33292bd55f", + "_shasum": "0262c95c771d393e7cf59fcfeabce621703f3d27", "_from": "fstream-npm@latest" } diff --git a/node_modules/fstream/package.json b/node_modules/fstream/package.json index f526d4d6e06..59de9ebe58b 100644 --- a/node_modules/fstream/package.json +++ b/node_modules/fstream/package.json @@ -6,7 +6,7 @@ }, "name": "fstream", "description": "Advanced file system stream things", - "version": "0.1.29", + "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/isaacs/fstream.git" @@ -16,9 +16,9 @@ "node": ">=0.6" }, "dependencies": { - "graceful-fs": "~3.0.2", + "graceful-fs": "^3.0.2", "inherits": "~2.0.0", - "mkdirp": "0.3", + "mkdirp": "^0.5.0", "rimraf": "2" }, "devDependencies": { @@ -28,29 +28,14 @@ "test": "tap examples/*.js" }, "license": "BSD", - "gitHead": "aa6679f6fadc46ca83a97f562acde755266bf1bb", + "readme": "Like FS streams, but with stat on them, and supporting directories and\nsymbolic links, as well as normal files. Also, you can use this to set\nthe stats on a file, even if you don't change its contents, or to create\na symlink, etc.\n\nSo, for example, you can \"write\" a directory, and it'll call `mkdir`. You\ncan specify a uid and gid, and it'll call `chown`. You can specify a\n`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink\nand provide a `linkpath` and it'll call `symlink`.\n\nNote that it won't automatically resolve symbolic links. So, if you\ncall `fstream.Reader('/some/symlink')` then you'll get an object\nthat stats and then ends immediately (since it has no data). To follow\nsymbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:\ntrue })`.\n\nThere are various checks to make sure that the bytes emitted are the\nsame as the intended size, if the size is set.\n\n## Examples\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n })\n .write(\"hello\\n\")\n .end()\n```\n\nThis will create the directories if they're missing, and then write\n`hello\\n` into the file, chmod it to 0755, and assert that 6 bytes have\nbeen written when it's done.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/file\"\n , mode: 0755\n , size: 6\n , flags: \"a\"\n })\n .write(\"hello\\n\")\n .end()\n```\n\nYou can pass flags in, if you want to append to a file.\n\n```javascript\nfstream\n .Writer({ path: \"path/to/symlink\"\n , linkpath: \"./file\"\n , SymbolicLink: true\n , mode: \"0755\" // octal strings supported\n })\n .end()\n```\n\nIf isSymbolicLink is a function, it'll be called, and if it returns\ntrue, then it'll treat it as a symlink. If it's not a function, then\nany truish value will make a symlink, or you can set `type:\n'SymbolicLink'`, which does the same thing.\n\nNote that the linkpath is relative to the symbolic link location, not\nthe parent dir or cwd.\n\n```javascript\nfstream\n .Reader(\"path/to/dir\")\n .pipe(fstream.Writer(\"path/to/other/dir\"))\n```\n\nThis will do like `cp -Rp path/to/dir path/to/other/dir`. If the other\ndir exists and isn't a directory, then it'll emit an error. It'll also\nset the uid, gid, mode, etc. to be identical. In this way, it's more\nlike `rsync -a` than simply a copy.\n", + "readmeFilename": "README.md", + "gitHead": "1468b5b583646cd4f5c535e6b53c8896a4fed40f", "bugs": { "url": "https://github.com/isaacs/fstream/issues" }, "homepage": "https://github.com/isaacs/fstream", - "_id": "fstream@0.1.29", - "_shasum": "34d04023ebc91a9df47bd31ab97e4704b4db413f", - "_from": "fstream@latest", - "_npmVersion": "1.5.0-alpha-4", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" - }, - "maintainers": [ - { - "name": "isaacs", - "email": "i@izs.me" - } - ], - "dist": { - "shasum": "34d04023ebc91a9df47bd31ab97e4704b4db413f", - "tarball": "http://registry.npmjs.org/fstream/-/fstream-0.1.29.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/fstream/-/fstream-0.1.29.tgz" + "_id": "fstream@1.0.0", + "_shasum": "7feb8b42ebc588485bf3676a00bd048d4a2e1c28", + "_from": "fstream@latest" } diff --git a/node_modules/github-url-from-git/LICENSE b/node_modules/github-url-from-git/LICENSE new file mode 100644 index 00000000000..b7409302c44 --- /dev/null +++ b/node_modules/github-url-from-git/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/github-url-from-git/Readme.md b/node_modules/github-url-from-git/Readme.md index 27e7f7d74af..0525e44ec45 100644 --- a/node_modules/github-url-from-git/Readme.md +++ b/node_modules/github-url-from-git/Readme.md @@ -28,6 +28,21 @@ describe('parse(url)', function(){ assert(null == parse(url)); }) + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + // gist urls. it('should parse git@gist urls', function() { diff --git a/node_modules/github-url-from-git/index.js b/node_modules/github-url-from-git/index.js index 45cee530d7a..f1ec85ed30a 100644 --- a/node_modules/github-url-from-git/index.js +++ b/node_modules/github-url-from-git/index.js @@ -3,7 +3,7 @@ // https://github.com/bcoe/foo. function githubUrlFromGit(url, opts){ try { - var m = re(opts).exec(url.replace(/\.git$/, '')); + var m = re(opts).exec(url.replace(/\.git(#.*)?$/, '')); var host = m[1]; var path = m[2]; return 'https://' + host + '/' + path; diff --git a/node_modules/github-url-from-git/package.json b/node_modules/github-url-from-git/package.json index 77be85b9bbb..fb396bf95eb 100644 --- a/node_modules/github-url-from-git/package.json +++ b/node_modules/github-url-from-git/package.json @@ -1,6 +1,6 @@ { "name": "github-url-from-git", - "version": "1.2.0", + "version": "1.3.0", "description": "Parse a github git url and return the github repo url", "main": "index.js", "scripts": { @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "http://github.com/visionmedia/node-github-url-from-git" + "url": "https://github.com/visionmedia/node-github-url-from-git.git" }, "keywords": [ "github", @@ -25,15 +25,15 @@ "mocha": "~1.9.0", "should": "~1.2.2" }, - "gitHead": "9df854a2060868c374c32a6be4c10e12e5b41152", + "gitHead": "d92a033d7e769264f17ae8ef4409e6a31e0cd016", "bugs": { "url": "https://github.com/visionmedia/node-github-url-from-git/issues" }, "homepage": "https://github.com/visionmedia/node-github-url-from-git", - "_id": "github-url-from-git@1.2.0", - "_shasum": "7ace1fc6920f790d2967faed61688902320c37d2", + "_id": "github-url-from-git@1.3.0", + "_shasum": "6e79d9779632ca78aa645c67bb419f70e51d69f7", "_from": "github-url-from-git@latest", - "_npmVersion": "1.5.0-alpha-1", + "_npmVersion": "1.5.0-alpha-4", "_npmUser": { "name": "bcoe", "email": "bencoe@gmail.com" @@ -49,9 +49,10 @@ } ], "dist": { - "shasum": "7ace1fc6920f790d2967faed61688902320c37d2", - "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.2.0.tgz" + "shasum": "6e79d9779632ca78aa645c67bb419f70e51d69f7", + "tarball": "http://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.3.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.2.0.tgz" + "_resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.3.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/github-url-from-git/test.js b/node_modules/github-url-from-git/test.js index 79c911ba114..f0675283f53 100644 --- a/node_modules/github-url-from-git/test.js +++ b/node_modules/github-url-from-git/test.js @@ -27,6 +27,21 @@ describe('parse(url)', function(){ assert(null == parse(url)); }) + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + // gist urls. it('should parse git@gist urls', function() { diff --git a/node_modules/minimatch/.travis.yml b/node_modules/minimatch/.travis.yml new file mode 100644 index 00000000000..fca8ef01940 --- /dev/null +++ b/node_modules/minimatch/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.10 + - 0.11 diff --git a/node_modules/minimatch/minimatch.js b/node_modules/minimatch/minimatch.js index 4539678949e..47617868b99 100644 --- a/node_modules/minimatch/minimatch.js +++ b/node_modules/minimatch/minimatch.js @@ -260,6 +260,13 @@ minimatch.braceExpand = function (pattern, options) { } Minimatch.prototype.braceExpand = braceExpand + +function pad(n, width, z) { + z = z || '0'; + n = n + ''; + return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n; +} + function braceExpand (pattern, options) { options = options || this.options pattern = typeof pattern === "undefined" @@ -332,13 +339,18 @@ function braceExpand (pattern, options) { this.debug("numset", numset[1], numset[2]) var suf = braceExpand.call(this, pattern.substr(numset[0].length), options) , start = +numset[1] + , needPadding = numset[1][0] === '0' + , startWidth = numset[1].length + , padded , end = +numset[2] , inc = start > end ? -1 : 1 , set = [] + for (var i = start; i != (end + inc); i += inc) { + padded = needPadding ? pad(i, startWidth) : i + '' // append all the suffixes for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) + set.push(padded + suf[ii]) } } return set diff --git a/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/minimatch/node_modules/sigmund/package.json index 6d0305d0d3e..a1f755a7c75 100644 --- a/node_modules/minimatch/node_modules/sigmund/package.json +++ b/node_modules/minimatch/node_modules/sigmund/package.json @@ -50,5 +50,9 @@ ], "_shasum": "66a2b3a749ae8b5fb89efd4fcc01dc94fbe02296", "_from": "sigmund@~1.0.0", - "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz" + "_resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz", + "bugs": { + "url": "https://github.com/isaacs/sigmund/issues" + }, + "homepage": "https://github.com/isaacs/sigmund" } diff --git a/node_modules/minimatch/package.json b/node_modules/minimatch/package.json index 36d7df35d4d..d96e1d36fc7 100644 --- a/node_modules/minimatch/package.json +++ b/node_modules/minimatch/package.json @@ -6,7 +6,7 @@ }, "name": "minimatch", "description": "a glob matcher in javascript", - "version": "0.3.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" @@ -29,14 +29,15 @@ "type": "MIT", "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" }, + "gitHead": "b374a643976eb55cdc19c60b6dd51ebe9bcc607a", "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.3.0", - "_shasum": "275d8edaac4f1bb3326472089e7949c8394699dd", + "_id": "minimatch@1.0.0", + "_shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", "_from": "minimatch@latest", - "_npmVersion": "1.4.10", + "_npmVersion": "1.4.21", "_npmUser": { "name": "isaacs", "email": "i@izs.me" @@ -48,9 +49,10 @@ } ], "dist": { - "shasum": "275d8edaac4f1bb3326472089e7949c8394699dd", - "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz" + "shasum": "e0dd2120b49e1b724ce8d714c520822a9438576d", + "tarball": "http://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz" }, "directories": {}, - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz" + "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-1.0.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/minimatch/test/brace-expand.js b/node_modules/minimatch/test/brace-expand.js index 7ee278a274d..e63d3f60c80 100644 --- a/node_modules/minimatch/test/brace-expand.js +++ b/node_modules/minimatch/test/brace-expand.js @@ -21,6 +21,13 @@ tap.test("brace expansion", function (t) { , "a4b" , "a5b" ] ] , [ "a{b}c", ["a{b}c"] ] + , [ "a{00..05}b" + , ["a00b" + ,"a01b" + ,"a02b" + ,"a03b" + ,"a04b" + ,"a05b" ] ] ].forEach(function (tc) { var p = tc[0] , expect = tc[1] diff --git a/node_modules/mkdirp/.travis.yml b/node_modules/mkdirp/.travis.yml index 84fd7ca248a..c693a939df9 100644 --- a/node_modules/mkdirp/.travis.yml +++ b/node_modules/mkdirp/.travis.yml @@ -2,4 +2,4 @@ language: node_js node_js: - 0.6 - 0.8 - - 0.9 + - "0.10" diff --git a/node_modules/mkdirp/README.markdown b/node_modules/mkdirp/README.markdown index 83b0216ab59..3cc13153851 100644 --- a/node_modules/mkdirp/README.markdown +++ b/node_modules/mkdirp/README.markdown @@ -31,25 +31,54 @@ And now /tmp/foo/bar/baz exists, huzzah! var mkdirp = require('mkdirp'); ``` -## mkdirp(dir, mode, cb) +## mkdirp(dir, opts, cb) Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. +permission string `opts.mode`. If `opts` is a non-object, it will be treated as +the `opts.mode`. -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. `cb(err, made)` fires with the error or the first directory `made` that had to be created, if any. -## mkdirp.sync(dir, mode) +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdir(path, mode, cb)` and +`opts.fs.stat(path, cb)`. + +## mkdirp.sync(dir, opts) Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. +with octal permission string `opts.mode`. If `opts` is a non-object, it will be +treated as the `opts.mode`. -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. +If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`. Returns the first directory that had to be created, if any. +You can optionally pass in an alternate `fs` implementation by passing in +`opts.fs`. Your implementation should have `opts.fs.mkdirSync(path, mode)` and +`opts.fs.statSync(path)`. + +# usage + +This package also ships with a `mkdirp` command. + +``` +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + +``` + # install With [npm](http://npmjs.org) do: @@ -58,6 +87,14 @@ With [npm](http://npmjs.org) do: npm install mkdirp ``` +to get the library, or + +``` +npm install -g mkdirp +``` + +to get the command. + # license MIT diff --git a/node_modules/mkdirp/bin/cmd.js b/node_modules/mkdirp/bin/cmd.js new file mode 100755 index 00000000000..d95de15ae97 --- /dev/null +++ b/node_modules/mkdirp/bin/cmd.js @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/node_modules/mkdirp/bin/usage.txt b/node_modules/mkdirp/bin/usage.txt new file mode 100644 index 00000000000..f952aa2c7a9 --- /dev/null +++ b/node_modules/mkdirp/bin/usage.txt @@ -0,0 +1,12 @@ +usage: mkdirp [DIR1,DIR2..] {OPTIONS} + + Create each supplied directory including any necessary parent directories that + don't yet exist. + + If the directory already exists, do nothing. + +OPTIONS are: + + -m, --mode If a directory needs to be created, set the mode as an octal + permission string. + diff --git a/node_modules/mkdirp/index.js b/node_modules/mkdirp/index.js index fda6de8a2c2..a1742b20694 100644 --- a/node_modules/mkdirp/index.js +++ b/node_modules/mkdirp/index.js @@ -3,27 +3,36 @@ var fs = require('fs'); module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; +function mkdirP (p, opts, f, made) { + if (typeof opts === 'function') { + f = opts; + opts = {}; + } + else if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + + if (mode === undefined) { mode = 0777 & (~process.umask()); } if (!made) made = null; - + var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { + + xfs.mkdir(p, mode, function (er) { if (!er) { made = made || p; return cb(null, made); } switch (er.code) { case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { + mkdirP(path.dirname(p), opts, function (er, made) { if (er) cb(er, made); - else mkdirP(p, mode, cb, made); + else mkdirP(p, opts, cb, made); }); break; @@ -31,7 +40,7 @@ function mkdirP (p, mode, f, made) { // there already. If so, then hooray! If not, then something // is borked. default: - fs.stat(p, function (er2, stat) { + xfs.stat(p, function (er2, stat) { // if the stat fails, then that's super weird. // let the original error be the failure reason. if (er2 || !stat.isDirectory()) cb(er, made) @@ -42,24 +51,30 @@ function mkdirP (p, mode, f, made) { }); } -mkdirP.sync = function sync (p, mode, made) { +mkdirP.sync = function sync (p, opts, made) { + if (!opts || typeof opts !== 'object') { + opts = { mode: opts }; + } + + var mode = opts.mode; + var xfs = opts.fs || fs; + if (mode === undefined) { mode = 0777 & (~process.umask()); } if (!made) made = null; - if (typeof mode === 'string') mode = parseInt(mode, 8); p = path.resolve(p); try { - fs.mkdirSync(p, mode); + xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); + made = sync(path.dirname(p), opts, made); + sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -68,7 +83,7 @@ mkdirP.sync = function sync (p, mode, made) { default: var stat; try { - stat = fs.statSync(p); + stat = xfs.statSync(p); } catch (err1) { throw err0; diff --git a/node_modules/mkdirp/node_modules/minimist/.travis.yml b/node_modules/mkdirp/node_modules/minimist/.travis.yml new file mode 100644 index 00000000000..cc4dba29d95 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/node_modules/mkdirp/node_modules/minimist/LICENSE b/node_modules/mkdirp/node_modules/minimist/LICENSE new file mode 100644 index 00000000000..ee27ba4b441 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mkdirp/node_modules/minimist/example/parse.js b/node_modules/mkdirp/node_modules/minimist/example/parse.js new file mode 100644 index 00000000000..abff3e8ee8f --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/node_modules/mkdirp/node_modules/minimist/index.js b/node_modules/mkdirp/node_modules/minimist/index.js new file mode 100644 index 00000000000..584f551a6da --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/index.js @@ -0,0 +1,187 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + notFlags.forEach(function(key) { + argv._.push(key); + }); + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/node_modules/mkdirp/node_modules/minimist/package.json b/node_modules/mkdirp/node_modules/minimist/package.json new file mode 100644 index 00000000000..09e9ec44107 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/package.json @@ -0,0 +1,67 @@ +{ + "name": "minimist", + "version": "0.0.8", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "tape": "~1.0.4", + "tap": "~0.4.0" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "_id": "minimist@0.0.8", + "dist": { + "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "tarball": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "_from": "minimist@0.0.8", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d", + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "readme": "ERROR: No README data found!" +} diff --git a/node_modules/mkdirp/node_modules/minimist/readme.markdown b/node_modules/mkdirp/node_modules/minimist/readme.markdown new file mode 100644 index 00000000000..c25635323e1 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/readme.markdown @@ -0,0 +1,73 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/node_modules/mkdirp/node_modules/minimist/test/dash.js b/node_modules/mkdirp/node_modules/minimist/test/dash.js new file mode 100644 index 00000000000..8b034b99a9e --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/dash.js @@ -0,0 +1,24 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/default_bool.js b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js new file mode 100644 index 00000000000..f0041ee40cd --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/default_bool.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/dotted.js b/node_modules/mkdirp/node_modules/minimist/test/dotted.js new file mode 100644 index 00000000000..ef0ae349bf3 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/dotted.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/long.js b/node_modules/mkdirp/node_modules/minimist/test/long.js new file mode 100644 index 00000000000..5d3a1e09d3b --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/parse.js b/node_modules/mkdirp/node_modules/minimist/test/parse.js new file mode 100644 index 00000000000..8a906466966 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/parse.js @@ -0,0 +1,318 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); + + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); + + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); + + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); + + t.end(); +}); + + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js new file mode 100644 index 00000000000..21851b036ee --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: ['123'] }); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/short.js b/node_modules/mkdirp/node_modules/minimist/test/short.js new file mode 100644 index 00000000000..d513a1c2529 --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/short.js @@ -0,0 +1,67 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); diff --git a/node_modules/mkdirp/node_modules/minimist/test/whitespace.js b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js new file mode 100644 index 00000000000..8a52a58cecf --- /dev/null +++ b/node_modules/mkdirp/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/node_modules/mkdirp/package.json b/node_modules/mkdirp/package.json index aea8cb4971a..adb67f6a671 100644 --- a/node_modules/mkdirp/package.json +++ b/node_modules/mkdirp/package.json @@ -1,7 +1,7 @@ { "name": "mkdirp", "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", + "version": "0.5.0", "author": { "name": "James Halliday", "email": "mail@substack.net", @@ -14,20 +14,45 @@ ], "repository": { "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" + "url": "https://github.com/substack/node-mkdirp.git" }, "scripts": { "test": "tap test/*.js" }, + "dependencies": { + "minimist": "0.0.8" + }, "devDependencies": { - "tap": "~0.4.0" + "tap": "~0.4.0", + "mock-fs": "~2.2.0" + }, + "bin": { + "mkdirp": "bin/cmd.js" }, "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", "bugs": { "url": "https://github.com/substack/node-mkdirp/issues" }, - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@latest" + "homepage": "https://github.com/substack/node-mkdirp", + "_id": "mkdirp@0.5.0", + "dist": { + "shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", + "tarball": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz" + }, + "_from": "mkdirp@latest", + "_npmVersion": "1.4.3", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "directories": {}, + "_shasum": "1d73076a6df986cd9344e15e71fcc05a4c9abf12", + "_resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.0.tgz", + "readme": "ERROR: No README data found!" } diff --git a/node_modules/mkdirp/test/mkdirp.js b/node_modules/mkdirp/test/mkdirp.js index b07cd70c109..3b624ddbeb0 100644 --- a/node_modules/mkdirp/test/mkdirp.js +++ b/node_modules/mkdirp/test/mkdirp.js @@ -1,10 +1,11 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('woo', function (t) { - t.plan(2); + t.plan(5); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); @@ -12,16 +13,13 @@ test('woo', function (t) { var file = '/tmp/' + [x,y,z].join('/'); mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); }) }) }); diff --git a/node_modules/mkdirp/test/opts_fs.js b/node_modules/mkdirp/test/opts_fs.js new file mode 100644 index 00000000000..f1fbeca146d --- /dev/null +++ b/node_modules/mkdirp/test/opts_fs.js @@ -0,0 +1,27 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); + +test('opts.fs', function (t) { + t.plan(5); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp(file, { fs: xfs, mode: 0755 }, function (err) { + t.ifError(err); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); + }); +}); diff --git a/node_modules/mkdirp/test/opts_fs_sync.js b/node_modules/mkdirp/test/opts_fs_sync.js new file mode 100644 index 00000000000..224b50642fe --- /dev/null +++ b/node_modules/mkdirp/test/opts_fs_sync.js @@ -0,0 +1,25 @@ +var mkdirp = require('../'); +var path = require('path'); +var test = require('tap').test; +var mockfs = require('mock-fs'); + +test('opts.fs sync', function (t) { + t.plan(4); + + var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); + + var file = '/beep/boop/' + [x,y,z].join('/'); + var xfs = mockfs.fs(); + + mkdirp.sync(file, { fs: xfs, mode: 0755 }); + xfs.exists(file, function (ex) { + t.ok(ex, 'created file'); + xfs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); + }); +}); diff --git a/node_modules/mkdirp/test/perm.js b/node_modules/mkdirp/test/perm.js index 23a7abbd232..2c975905204 100644 --- a/node_modules/mkdirp/test/perm.js +++ b/node_modules/mkdirp/test/perm.js @@ -1,23 +1,21 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('async perm', function (t) { - t.plan(2); + t.plan(5); var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); }) }) }); diff --git a/node_modules/mkdirp/test/perm_sync.js b/node_modules/mkdirp/test/perm_sync.js index f685f609069..327e54b2e95 100644 --- a/node_modules/mkdirp/test/perm_sync.js +++ b/node_modules/mkdirp/test/perm_sync.js @@ -1,39 +1,34 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('sync perm', function (t) { - t.plan(2); + t.plan(4); var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); + }); }); }); test('sync root perm', function (t) { - t.plan(1); + t.plan(3); var file = '/tmp'; mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.ok(stat.isDirectory(), 'target not a directory'); }) }); }); diff --git a/node_modules/mkdirp/test/race.js b/node_modules/mkdirp/test/race.js index 96a04476365..7c295f410de 100644 --- a/node_modules/mkdirp/test/race.js +++ b/node_modules/mkdirp/test/race.js @@ -1,10 +1,11 @@ var mkdirp = require('../').mkdirp; var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('race', function (t) { - t.plan(4); + t.plan(6); var ps = [ '', 'tmp' ]; for (var i = 0; i < 25; i++) { @@ -24,17 +25,15 @@ test('race', function (t) { function mk (file, cb) { mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); + if (cb) cb(); + }); }) }); } diff --git a/node_modules/mkdirp/test/rel.js b/node_modules/mkdirp/test/rel.js index 79858243ab9..d1f175c2406 100644 --- a/node_modules/mkdirp/test/rel.js +++ b/node_modules/mkdirp/test/rel.js @@ -1,10 +1,11 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('rel', function (t) { - t.plan(2); + t.plan(5); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); @@ -15,17 +16,14 @@ test('rel', function (t) { var file = [x,y,z].join('/'); mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + process.chdir(cwd); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); }) }) }); diff --git a/node_modules/mkdirp/test/sync.js b/node_modules/mkdirp/test/sync.js index 7530cada84c..88fa4324ee1 100644 --- a/node_modules/mkdirp/test/sync.js +++ b/node_modules/mkdirp/test/sync.js @@ -1,10 +1,11 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('sync', function (t) { - t.plan(2); + t.plan(4); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); @@ -18,15 +19,12 @@ test('sync', function (t) { return t.end(); } - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0755); + t.ok(stat.isDirectory(), 'target not a directory'); }); }); }); diff --git a/node_modules/mkdirp/test/umask.js b/node_modules/mkdirp/test/umask.js index 64ccafe22bc..82c393a006a 100644 --- a/node_modules/mkdirp/test/umask.js +++ b/node_modules/mkdirp/test/umask.js @@ -1,10 +1,11 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('implicit mode from umask', function (t) { - t.plan(2); + t.plan(5); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); @@ -12,17 +13,14 @@ test('implicit mode from umask', function (t) { var file = '/tmp/' + [x,y,z].join('/'); mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) + t.ifError(err); + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, 0777 & (~process.umask())); + t.ok(stat.isDirectory(), 'target not a directory'); + }); }) }); }); diff --git a/node_modules/mkdirp/test/umask_sync.js b/node_modules/mkdirp/test/umask_sync.js index 35bd5cbbf41..e537fbe4bee 100644 --- a/node_modules/mkdirp/test/umask_sync.js +++ b/node_modules/mkdirp/test/umask_sync.js @@ -1,10 +1,11 @@ var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); +var exists = fs.exists || path.exists; var test = require('tap').test; test('umask sync modes', function (t) { - t.plan(2); + t.plan(4); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); @@ -18,15 +19,12 @@ test('umask sync modes', function (t) { return t.end(); } - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } + exists(file, function (ex) { + t.ok(ex, 'file created'); + fs.stat(file, function (err, stat) { + t.ifError(err); + t.equal(stat.mode & 0777, (0777 & (~process.umask()))); + t.ok(stat.isDirectory(), 'target not a directory'); }); }); }); diff --git a/node_modules/node-gyp/README.md b/node_modules/node-gyp/README.md index cba646e71d2..8d2d4951272 100644 --- a/node_modules/node-gyp/README.md +++ b/node_modules/node-gyp/README.md @@ -3,7 +3,8 @@ node-gyp ### Node.js native addon build tool `node-gyp` is a cross-platform command-line tool written in Node.js for compiling -native addon modules for Node.js, which takes away the pain of dealing with the +native addon modules for Node.js. It bundles the [gyp](https://code.google.com/p/gyp/) +project used by the Chromium team and takes away the pain of dealing with the various differences in build platforms. It is the replacement to the `node-waf` program which is removed for node `v0.8`. If you have a native addon for node that still has a `wscript` file, then you should definitely add a `binding.gyp` file diff --git a/node_modules/node-gyp/lib/install.js b/node_modules/node-gyp/lib/install.js index a9a18bcc7dd..6f72e6a93d6 100644 --- a/node_modules/node-gyp/lib/install.js +++ b/node_modules/node-gyp/lib/install.js @@ -72,6 +72,9 @@ function install (gyp, argv, callback) { version = version.version log.verbose('install', 'installing version: %s', version) + // distributions starting with 0.10.0 contain sha256 checksums + var checksumAlgo = semver.gte(version, '0.10.0') ? 'sha256' : 'sha1' + // the directory where the dev files will be installed var devDir = path.resolve(gyp.devDir, version) @@ -153,7 +156,7 @@ function install (gyp, argv, callback) { } function getContentSha(res, callback) { - var shasum = crypto.createHash('sha1') + var shasum = crypto.createHash(checksumAlgo) res.on('data', function (chunk) { shasum.update(chunk) }).on('end', function () { @@ -243,11 +246,11 @@ function install (gyp, argv, callback) { cb(new Error(res.statusCode + ' status code downloading tarball')) return } - // content sha1 - getContentSha(res, function (_, sha1) { + // content checksum + getContentSha(res, function (_, checksum) { var filename = path.basename(tarballUrl).trim() - contentShasums[filename] = sha1 - log.verbose('content sha1', filename, sha1) + contentShasums[filename] = checksum + log.verbose('content checksum', filename, checksum) }) // start unzipping and untaring @@ -288,12 +291,12 @@ function install (gyp, argv, callback) { async-- if (!async) { - log.verbose('download contents shasums', JSON.stringify(contentShasums)) + log.verbose('download contents checksum', JSON.stringify(contentShasums)) // check content shasums for (var k in contentShasums) { - log.verbose('validating download shasum for ' + k, '(%s == %s)', contentShasums[k], expectShasums[k]) + log.verbose('validating download checksum for ' + k, '(%s == %s)', contentShasums[k], expectShasums[k]) if (contentShasums[k] !== expectShasums[k]) { - cb(new Error(k + ' local sha1 ' + contentShasums[k] + ' not match remote ' + expectShasums[k])) + cb(new Error(k + ' local checksum ' + contentShasums[k] + ' not match remote ' + expectShasums[k])) return } } @@ -303,17 +306,18 @@ function install (gyp, argv, callback) { } function downloadShasums(done) { - log.verbose('check download content sha1, need to download `SHASUMS.txt`...') - var shasumsPath = path.resolve(devDir, 'SHASUMS.txt') - , shasumsUrl = distUrl + '/v' + version + '/SHASUMS.txt' + var shasumsFile = (checksumAlgo === 'sha256') ? 'SHASUMS256.txt' : 'SHASUMS.txt' + log.verbose('check download content checksum, need to download `' + shasumsFile + '`...') + var shasumsPath = path.resolve(devDir, shasumsFile) + , shasumsUrl = distUrl + '/v' + version + '/' + shasumsFile - log.verbose('`SHASUMS.txt` url', shasumsUrl) + log.verbose('checksum url', shasumsUrl) var req = download(shasumsUrl) if (!req) return req.on('error', done) req.on('response', function (res) { if (res.statusCode !== 200) { - done(new Error(res.statusCode + ' status code downloading SHASUMS.txt')) + done(new Error(res.statusCode + ' status code downloading checksum')) return } @@ -332,7 +336,7 @@ function install (gyp, argv, callback) { expectShasums[name] = items[0] }) - log.verbose('`SHASUMS.txt` data', JSON.stringify(expectShasums)) + log.verbose('checksum data', JSON.stringify(expectShasums)) done() }) }) @@ -366,9 +370,9 @@ function install (gyp, argv, callback) { return } - getContentSha(res, function (_, sha1) { - contentShasums['node.lib'] = sha1 - log.verbose('content sha1', 'node.lib', sha1) + getContentSha(res, function (_, checksum) { + contentShasums['node.lib'] = checksum + log.verbose('content checksum', 'node.lib', checksum) }) var ws = fs.createWriteStream(nodeLibPath32) @@ -392,9 +396,9 @@ function install (gyp, argv, callback) { return } - getContentSha(res, function (_, sha1) { - contentShasums['x64/node.lib'] = sha1 - log.verbose('content sha1', 'x64/node.lib', sha1) + getContentSha(res, function (_, checksum) { + contentShasums['x64/node.lib'] = checksum + log.verbose('content checksum', 'x64/node.lib', checksum) }) var ws = fs.createWriteStream(nodeLibPath64) diff --git a/node_modules/node-gyp/package.json b/node_modules/node-gyp/package.json index 88ba331fae6..8ee98695186 100644 --- a/node_modules/node-gyp/package.json +++ b/node_modules/node-gyp/package.json @@ -10,7 +10,7 @@ "bindings", "gyp" ], - "version": "0.13.1", + "version": "1.0.1", "installVersion": 9, "author": { "name": "Nathan Rajlich", @@ -27,50 +27,32 @@ }, "main": "./lib/node-gyp.js", "dependencies": { + "fstream": "^1.0.0", "glob": "3 || 4", - "graceful-fs": "2||3", - "fstream": "0", - "minimatch": "0", - "mkdirp": "0", + "graceful-fs": "3", + "minimatch": "1", + "mkdirp": "^0.5.0", "nopt": "2 || 3", "npmlog": "0", "osenv": "0", "request": "2", "rimraf": "2", - "semver": "2", - "tar": "0", + "semver": "2.x || 3.x", + "tar": "^1.0.0", "which": "1" }, "engines": { "node": ">= 0.8.0" }, + "readme": "node-gyp\n=========\n### Node.js native addon build tool\n\n`node-gyp` is a cross-platform command-line tool written in Node.js for compiling\nnative addon modules for Node.js. It bundles the [gyp](https://code.google.com/p/gyp/)\nproject used by the Chromium team and takes away the pain of dealing with the\nvarious differences in build platforms. It is the replacement to the `node-waf`\nprogram which is removed for node `v0.8`. If you have a native addon for node that\nstill has a `wscript` file, then you should definitely add a `binding.gyp` file\nto support the latest versions of node.\n\nMultiple target versions of node are supported (i.e. `0.8`, `0.9`, `0.10`, ..., `1.0`,\netc.), regardless of what version of node is actually installed on your system\n(`node-gyp` downloads the necessary development files for the target version).\n\n#### Features:\n\n * Easy to use, consistent interface\n * Same commands to build your module on every platform\n * Supports multiple target versions of Node\n\n\nInstallation\n------------\n\nYou can install with `npm`:\n\n``` bash\n$ npm install -g node-gyp\n```\n\nYou will also need to install:\n\n * On Unix:\n * `python` (`v2.7` recommended, `v3.x.x` is __*not*__ supported)\n * `make`\n * A proper C/C++ compiler toolchain, like GCC\n * On Windows:\n * [Python][windows-python] ([`v2.7.3`][windows-python-v2.7.3] recommended, `v3.x.x` is __*not*__ supported)\n * Windows XP/Vista/7:\n * Microsoft Visual Studio C++ 2010 ([Express][msvc2010] version works well)\n * For 64-bit builds of node and native modules you will _**also**_ need the [Windows 7 64-bit SDK][win7sdk]\n * If the install fails, try uninstalling any C++ 2010 x64&x86 Redistributable that you have installed first.\n * If you get errors that the 64-bit compilers are not installed you may also need the [compiler update for the Windows SDK 7.1]\n * Windows 7/8:\n * Microsoft Visual Studio C++ 2012 for Windows Desktop ([Express][msvc2012] version works well)\n\nIf you have multiple Python versions installed, you can identify which Python\nversion `node-gyp` uses by setting the '--python' variable:\n\n``` bash\n$ node-gyp --python /path/to/python2.7\n```\n\nIf `node-gyp` is called by way of `npm` *and* you have multiple versions of\nPython installed, then you can set `npm`'s 'python' config key to the appropriate\nvalue:\n\n``` bash\n$ npm config set python /path/to/executable/python2.7\n```\n\nNote that OS X is just a flavour of Unix and so needs `python`, `make`, and C/C++.\nAn easy way to obtain these is to install XCode from Apple,\nand then use it to install the command line tools (under Preferences -> Downloads).\n\nHow to Use\n----------\n\nTo compile your native addon, first go to its root directory:\n\n``` bash\n$ cd my_node_addon\n```\n\nThe next step is to generate the appropriate project build files for the current\nplatform. Use `configure` for that:\n\n``` bash\n$ node-gyp configure\n```\n\n__Note__: The `configure` step looks for the `binding.gyp` file in the current\ndirectory to processs. See below for instructions on creating the `binding.gyp` file.\n\nNow you will have either a `Makefile` (on Unix platforms) or a `vcxproj` file\n(on Windows) in the `build/` directory. Next invoke the `build` command:\n\n``` bash\n$ node-gyp build\n```\n\nNow you have your compiled `.node` bindings file! The compiled bindings end up\nin `build/Debug/` or `build/Release/`, depending on the build mode. At this point\nyou can require the `.node` file with Node and run your tests!\n\n__Note:__ To create a _Debug_ build of the bindings file, pass the `--debug` (or\n`-d`) switch when running the either `configure` or `build` command.\n\n\nThe \"binding.gyp\" file\n----------------------\n\nPreviously when node had `node-waf` you had to write a `wscript` file. The\nreplacement for that is the `binding.gyp` file, which describes the configuration\nto build your module in a JSON-like format. This file gets placed in the root of\nyour package, alongside the `package.json` file.\n\nA barebones `gyp` file appropriate for building a node addon looks like:\n\n``` python\n{\n \"targets\": [\n {\n \"target_name\": \"binding\",\n \"sources\": [ \"src/binding.cc\" ]\n }\n ]\n}\n```\n\nSome additional resources for writing `gyp` files:\n\n * [\"Hello World\" node addon example](https://github.com/joyent/node/tree/master/test/addons/hello-world)\n * [gyp user documentation](http://code.google.com/p/gyp/wiki/GypUserDocumentation)\n * [gyp input format reference](http://code.google.com/p/gyp/wiki/InputFormatReference)\n * [*\"binding.gyp\" files out in the wild* wiki page](https://github.com/TooTallNate/node-gyp/wiki/%22binding.gyp%22-files-out-in-the-wild)\n\n\nCommands\n--------\n\n`node-gyp` responds to the following commands:\n\n| **Command** | **Description**\n|:--------------|:---------------------------------------------------------------\n| `build` | Invokes `make`/`msbuild.exe` and builds the native addon\n| `clean` | Removes any the `build` dir if it exists\n| `configure` | Generates project build files for the current platform\n| `rebuild` | Runs \"clean\", \"configure\" and \"build\" all in a row\n| `install` | Installs node development header files for the given version\n| `list` | Lists the currently installed node development file versions\n| `remove` | Removes the node development header files for the given version\n\n\nLicense\n-------\n\n(The MIT License)\n\nCopyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n[windows-python]: http://www.python.org/getit/windows\n[windows-python-v2.7.3]: http://www.python.org/download/releases/2.7.3#download\n[msvc2010]: http://go.microsoft.com/?linkid=9709949\n[msvc2012]: http://go.microsoft.com/?linkid=9816758\n[win7sdk]: http://www.microsoft.com/en-us/download/details.aspx?id=8279\n[compiler update for the Windows SDK 7.1]: http://www.microsoft.com/en-us/download/details.aspx?id=4422\n", + "readmeFilename": "README.md", + "gitHead": "b2abd70377c356483c98509b14a01d71f1eaa17f", "bugs": { "url": "https://github.com/TooTallNate/node-gyp/issues" }, "homepage": "https://github.com/TooTallNate/node-gyp", - "_id": "node-gyp@0.13.1", - "_shasum": "5a484dd2dc13d5b894a8fe781a250c07eae7bffa", - "_from": "node-gyp@~0.13.0", - "_npmVersion": "1.4.9", - "_npmUser": { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - }, - "maintainers": [ - { - "name": "TooTallNate", - "email": "nathan@tootallnate.net" - }, - { - "name": "tootallnate", - "email": "nathan@tootallnate.net" - } - ], - "dist": { - "shasum": "5a484dd2dc13d5b894a8fe781a250c07eae7bffa", - "tarball": "http://registry.npmjs.org/node-gyp/-/node-gyp-0.13.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-0.13.1.tgz", - "readme": "ERROR: No README data found!" + "_id": "node-gyp@1.0.1", + "scripts": {}, + "_shasum": "d5e364145ff10b259be9986855c83b5a76a2d975", + "_from": "node-gyp@latest" } diff --git a/node_modules/npm-registry-client/LICENSE b/node_modules/npm-registry-client/LICENSE index 0c44ae716db..19129e315fe 100644 --- a/node_modules/npm-registry-client/LICENSE +++ b/node_modules/npm-registry-client/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npm-registry-client/package.json b/node_modules/npm-registry-client/package.json index b377643037d..bb7c5b55446 100644 --- a/node_modules/npm-registry-client/package.json +++ b/node_modules/npm-registry-client/package.json @@ -6,7 +6,7 @@ }, "name": "npm-registry-client", "description": "Client for the npm registry", - "version": "2.0.3", + "version": "2.0.4", "repository": { "url": "git://github.com/isaacs/npm-registry-client" }, @@ -17,7 +17,7 @@ "dependencies": { "chownr": "0", "graceful-fs": "^3.0.0", - "mkdirp": "~0.3.3", + "mkdirp": "^0.5.0", "npm-cache-filename": "^1.0.0", "request": "2 >=2.25.0", "retry": "0.6.0", @@ -32,15 +32,34 @@ "optionalDependencies": { "npmlog": "" }, - "license": "BSD", - "readme": "# npm-registry-client\n\nThe code that npm uses to talk to the registry.\n\nIt handles all the caching and HTTP calls.\n\n## Usage\n\n```javascript\nvar RegClient = require('npm-registry-client')\nvar client = new RegClient(config)\nvar uri = \"npm://registry.npmjs.org/npm\"\nvar options = {timeout: 1000}\n\nclient.get(uri, options, function (error, data, raw, res) {\n // error is an error if there was a problem.\n // data is the parsed data object\n // raw is the json string\n // res is the response from couch\n})\n```\n\n# Registry URLs\n\nThe registry calls take either a full URL pointing to a resource in the\nregistry, or a base URL for the registry as a whole (for the base URL, any path\nwill be ignored). In addition to `http` and `https`, `npm` URLs are allowed.\n`npm` URLs are `https` URLs with the additional restrictions that they will\nalways include authorization credentials, and the response is always registry\nmetadata (and not tarballs or other attachments).\n\n# Configuration\n\nThis program is designed to work with\n[npmconf](https://npmjs.org/package/npmconf), but you can also pass in\na plain-jane object with the appropriate configs, and it'll shim it\nfor you. Any configuration thingie that has get/set/del methods will\nalso be accepted.\n\n* `cache` **Required** {String} Path to the cache folder\n* `always-auth` {Boolean} Auth even for GET requests.\n* `auth` {String} A base64-encoded `username:password`\n* `email` {String} User's email address\n* `tag` {String} The default tag to use when publishing new packages.\n Default = `\"latest\"`\n* `ca` {String} Cerficate signing authority certificates to trust.\n* `cert` {String} Client certificate (PEM encoded). Enable access\n to servers that require client certificates\n* `key` {String} Private key (PEM encoded) for client certificate 'cert'\n* `strict-ssl` {Boolean} Whether or not to be strict with SSL\n certificates. Default = `true`\n* `user-agent` {String} User agent header to send. Default =\n `\"node/{process.version} {process.platform} {process.arch}\"`\n* `log` {Object} The logger to use. Defaults to `require(\"npmlog\")` if\n that works, otherwise logs are disabled.\n* `fetch-retries` {Number} Number of times to retry on GET failures.\n Default=2\n* `fetch-retry-factor` {Number} `factor` setting for `node-retry`. Default=10\n* `fetch-retry-mintimeout` {Number} `minTimeout` setting for `node-retry`.\n Default=10000 (10 seconds)\n* `fetch-retry-maxtimeout` {Number} `maxTimeout` setting for `node-retry`.\n Default=60000 (60 seconds)\n* `proxy` {URL} The url to proxy requests through.\n* `https-proxy` {URL} The url to proxy https requests through.\n Defaults to be the same as `proxy` if unset.\n* `_auth` {String} The base64-encoded authorization header.\n* `username` `_password` {String} Username/password to use to generate\n `_auth` if not supplied.\n* `_token` {Object} A token for use with\n [couch-login](https://npmjs.org/package/couch-login)\n\n# client.request(method, uri, options, cb)\n\n* `method` {String} HTTP method\n* `uri` {String} URI pointing to the resource to request\n* `options` {Object} Object containing optional per-request properties.\n * `what` {Stream | Buffer | String | Object} The request body. Objects\n that are not Buffers or Streams are encoded as JSON.\n * `etag` {String} The cached ETag\n * `follow` {Boolean} Follow 302/301 responses (defaults to true)\n* `cb` {Function}\n * `error` {Error | null}\n * `data` {Object} the parsed data object\n * `raw` {String} the json\n * `res` {Response Object} response from couch\n\nMake a request to the registry. All the other methods are wrappers around\n`request`.\n\n# client.adduser(base, username, password, email, cb)\n\n* `base` {String} Base registry URL\n* `username` {String}\n* `password` {String}\n* `email` {String}\n* `cb` {Function}\n\nAdd a user account to the registry, or verify the credentials.\n\n# client.deprecate(uri, version, message, cb)\n\n* `uri` {String} Full registry URI for the deprecated package\n* `version` {String} Semver version range\n* `message` {String} The message to use as a deprecation warning\n* `cb` {Function}\n\nDeprecate a version of a package in the registry.\n\n# client.bugs(uri, cb)\n\n* `uri` {String} Full registry URI for the package\n* `cb` {Function}\n\nGet the url for bugs of a package\n\n# client.get(uri, options, cb)\n\n* `uri` {String} The complete registry URI to fetch\n* `options` {Object} Object containing optional per-request properties.\n * `timeout` {Number} Duration before the request times out.\n * `follow` {Boolean} Follow 302/301 responses (defaults to true)\n * `staleOk` {Boolean} If there's cached data available, then return that\n to the callback quickly, and update the cache the background.\n\nFetches data from the registry via a GET request, saving it in the cache folder\nwith the ETag.\n\n# client.publish(uri, data, tarball, cb)\n\n* `uri` {String} The registry URI to publish to\n* `data` {Object} Package data\n* `tarball` {String | Stream} Filename or stream of the package tarball\n* `cb` {Function}\n\nPublish a package to the registry.\n\nNote that this does not create the tarball from a folder. However, it can\naccept a gzipped tar stream or a filename to a tarball.\n\n# client.star(uri, starred, cb)\n\n* `uri` {String} The complete registry URI to star\n* `starred` {Boolean} True to star the package, false to unstar it.\n* `cb` {Function}\n\nStar or unstar a package.\n\nNote that the user does not have to be the package owner to star or unstar a\npackage, though other writes do require that the user be the package owner.\n\n# client.stars(base, username, cb)\n\n* `base` {String} The base URL for the registry\n* `username` {String} Name of user to fetch starred packages for.\n* `cb` {Function}\n\nView your own or another user's starred packages.\n\n# client.tag(uri, version, tag, cb)\n\n* `uri` {String} The complete registry URI to tag\n* `version` {String} Version to tag\n* `tag` {String} Tag name to apply\n* `cb` {Function}\n\nMark a version in the `dist-tags` hash, so that `pkg@tag` will fetch the\nspecified version.\n\n# client.unpublish(uri, [ver], cb)\n\n* `uri` {String} The complete registry URI to unpublish\n* `ver` {String} version to unpublish. Leave blank to unpublish all\n versions.\n* `cb` {Function}\n\nRemove a version of a package (or all versions) from the registry. When the\nlast version us unpublished, the entire document is removed from the database.\n\n# client.upload(uri, file, [etag], [nofollow], cb)\n\n* `uri` {String} The complete registry URI to upload to\n* `file` {String | Stream} Either the filename or a readable stream\n* `etag` {String} Cache ETag\n* `nofollow` {Boolean} Do not follow 301/302 responses\n* `cb` {Function}\n\nUpload an attachment. Mostly used by `client.publish()`.\n", - "readmeFilename": "README.md", - "gitHead": "2578fb9a807d77417554ba235ba8fac39405e832", + "license": "ISC", + "gitHead": "a10f621d9cdc813b9d3092a14b661f65bfa6d40d", "bugs": { "url": "https://github.com/isaacs/npm-registry-client/issues" }, "homepage": "https://github.com/isaacs/npm-registry-client", - "_id": "npm-registry-client@2.0.3", - "_shasum": "93dad3d9a162c99404badb71739c622c0f3b9a72", - "_from": "npm-registry-client@2.0.3" + "_id": "npm-registry-client@2.0.4", + "_shasum": "528e08900d7655c12096d1637d1c3a7a5b451019", + "_from": "npm-registry-client@2.0.4", + "_npmVersion": "1.4.22", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "dist": { + "shasum": "528e08900d7655c12096d1637d1c3a7a5b451019", + "tarball": "http://registry.npmjs.org/npm-registry-client/-/npm-registry-client-2.0.4.tgz" + }, + "directories": {}, + "_resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-2.0.4.tgz" } diff --git a/node_modules/npmconf/LICENSE b/node_modules/npmconf/LICENSE index 0c44ae716db..19129e315fe 100644 --- a/node_modules/npmconf/LICENSE +++ b/node_modules/npmconf/LICENSE @@ -1,27 +1,15 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. +The ISC License -The BSD License +Copyright (c) Isaac Z. Schlueter and Contributors -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/npmconf/package.json b/node_modules/npmconf/package.json index a0e1bbbd774..b62bde8d0c7 100644 --- a/node_modules/npmconf/package.json +++ b/node_modules/npmconf/package.json @@ -1,6 +1,6 @@ { "name": "npmconf", - "version": "1.1.4", + "version": "1.1.5", "description": "The config thing npm uses", "main": "npmconf.js", "directories": { @@ -10,7 +10,7 @@ "config-chain": "~1.1.8", "inherits": "~2.0.0", "ini": "^1.2.0", - "mkdirp": "~0.3.3", + "mkdirp": "^0.5.0", "nopt": "~3.0.1", "once": "~1.3.0", "osenv": "^0.1.0", @@ -39,15 +39,33 @@ "email": "i@izs.me", "url": "http://blog.izs.me" }, - "license": "BSD", - "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n", - "readmeFilename": "README.md", - "gitHead": "3662624af0834159c35843fcf850469c09e0873c", + "license": "ISC", + "gitHead": "73f125b2961d550bd9884d8945e653a9fe8066c6", "bugs": { "url": "https://github.com/isaacs/npmconf/issues" }, "homepage": "https://github.com/isaacs/npmconf", - "_id": "npmconf@1.1.4", - "_shasum": "2ac5d080206d4bfb9abc01bd34f083f93ae1603c", - "_from": "npmconf@latest" + "_id": "npmconf@1.1.5", + "_shasum": "07777bea48d78eed75a4258962a09f3dc7b6b916", + "_from": "npmconf@1.1.5", + "_npmVersion": "1.4.22", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "othiym23", + "email": "ogd@aoaioxxysz.net" + } + ], + "dist": { + "shasum": "07777bea48d78eed75a4258962a09f3dc7b6b916", + "tarball": "http://registry.npmjs.org/npmconf/-/npmconf-1.1.5.tgz" + }, + "_resolved": "https://registry.npmjs.org/npmconf/-/npmconf-1.1.5.tgz" } 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 751d234dbb4..2c7e76c19df 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.4.2", + "version": "1.0.0", "author": { "name": "Meryn Stol", "email": "merynstol@gmail.com" @@ -15,7 +15,7 @@ "test": "tap test/*.js" }, "dependencies": { - "github-url-from-git": "~1.1.1", + "github-url-from-git": "^1.3.0", "github-url-from-username-repo": "^0.2.0", "semver": "2 || 3" }, @@ -38,37 +38,14 @@ "email": "rok@kowalski.gd" } ], - "gitHead": "09ff709e33e611bb4e6ad5aa2b33e52e77b3fa36", + "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", + "gitHead": "976920445743c647bd2c8f579764f2060c649db9", "bugs": { "url": "https://github.com/meryn/normalize-package-data/issues" }, "homepage": "https://github.com/meryn/normalize-package-data", - "_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" - }, - "maintainers": [ - { - "name": "meryn", - "email": "merynstol@gmail.com" - }, - { - "name": "isaacs", - "email": "i@izs.me" - }, - { - "name": "othiym23", - "email": "ogd@aoaioxxysz.net" - } - ], - "dist": { - "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.4.2.tgz" + "_id": "normalize-package-data@1.0.0", + "_shasum": "5239d9921791a8ad027607f580a74c76166623c8", + "_from": "normalize-package-data@^1.0.0" } diff --git a/node_modules/read-package-json/node_modules/normalize-package-data/test/scoped.js b/node_modules/read-package-json/node_modules/normalize-package-data/test/scoped.js new file mode 100644 index 00000000000..31bbf4f7fc5 --- /dev/null +++ b/node_modules/read-package-json/node_modules/normalize-package-data/test/scoped.js @@ -0,0 +1,51 @@ +var test = require("tap").test + +var fixNameField = require("../lib/fixer.js").fixNameField + +test("a simple scoped module has a valid name", function (t) { + var data = {name : "@org/package"} + fixNameField(data, false) + t.equal(data.name, "@org/package", "name was unchanged") + + t.end() +}) + +test("'org@package' is not a valid name", function (t) { + t.throws(function () { + fixNameField({name : "org@package"}, false) + }, "blows up as expected") + + t.end() +}) + +test("'org=package' is not a valid name", function (t) { + t.throws(function () { + fixNameField({name : "org=package"}, false) + }, "blows up as expected") + + t.end() +}) + +test("'@org=sub/package' is not a valid name", function (t) { + t.throws(function () { + fixNameField({name : "@org=sub/package"}, false) + }, "blows up as expected") + + t.end() +}) + +test("'@org/' is not a valid name", function (t) { + t.throws(function () { + fixNameField({name : "@org/"}, false) + }, "blows up as expected") + + t.end() +}) + +test("'@/package' is not a valid name", function (t) { + t.throws(function () { + fixNameField({name : "@/package"}, false) + }, "blows up as expected") + + t.end() +}) diff --git a/node_modules/read-package-json/package.json b/node_modules/read-package-json/package.json index f3c844b64d0..3247b6b7654 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.4", + "version": "1.2.6", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", @@ -16,9 +16,10 @@ "test": "tap test/*.js" }, "dependencies": { + "github-url-from-git": "^1.3.0", "glob": "^4.0.2", "lru-cache": "2", - "normalize-package-data": "0.4", + "normalize-package-data": "^1.0.0", "graceful-fs": "2 || 3" }, "devDependencies": { @@ -28,33 +29,14 @@ "graceful-fs": "2 || 3" }, "license": "ISC", - "gitHead": "7127ed4d9fe93bb0c2b2809b3c10a4f23f0c8236", + "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 ` : ` 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": "a6390214436eea17043130d7c7d961ae85786e4c", "bugs": { "url": "https://github.com/isaacs/read-package-json/issues" }, "homepage": "https://github.com/isaacs/read-package-json", - "_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" + "_id": "read-package-json@1.2.6", + "_shasum": "eedcc11ba25a94f80e5941fdbccff4a21d8ab13a", + "_from": "read-package-json@latest" } diff --git a/node_modules/tar/package.json b/node_modules/tar/package.json index 2f261b890d7..89ac65cf53b 100644 --- a/node_modules/tar/package.json +++ b/node_modules/tar/package.json @@ -6,7 +6,7 @@ }, "name": "tar", "description": "tar for node", - "version": "0.1.20", + "version": "1.0.0", "repository": { "type": "git", "url": "git://github.com/isaacs/node-tar.git" @@ -17,7 +17,7 @@ }, "dependencies": { "block-stream": "*", - "fstream": "~0.1.28", + "fstream": "^1.0.0", "inherits": "2" }, "devDependencies": { @@ -27,12 +27,12 @@ "license": "BSD", "readme": "# node-tar\n\nTar for Node.js.\n\n[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)\n\n## API\n\nSee `examples/` for usage examples.\n\n### var tar = require('tar')\n\nReturns an object with `.Pack`, `.Extract` and `.Parse` methods.\n\n### tar.Pack([properties])\n\nReturns a through stream. Use\n[fstream](https://npmjs.org/package/fstream) to write files into the\npack stream and you will receive tar archive data from the pack\nstream.\n\nThis only works with directories, it does not work with individual files.\n\nThe optional `properties` object are used to set properties in the tar\n'Global Extended Header'.\n\n### tar.Extract([options])\n\nReturns a through stream. Write tar data to the stream and the files\nin the tarball will be extracted onto the filesystem.\n\n`options` can be:\n\n```js\n{\n path: '/path/to/extract/tar/into',\n strip: 0, // how many path segments to strip from the root when extracting\n}\n```\n\n`options` also get passed to the `fstream.Writer` instance that `tar`\nuses internally.\n\n### tar.Parse()\n\nReturns a writable stream. Write tar data to it and it will emit\n`entry` events for each entry parsed from the tarball. This is used by\n`tar.Extract`.\n", "readmeFilename": "README.md", - "gitHead": "b5931010907cd1ef5a186bc947954391050cbcce", + "gitHead": "49979621a55c73c3f668d8e01830eba1ea9df862", "bugs": { "url": "https://github.com/isaacs/node-tar/issues" }, "homepage": "https://github.com/isaacs/node-tar", - "_id": "tar@0.1.20", - "_shasum": "42940bae5b5f22c74483699126f9f3f27449cb13", - "_from": "tar@~0.1.19" + "_id": "tar@1.0.0", + "_shasum": "36636d76e8ae12b4bc11a940ac606b5ca8a5fe1f", + "_from": "tar@latest" } diff --git a/package.json b/package.json index 27cb9f12674..cb2bd103f6d 100644 --- a/package.json +++ b/package.json @@ -44,9 +44,9 @@ "cmd-shim": "~1.1.2", "columnify": "~1.1.0", "editor": "~0.1.0", - "fstream": "~0.1.29", - "fstream-npm": "~0.1.7", - "github-url-from-git": "~1.2.0", + "fstream": "~1.0.0", + "fstream-npm": "~1.0.0", + "github-url-from-git": "~1.3.0", "github-url-from-username-repo": "~0.2.0", "glob": "~4.0.5", "graceful-fs": "~3.0.0", @@ -55,13 +55,13 @@ "init-package-json": "~1.0.0", "lockfile": "~0.4.0", "lru-cache": "~2.5.0", - "minimatch": "~0.3.0", - "mkdirp": "~0.3.5", - "node-gyp": "~0.13.0", + "minimatch": "~1.0.0", + "mkdirp": "~0.5.0", + "node-gyp": "~1.0.1", "nopt": "~3.0.1", "npm-cache-filename": "~1.0.1", "npm-install-checks": "~1.0.2", - "npm-registry-client": "~2.0.3", + "npm-registry-client": "~2.0.4", "npm-user-validate": "~0.1.0", "npmconf": "~1.1.4", "npmlog": "~0.1.1", @@ -71,7 +71,7 @@ "path-is-inside": "~1.0.0", "read": "~1.0.4", "read-installed": "~2.0.5", - "read-package-json": "~1.2.4", + "read-package-json": "~1.2.6", "request": "~2.30.0", "retry": "~0.6.0", "rimraf": "~2.2.8", @@ -79,7 +79,7 @@ "sha": "~1.2.1", "slide": "~1.1.5", "sorted-object": "~1.0.0", - "tar": "~0.1.20", + "tar": "~1.0.0", "text-table": "~0.2.0", "uid-number": "0.0.5", "which": "1"