update several dependencies

The quest to avoid SemVer '0.x' magic continues.
This commit is contained in:
isaacs
2014-07-31 15:42:26 -07:00
parent e22099a5cd
commit 8dd11d1347
60 changed files with 1568 additions and 448 deletions

25
node_modules/fstream-npm/LICENCE generated vendored
View File

@@ -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.

15
node_modules/fstream-npm/LICENSE generated vendored Normal file
View File

@@ -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.

View File

@@ -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.

View File

@@ -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)
}

View File

@@ -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"
}

View File

@@ -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()
})
})

View File

@@ -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"
}

33
node_modules/fstream/package.json generated vendored
View File

@@ -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"
}

22
node_modules/github-url-from-git/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca>
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.

View File

@@ -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() {

View File

@@ -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;

View File

@@ -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!"
}

View File

@@ -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() {

4
node_modules/minimatch/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,4 @@
language: node_js
node_js:
- 0.10
- 0.11

14
node_modules/minimatch/minimatch.js generated vendored
View File

@@ -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

View File

@@ -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"
}

16
node_modules/minimatch/package.json generated vendored
View File

@@ -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!"
}

View File

@@ -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]

2
node_modules/mkdirp/.travis.yml generated vendored
View File

@@ -2,4 +2,4 @@ language: node_js
node_js:
- 0.6
- 0.8
- 0.9
- "0.10"

49
node_modules/mkdirp/README.markdown generated vendored
View File

@@ -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

33
node_modules/mkdirp/bin/cmd.js generated vendored Executable file
View File

@@ -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();
}
})();

12
node_modules/mkdirp/bin/usage.txt generated vendored Normal file
View File

@@ -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.

47
node_modules/mkdirp/index.js generated vendored
View File

@@ -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;

View File

@@ -0,0 +1,4 @@
language: node_js
node_js:
- "0.8"
- "0.10"

18
node_modules/mkdirp/node_modules/minimist/LICENSE generated vendored Normal file
View File

@@ -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.

View File

@@ -0,0 +1,2 @@
var argv = require('../')(process.argv.slice(2));
console.dir(argv);

187
node_modules/mkdirp/node_modules/minimist/index.js generated vendored Normal file
View File

@@ -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 }));
}

67
node_modules/mkdirp/node_modules/minimist/package.json generated vendored Normal file
View File

@@ -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!"
}

View File

@@ -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

24
node_modules/mkdirp/node_modules/minimist/test/dash.js generated vendored Normal file
View File

@@ -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' ] });
});

View File

@@ -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();
});

View File

@@ -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();
});

31
node_modules/mkdirp/node_modules/minimist/test/long.js generated vendored Normal file
View File

@@ -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();
});

318
node_modules/mkdirp/node_modules/minimist/test/parse.js generated vendored Normal file
View File

@@ -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();
});

View File

@@ -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'] });
});

View File

@@ -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();
});

View File

@@ -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');
});

39
node_modules/mkdirp/package.json generated vendored
View File

@@ -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!"
}

20
node_modules/mkdirp/test/mkdirp.js generated vendored
View File

@@ -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');
})
})
});

27
node_modules/mkdirp/test/opts_fs.js generated vendored Normal file
View File

@@ -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');
});
});
});
});

25
node_modules/mkdirp/test/opts_fs_sync.js generated vendored Normal file
View File

@@ -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');
});
});
});

20
node_modules/mkdirp/test/perm.js generated vendored
View File

@@ -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');
})
})
});

View File

@@ -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');
})
});
});

23
node_modules/mkdirp/test/race.js generated vendored
View File

@@ -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();
});
})
});
}

22
node_modules/mkdirp/test/rel.js generated vendored
View File

@@ -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');
})
})
});

18
node_modules/mkdirp/test/sync.js generated vendored
View File

@@ -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');
});
});
});

22
node_modules/mkdirp/test/umask.js generated vendored
View File

@@ -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');
});
})
});
});

View File

@@ -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');
});
});
});

3
node_modules/node-gyp/README.md generated vendored
View File

@@ -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

44
node_modules/node-gyp/lib/install.js generated vendored
View File

@@ -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)

46
node_modules/node-gyp/package.json generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -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.

File diff suppressed because one or more lines are too long

36
node_modules/npmconf/LICENSE generated vendored
View File

@@ -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.

36
node_modules/npmconf/package.json generated vendored
View File

@@ -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"
}

File diff suppressed because one or more lines are too long

View File

@@ -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()
})

File diff suppressed because one or more lines are too long

12
node_modules/tar/package.json generated vendored
View File

@@ -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"
}