summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/node-gyp/node_modules
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-13 12:29:07 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-13 12:29:22 +0200
commitda736d8259331a8ef13bf4bbb10bbb8a5c0e5299 (patch)
tree4d849133b1c9a9c7067e96ff7dd8faa1d927e0bb /deps/node/deps/npm/node_modules/node-gyp/node_modules
parentda228cf9d71b747f1824e85127039e5afc7effd8 (diff)
downloadakono-da736d8259331a8ef13bf4bbb10bbb8a5c0e5299.tar.gz
akono-da736d8259331a8ef13bf4bbb10bbb8a5c0e5299.tar.bz2
akono-da736d8259331a8ef13bf4bbb10bbb8a5c0e5299.zip
remove node/v8 from source tree
Diffstat (limited to 'deps/node/deps/npm/node_modules/node-gyp/node_modules')
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore1
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml9
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE15
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md211
-rwxr-xr-xdeps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js54
-rwxr-xr-xdeps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js30
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js415
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json57
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js273
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE15
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/README.md350
-rwxr-xr-xdeps/node/deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver133
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/package.json54
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf16
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/semver.js1203
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore5
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml4
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE12
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/README.md50
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js19
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js24
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js35
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js30
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js169
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js220
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js191
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js140
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js94
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js14
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js384
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js236
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js275
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/package.json59
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js173
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js53
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgzbin4096 -> 0 bytes
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js177
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tarbin4608 -> 0 bytes
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js33
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js132
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js367
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgzbin19352 -> 0 bytes
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js183
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js886
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js952
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js29
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js359
-rw-r--r--deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js20
48 files changed, 0 insertions, 8161 deletions
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore
deleted file mode 100644
index 3c3629e6..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml
deleted file mode 100644
index 99f2bbf5..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: node_js
-language: node_js
-node_js:
- - '0.8'
- - '0.10'
- - '0.12'
- - 'iojs'
-before_install:
- - npm install -g npm@latest
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE
deleted file mode 100644
index 19129e31..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-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/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md
deleted file mode 100644
index f21a4b31..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/README.md
+++ /dev/null
@@ -1,211 +0,0 @@
-If you want to write an option parser, and have it be good, there are
-two ways to do it. The Right Way, and the Wrong Way.
-
-The Wrong Way is to sit down and write an option parser. We've all done
-that.
-
-The Right Way is to write some complex configurable program with so many
-options that you hit the limit of your frustration just trying to
-manage them all, and defer it with duct-tape solutions until you see
-exactly to the core of the problem, and finally snap and write an
-awesome option parser.
-
-If you want to write an option parser, don't write an option parser.
-Write a package manager, or a source control system, or a service
-restarter, or an operating system. You probably won't end up with a
-good one of those, but if you don't give up, and you are relentless and
-diligent enough in your procrastination, you may just end up with a very
-nice option parser.
-
-## USAGE
-
- // my-program.js
- var nopt = require("nopt")
- , Stream = require("stream").Stream
- , path = require("path")
- , knownOpts = { "foo" : [String, null]
- , "bar" : [Stream, Number]
- , "baz" : path
- , "bloo" : [ "big", "medium", "small" ]
- , "flag" : Boolean
- , "pick" : Boolean
- , "many1" : [String, Array]
- , "many2" : [path]
- }
- , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
- , "b7" : ["--bar", "7"]
- , "m" : ["--bloo", "medium"]
- , "p" : ["--pick"]
- , "f" : ["--flag"]
- }
- // everything is optional.
- // knownOpts and shorthands default to {}
- // arg list defaults to process.argv
- // slice defaults to 2
- , parsed = nopt(knownOpts, shortHands, process.argv, 2)
- console.log(parsed)
-
-This would give you support for any of the following:
-
-```bash
-$ node my-program.js --foo "blerp" --no-flag
-{ "foo" : "blerp", "flag" : false }
-
-$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag
-{ bar: 7, foo: "Mr. Hand", flag: true }
-
-$ node my-program.js --foo "blerp" -f -----p
-{ foo: "blerp", flag: true, pick: true }
-
-$ node my-program.js -fp --foofoo
-{ foo: "Mr. Foo", flag: true, pick: true }
-
-$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.
-{ foo: "Mr. Foo", argv: { remain: ["-fp"] } }
-
-$ node my-program.js --blatzk -fp # unknown opts are ok.
-{ blatzk: true, flag: true, pick: true }
-
-$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value
-{ blatzk: 1000, flag: true, pick: true }
-
-$ node my-program.js --no-blatzk -fp # unless they start with "no-"
-{ blatzk: false, flag: true, pick: true }
-
-$ node my-program.js --baz b/a/z # known paths are resolved.
-{ baz: "/Users/isaacs/b/a/z" }
-
-# if Array is one of the types, then it can take many
-# values, and will always be an array. The other types provided
-# specify what types are allowed in the list.
-
-$ node my-program.js --many1 5 --many1 null --many1 foo
-{ many1: ["5", "null", "foo"] }
-
-$ node my-program.js --many2 foo --many2 bar
-{ many2: ["/path/to/foo", "path/to/bar"] }
-```
-
-Read the tests at the bottom of `lib/nopt.js` for more examples of
-what this puppy can do.
-
-## Types
-
-The following types are supported, and defined on `nopt.typeDefs`
-
-* String: A normal string. No parsing is done.
-* path: A file system path. Gets resolved against cwd if not absolute.
-* url: A url. If it doesn't parse, it isn't accepted.
-* Number: Must be numeric.
-* Date: Must parse as a date. If it does, and `Date` is one of the options,
- then it will return a Date object, not a string.
-* Boolean: Must be either `true` or `false`. If an option is a boolean,
- then it does not need a value, and its presence will imply `true` as
- the value. To negate boolean flags, do `--no-whatever` or `--whatever
- false`
-* NaN: Means that the option is strictly not allowed. Any value will
- fail.
-* Stream: An object matching the "Stream" class in node. Valuable
- for use when validating programmatically. (npm uses this to let you
- supply any WriteStream on the `outfd` and `logfd` config options.)
-* Array: If `Array` is specified as one of the types, then the value
- will be parsed as a list of options. This means that multiple values
- can be specified, and that the value will always be an array.
-
-If a type is an array of values not on this list, then those are
-considered valid values. For instance, in the example above, the
-`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`,
-and any other value will be rejected.
-
-When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be
-interpreted as their JavaScript equivalents.
-
-You can also mix types and values, or multiple types, in a list. For
-instance `{ blah: [Number, null] }` would allow a value to be set to
-either a Number or null. When types are ordered, this implies a
-preference, and the first type that can be used to properly interpret
-the value will be used.
-
-To define a new type, add it to `nopt.typeDefs`. Each item in that
-hash is an object with a `type` member and a `validate` method. The
-`type` member is an object that matches what goes in the type list. The
-`validate` method is a function that gets called with `validate(data,
-key, val)`. Validate methods should assign `data[key]` to the valid
-value of `val` if it can be handled properly, or return boolean
-`false` if it cannot.
-
-You can also call `nopt.clean(data, types, typeDefs)` to clean up a
-config object and remove its invalid properties.
-
-## Error Handling
-
-By default, nopt outputs a warning to standard error when invalid values for
-known options are found. You can change this behavior by assigning a method
-to `nopt.invalidHandler`. This method will be called with
-the offending `nopt.invalidHandler(key, val, types)`.
-
-If no `nopt.invalidHandler` is assigned, then it will console.error
-its whining. If it is assigned to boolean `false` then the warning is
-suppressed.
-
-## Abbreviations
-
-Yes, they are supported. If you define options like this:
-
-```javascript
-{ "foolhardyelephants" : Boolean
-, "pileofmonkeys" : Boolean }
-```
-
-Then this will work:
-
-```bash
-node program.js --foolhar --pil
-node program.js --no-f --pileofmon
-# etc.
-```
-
-## Shorthands
-
-Shorthands are a hash of shorter option names to a snippet of args that
-they expand to.
-
-If multiple one-character shorthands are all combined, and the
-combination does not unambiguously match any other option or shorthand,
-then they will be broken up into their constituent parts. For example:
-
-```json
-{ "s" : ["--loglevel", "silent"]
-, "g" : "--global"
-, "f" : "--force"
-, "p" : "--parseable"
-, "l" : "--long"
-}
-```
-
-```bash
-npm ls -sgflp
-# just like doing this:
-npm ls --loglevel silent --global --force --long --parseable
-```
-
-## The Rest of the args
-
-The config object returned by nopt is given a special member called
-`argv`, which is an object with the following fields:
-
-* `remain`: The remaining args after all the parsing has occurred.
-* `original`: The args as they originally appeared.
-* `cooked`: The args after flags and shorthands are expanded.
-
-## Slicing
-
-Node programs are called with more or less the exact argv as it appears
-in C land, after the v8 and node-specific options have been plucked off.
-As such, `argv[0]` is always `node` and `argv[1]` is always the
-JavaScript program being run.
-
-That's usually not very useful to you. So they're sliced off by
-default. If you want them, then you can pass in `0` as the last
-argument, or any other number that you'd like to slice off the start of
-the list.
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js
deleted file mode 100755
index 3232d4c5..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/bin/nopt.js
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env node
-var nopt = require("../lib/nopt")
- , path = require("path")
- , types = { num: Number
- , bool: Boolean
- , help: Boolean
- , list: Array
- , "num-list": [Number, Array]
- , "str-list": [String, Array]
- , "bool-list": [Boolean, Array]
- , str: String
- , clear: Boolean
- , config: Boolean
- , length: Number
- , file: path
- }
- , shorthands = { s: [ "--str", "astring" ]
- , b: [ "--bool" ]
- , nb: [ "--no-bool" ]
- , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ]
- , "?": ["--help"]
- , h: ["--help"]
- , H: ["--help"]
- , n: [ "--num", "125" ]
- , c: ["--config"]
- , l: ["--length"]
- , f: ["--file"]
- }
- , parsed = nopt( types
- , shorthands
- , process.argv
- , 2 )
-
-console.log("parsed", parsed)
-
-if (parsed.help) {
- console.log("")
- console.log("nopt cli tester")
- console.log("")
- console.log("types")
- console.log(Object.keys(types).map(function M (t) {
- var type = types[t]
- if (Array.isArray(type)) {
- return [t, type.map(function (type) { return type.name })]
- }
- return [t, type && type.name]
- }).reduce(function (s, i) {
- s[i[0]] = i[1]
- return s
- }, {}))
- console.log("")
- console.log("shorthands")
- console.log(shorthands)
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js
deleted file mode 100755
index 142447e1..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/examples/my-program.js
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env node
-
-//process.env.DEBUG_NOPT = 1
-
-// my-program.js
-var nopt = require("../lib/nopt")
- , Stream = require("stream").Stream
- , path = require("path")
- , knownOpts = { "foo" : [String, null]
- , "bar" : [Stream, Number]
- , "baz" : path
- , "bloo" : [ "big", "medium", "small" ]
- , "flag" : Boolean
- , "pick" : Boolean
- }
- , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
- , "b7" : ["--bar", "7"]
- , "m" : ["--bloo", "medium"]
- , "p" : ["--pick"]
- , "f" : ["--flag", "true"]
- , "g" : ["--flag"]
- , "s" : "--flag"
- }
- // everything is optional.
- // knownOpts and shorthands default to {}
- // arg list defaults to process.argv
- // slice defaults to 2
- , parsed = nopt(knownOpts, shortHands, process.argv, 2)
-
-console.log("parsed =\n"+ require("util").inspect(parsed))
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js
deleted file mode 100644
index 97707e78..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/lib/nopt.js
+++ /dev/null
@@ -1,415 +0,0 @@
-// info about each config option.
-
-var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG
- ? function () { console.error.apply(console, arguments) }
- : function () {}
-
-var url = require("url")
- , path = require("path")
- , Stream = require("stream").Stream
- , abbrev = require("abbrev")
-
-module.exports = exports = nopt
-exports.clean = clean
-
-exports.typeDefs =
- { String : { type: String, validate: validateString }
- , Boolean : { type: Boolean, validate: validateBoolean }
- , url : { type: url, validate: validateUrl }
- , Number : { type: Number, validate: validateNumber }
- , path : { type: path, validate: validatePath }
- , Stream : { type: Stream, validate: validateStream }
- , Date : { type: Date, validate: validateDate }
- }
-
-function nopt (types, shorthands, args, slice) {
- args = args || process.argv
- types = types || {}
- shorthands = shorthands || {}
- if (typeof slice !== "number") slice = 2
-
- debug(types, shorthands, args, slice)
-
- args = args.slice(slice)
- var data = {}
- , key
- , remain = []
- , cooked = args
- , original = args.slice(0)
-
- parse(args, data, remain, types, shorthands)
- // now data is full
- clean(data, types, exports.typeDefs)
- data.argv = {remain:remain,cooked:cooked,original:original}
- Object.defineProperty(data.argv, 'toString', { value: function () {
- return this.original.map(JSON.stringify).join(" ")
- }, enumerable: false })
- return data
-}
-
-function clean (data, types, typeDefs) {
- typeDefs = typeDefs || exports.typeDefs
- var remove = {}
- , typeDefault = [false, true, null, String, Array]
-
- Object.keys(data).forEach(function (k) {
- if (k === "argv") return
- var val = data[k]
- , isArray = Array.isArray(val)
- , type = types[k]
- if (!isArray) val = [val]
- if (!type) type = typeDefault
- if (type === Array) type = typeDefault.concat(Array)
- if (!Array.isArray(type)) type = [type]
-
- debug("val=%j", val)
- debug("types=", type)
- val = val.map(function (val) {
- // if it's an unknown value, then parse false/true/null/numbers/dates
- if (typeof val === "string") {
- debug("string %j", val)
- val = val.trim()
- if ((val === "null" && ~type.indexOf(null))
- || (val === "true" &&
- (~type.indexOf(true) || ~type.indexOf(Boolean)))
- || (val === "false" &&
- (~type.indexOf(false) || ~type.indexOf(Boolean)))) {
- val = JSON.parse(val)
- debug("jsonable %j", val)
- } else if (~type.indexOf(Number) && !isNaN(val)) {
- debug("convert to number", val)
- val = +val
- } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) {
- debug("convert to date", val)
- val = new Date(val)
- }
- }
-
- if (!types.hasOwnProperty(k)) {
- return val
- }
-
- // allow `--no-blah` to set 'blah' to null if null is allowed
- if (val === false && ~type.indexOf(null) &&
- !(~type.indexOf(false) || ~type.indexOf(Boolean))) {
- val = null
- }
-
- var d = {}
- d[k] = val
- debug("prevalidated val", d, val, types[k])
- if (!validate(d, k, val, types[k], typeDefs)) {
- if (exports.invalidHandler) {
- exports.invalidHandler(k, val, types[k], data)
- } else if (exports.invalidHandler !== false) {
- debug("invalid: "+k+"="+val, types[k])
- }
- return remove
- }
- debug("validated val", d, val, types[k])
- return d[k]
- }).filter(function (val) { return val !== remove })
-
- if (!val.length) delete data[k]
- else if (isArray) {
- debug(isArray, data[k], val)
- data[k] = val
- } else data[k] = val[0]
-
- debug("k=%s val=%j", k, val, data[k])
- })
-}
-
-function validateString (data, k, val) {
- data[k] = String(val)
-}
-
-function validatePath (data, k, val) {
- if (val === true) return false
- if (val === null) return true
-
- val = String(val)
- var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
- if (val.match(homePattern) && process.env.HOME) {
- val = path.resolve(process.env.HOME, val.substr(2))
- }
- data[k] = path.resolve(String(val))
- return true
-}
-
-function validateNumber (data, k, val) {
- debug("validate Number %j %j %j", k, val, isNaN(val))
- if (isNaN(val)) return false
- data[k] = +val
-}
-
-function validateDate (data, k, val) {
- debug("validate Date %j %j %j", k, val, Date.parse(val))
- var s = Date.parse(val)
- if (isNaN(s)) return false
- data[k] = new Date(val)
-}
-
-function validateBoolean (data, k, val) {
- if (val instanceof Boolean) val = val.valueOf()
- else if (typeof val === "string") {
- if (!isNaN(val)) val = !!(+val)
- else if (val === "null" || val === "false") val = false
- else val = true
- } else val = !!val
- data[k] = val
-}
-
-function validateUrl (data, k, val) {
- val = url.parse(String(val))
- if (!val.host) return false
- data[k] = val.href
-}
-
-function validateStream (data, k, val) {
- if (!(val instanceof Stream)) return false
- data[k] = val
-}
-
-function validate (data, k, val, type, typeDefs) {
- // arrays are lists of types.
- if (Array.isArray(type)) {
- for (var i = 0, l = type.length; i < l; i ++) {
- if (type[i] === Array) continue
- if (validate(data, k, val, type[i], typeDefs)) return true
- }
- delete data[k]
- return false
- }
-
- // an array of anything?
- if (type === Array) return true
-
- // NaN is poisonous. Means that something is not allowed.
- if (type !== type) {
- debug("Poison NaN", k, val, type)
- delete data[k]
- return false
- }
-
- // explicit list of values
- if (val === type) {
- debug("Explicitly allowed %j", val)
- // if (isArray) (data[k] = data[k] || []).push(val)
- // else data[k] = val
- data[k] = val
- return true
- }
-
- // now go through the list of typeDefs, validate against each one.
- var ok = false
- , types = Object.keys(typeDefs)
- for (var i = 0, l = types.length; i < l; i ++) {
- debug("test type %j %j %j", k, val, types[i])
- var t = typeDefs[types[i]]
- if (t &&
- ((type && type.name && t.type && t.type.name) ? (type.name === t.type.name) : (type === t.type))) {
- var d = {}
- ok = false !== t.validate(d, k, val)
- val = d[k]
- if (ok) {
- // if (isArray) (data[k] = data[k] || []).push(val)
- // else data[k] = val
- data[k] = val
- break
- }
- }
- }
- debug("OK? %j (%j %j %j)", ok, k, val, types[i])
-
- if (!ok) delete data[k]
- return ok
-}
-
-function parse (args, data, remain, types, shorthands) {
- debug("parse", args, data, remain)
-
- var key = null
- , abbrevs = abbrev(Object.keys(types))
- , shortAbbr = abbrev(Object.keys(shorthands))
-
- for (var i = 0; i < args.length; i ++) {
- var arg = args[i]
- debug("arg", arg)
-
- if (arg.match(/^-{2,}$/)) {
- // done with keys.
- // the rest are args.
- remain.push.apply(remain, args.slice(i + 1))
- args[i] = "--"
- break
- }
- var hadEq = false
- if (arg.charAt(0) === "-" && arg.length > 1) {
- if (arg.indexOf("=") !== -1) {
- hadEq = true
- var v = arg.split("=")
- arg = v.shift()
- v = v.join("=")
- args.splice.apply(args, [i, 1].concat([arg, v]))
- }
-
- // see if it's a shorthand
- // if so, splice and back up to re-parse it.
- var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs)
- debug("arg=%j shRes=%j", arg, shRes)
- if (shRes) {
- debug(arg, shRes)
- args.splice.apply(args, [i, 1].concat(shRes))
- if (arg !== shRes[0]) {
- i --
- continue
- }
- }
- arg = arg.replace(/^-+/, "")
- var no = null
- while (arg.toLowerCase().indexOf("no-") === 0) {
- no = !no
- arg = arg.substr(3)
- }
-
- if (abbrevs[arg]) arg = abbrevs[arg]
-
- var isArray = types[arg] === Array ||
- Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1
-
- // allow unknown things to be arrays if specified multiple times.
- if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) {
- if (!Array.isArray(data[arg]))
- data[arg] = [data[arg]]
- isArray = true
- }
-
- var val
- , la = args[i + 1]
-
- var isBool = typeof no === 'boolean' ||
- types[arg] === Boolean ||
- Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 ||
- (typeof types[arg] === 'undefined' && !hadEq) ||
- (la === "false" &&
- (types[arg] === null ||
- Array.isArray(types[arg]) && ~types[arg].indexOf(null)))
-
- if (isBool) {
- // just set and move along
- val = !no
- // however, also support --bool true or --bool false
- if (la === "true" || la === "false") {
- val = JSON.parse(la)
- la = null
- if (no) val = !val
- i ++
- }
-
- // also support "foo":[Boolean, "bar"] and "--foo bar"
- if (Array.isArray(types[arg]) && la) {
- if (~types[arg].indexOf(la)) {
- // an explicit type
- val = la
- i ++
- } else if ( la === "null" && ~types[arg].indexOf(null) ) {
- // null allowed
- val = null
- i ++
- } else if ( !la.match(/^-{2,}[^-]/) &&
- !isNaN(la) &&
- ~types[arg].indexOf(Number) ) {
- // number
- val = +la
- i ++
- } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) {
- // string
- val = la
- i ++
- }
- }
-
- if (isArray) (data[arg] = data[arg] || []).push(val)
- else data[arg] = val
-
- continue
- }
-
- if (types[arg] === String && la === undefined)
- la = ""
-
- if (la && la.match(/^-{2,}$/)) {
- la = undefined
- i --
- }
-
- val = la === undefined ? true : la
- if (isArray) (data[arg] = data[arg] || []).push(val)
- else data[arg] = val
-
- i ++
- continue
- }
- remain.push(arg)
- }
-}
-
-function resolveShort (arg, shorthands, shortAbbr, abbrevs) {
- // handle single-char shorthands glommed together, like
- // npm ls -glp, but only if there is one dash, and only if
- // all of the chars are single-char shorthands, and it's
- // not a match to some other abbrev.
- arg = arg.replace(/^-+/, '')
-
- // if it's an exact known option, then don't go any further
- if (abbrevs[arg] === arg)
- return null
-
- // if it's an exact known shortopt, same deal
- if (shorthands[arg]) {
- // make it an array, if it's a list of words
- if (shorthands[arg] && !Array.isArray(shorthands[arg]))
- shorthands[arg] = shorthands[arg].split(/\s+/)
-
- return shorthands[arg]
- }
-
- // first check to see if this arg is a set of single-char shorthands
- var singles = shorthands.___singles
- if (!singles) {
- singles = Object.keys(shorthands).filter(function (s) {
- return s.length === 1
- }).reduce(function (l,r) {
- l[r] = true
- return l
- }, {})
- shorthands.___singles = singles
- debug('shorthand singles', singles)
- }
-
- var chrs = arg.split("").filter(function (c) {
- return singles[c]
- })
-
- if (chrs.join("") === arg) return chrs.map(function (c) {
- return shorthands[c]
- }).reduce(function (l, r) {
- return l.concat(r)
- }, [])
-
-
- // if it's an arg abbrev, and not a literal shorthand, then prefer the arg
- if (abbrevs[arg] && !shorthands[arg])
- return null
-
- // if it's an abbr for a shorthand, then use that
- if (shortAbbr[arg])
- arg = shortAbbr[arg]
-
- // make it an array, if it's a list of words
- if (shorthands[arg] && !Array.isArray(shorthands[arg]))
- shorthands[arg] = shorthands[arg].split(/\s+/)
-
- return shorthands[arg]
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json
deleted file mode 100644
index 5179f473..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "_from": "nopt@2 || 3",
- "_id": "nopt@3.0.6",
- "_inBundle": false,
- "_integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
- "_location": "/node-gyp/nopt",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "nopt@2 || 3",
- "name": "nopt",
- "escapedName": "nopt",
- "rawSpec": "2 || 3",
- "saveSpec": null,
- "fetchSpec": "2 || 3"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
- "_shasum": "c6465dbf08abcd4db359317f79ac68a646b28ff9",
- "_spec": "nopt@2 || 3",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bin": {
- "nopt": "./bin/nopt.js"
- },
- "bugs": {
- "url": "https://github.com/npm/nopt/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "abbrev": "1"
- },
- "deprecated": false,
- "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
- "devDependencies": {
- "tap": "^1.2.0"
- },
- "homepage": "https://github.com/npm/nopt#readme",
- "license": "ISC",
- "main": "lib/nopt.js",
- "name": "nopt",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/nopt.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "3.0.6"
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js
deleted file mode 100644
index d399de92..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/nopt/test/basic.js
+++ /dev/null
@@ -1,273 +0,0 @@
-var nopt = require("../")
- , test = require('tap').test
-
-
-test("passing a string results in a string", function (t) {
- var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0)
- t.same(parsed.key, "myvalue")
- t.end()
-})
-
-// https://github.com/npm/nopt/issues/31
-test("Empty String results in empty string, not true", function (t) {
- var parsed = nopt({ empty: String }, {}, ["--empty"], 0)
- t.same(parsed.empty, "")
- t.end()
-})
-
-test("~ path is resolved to $HOME", function (t) {
- var path = require("path")
- if (!process.env.HOME) process.env.HOME = "/tmp"
- var parsed = nopt({key: path}, {}, ["--key=~/val"], 0)
- t.same(parsed.key, path.resolve(process.env.HOME, "val"))
- t.end()
-})
-
-// https://github.com/npm/nopt/issues/24
-test("Unknown options are not parsed as numbers", function (t) {
- var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0)
- t.equal(parsed['leave-as-is'], '1.20')
- t.equal(parsed['parse-me'], 1.2)
- t.end()
-});
-
-// https://github.com/npm/nopt/issues/48
-test("Check types based on name of type", function (t) {
- var parsed = nopt({"parse-me": {name: "Number"}}, null, ['--parse-me=1.20'], 0)
- t.equal(parsed['parse-me'], 1.2)
- t.end()
-})
-
-
-test("Missing types are not parsed", function (t) {
- var parsed = nopt({"parse-me": {}}, null, ['--parse-me=1.20'], 0)
- //should only contain argv
- t.equal(Object.keys(parsed).length, 1)
- t.end()
-})
-
-test("Types passed without a name are not parsed", function (t) {
- var parsed = nopt({"parse-me": {}}, {}, ['--parse-me=1.20'], 0)
- //should only contain argv
- t.equal(Object.keys(parsed).length, 1)
- t.end()
-})
-
-test("other tests", function (t) {
-
- var util = require("util")
- , Stream = require("stream")
- , path = require("path")
- , url = require("url")
-
- , shorthands =
- { s : ["--loglevel", "silent"]
- , d : ["--loglevel", "info"]
- , dd : ["--loglevel", "verbose"]
- , ddd : ["--loglevel", "silly"]
- , noreg : ["--no-registry"]
- , reg : ["--registry"]
- , "no-reg" : ["--no-registry"]
- , silent : ["--loglevel", "silent"]
- , verbose : ["--loglevel", "verbose"]
- , h : ["--usage"]
- , H : ["--usage"]
- , "?" : ["--usage"]
- , help : ["--usage"]
- , v : ["--version"]
- , f : ["--force"]
- , desc : ["--description"]
- , "no-desc" : ["--no-description"]
- , "local" : ["--no-global"]
- , l : ["--long"]
- , p : ["--parseable"]
- , porcelain : ["--parseable"]
- , g : ["--global"]
- }
-
- , types =
- { aoa: Array
- , nullstream: [null, Stream]
- , date: Date
- , str: String
- , browser : String
- , cache : path
- , color : ["always", Boolean]
- , depth : Number
- , description : Boolean
- , dev : Boolean
- , editor : path
- , force : Boolean
- , global : Boolean
- , globalconfig : path
- , group : [String, Number]
- , gzipbin : String
- , logfd : [Number, Stream]
- , loglevel : ["silent","win","error","warn","info","verbose","silly"]
- , long : Boolean
- , "node-version" : [false, String]
- , npaturl : url
- , npat : Boolean
- , "onload-script" : [false, String]
- , outfd : [Number, Stream]
- , parseable : Boolean
- , pre: Boolean
- , prefix: path
- , proxy : url
- , "rebuild-bundle" : Boolean
- , registry : url
- , searchopts : String
- , searchexclude: [null, String]
- , shell : path
- , t: [Array, String]
- , tag : String
- , tar : String
- , tmp : path
- , "unsafe-perm" : Boolean
- , usage : Boolean
- , user : String
- , username : String
- , userconfig : path
- , version : Boolean
- , viewer: path
- , _exit : Boolean
- , path: path
- }
-
- ; [["-v", {version:true}, []]
- ,["---v", {version:true}, []]
- ,["ls -s --no-reg connect -d",
- {loglevel:"info",registry:null},["ls","connect"]]
- ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]]
- ,["ls --registry blargle", {}, ["ls"]]
- ,["--no-registry", {registry:null}, []]
- ,["--no-color true", {color:false}, []]
- ,["--no-color false", {color:true}, []]
- ,["--no-color", {color:false}, []]
- ,["--color false", {color:false}, []]
- ,["--color --logfd 7", {logfd:7,color:true}, []]
- ,["--color=true", {color:true}, []]
- ,["--logfd=10", {logfd:10}, []]
- ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]]
- ,["--tmp=tmp -tar=gtar",
- {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]]
- ,["--logfd x", {}, []]
- ,["a -true -- -no-false", {true:true},["a","-no-false"]]
- ,["a -no-false", {false:false},["a"]]
- ,["a -no-no-true", {true:true}, ["a"]]
- ,["a -no-no-no-false", {false:false}, ["a"]]
- ,["---NO-no-No-no-no-no-nO-no-no"+
- "-No-no-no-no-no-no-no-no-no"+
- "-no-no-no-no-NO-NO-no-no-no-no-no-no"+
- "-no-body-can-do-the-boogaloo-like-I-do"
- ,{"body-can-do-the-boogaloo-like-I-do":false}, []]
- ,["we are -no-strangers-to-love "+
- "--you-know=the-rules --and=so-do-i "+
- "---im-thinking-of=a-full-commitment "+
- "--no-you-would-get-this-from-any-other-guy "+
- "--no-gonna-give-you-up "+
- "-no-gonna-let-you-down=true "+
- "--no-no-gonna-run-around false "+
- "--desert-you=false "+
- "--make-you-cry false "+
- "--no-tell-a-lie "+
- "--no-no-and-hurt-you false"
- ,{"strangers-to-love":false
- ,"you-know":"the-rules"
- ,"and":"so-do-i"
- ,"you-would-get-this-from-any-other-guy":false
- ,"gonna-give-you-up":false
- ,"gonna-let-you-down":false
- ,"gonna-run-around":false
- ,"desert-you":false
- ,"make-you-cry":false
- ,"tell-a-lie":false
- ,"and-hurt-you":false
- },["we", "are"]]
- ,["-t one -t two -t three"
- ,{t: ["one", "two", "three"]}
- ,[]]
- ,["-t one -t null -t three four five null"
- ,{t: ["one", "null", "three"]}
- ,["four", "five", "null"]]
- ,["-t foo"
- ,{t:["foo"]}
- ,[]]
- ,["--no-t"
- ,{t:["false"]}
- ,[]]
- ,["-no-no-t"
- ,{t:["true"]}
- ,[]]
- ,["-aoa one -aoa null -aoa 100"
- ,{aoa:["one", null, '100']}
- ,[]]
- ,["-str 100"
- ,{str:"100"}
- ,[]]
- ,["--color always"
- ,{color:"always"}
- ,[]]
- ,["--no-nullstream"
- ,{nullstream:null}
- ,[]]
- ,["--nullstream false"
- ,{nullstream:null}
- ,[]]
- ,["--notadate=2011-01-25"
- ,{notadate: "2011-01-25"}
- ,[]]
- ,["--date 2011-01-25"
- ,{date: new Date("2011-01-25")}
- ,[]]
- ,["-cl 1"
- ,{config: true, length: 1}
- ,[]
- ,{config: Boolean, length: Number, clear: Boolean}
- ,{c: "--config", l: "--length"}]
- ,["--acount bla"
- ,{"acount":true}
- ,["bla"]
- ,{account: Boolean, credentials: Boolean, options: String}
- ,{a:"--account", c:"--credentials",o:"--options"}]
- ,["--clear"
- ,{clear:true}
- ,[]
- ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean}
- ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}]
- ,["--file -"
- ,{"file":"-"}
- ,[]
- ,{file:String}
- ,{}]
- ,["--file -"
- ,{"file":true}
- ,["-"]
- ,{file:Boolean}
- ,{}]
- ,["--path"
- ,{"path":null}
- ,[]]
- ,["--path ."
- ,{"path":process.cwd()}
- ,[]]
- ].forEach(function (test) {
- var argv = test[0].split(/\s+/)
- , opts = test[1]
- , rem = test[2]
- , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0)
- , parsed = actual.argv
- delete actual.argv
- for (var i in opts) {
- var e = JSON.stringify(opts[i])
- , a = JSON.stringify(actual[i] === undefined ? null : actual[i])
- if (e && typeof e === "object") {
- t.deepEqual(e, a)
- } else {
- t.equal(e, a)
- }
- }
- t.deepEqual(rem, parsed.remain)
- })
- t.end()
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE b/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE
deleted file mode 100644
index 19129e31..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-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/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/README.md b/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/README.md
deleted file mode 100644
index cbd95654..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/README.md
+++ /dev/null
@@ -1,350 +0,0 @@
-semver(1) -- The semantic versioner for npm
-===========================================
-
-## Usage
-
- $ npm install semver
- $ node
- var semver = require('semver')
-
- semver.valid('1.2.3') // '1.2.3'
- semver.valid('a.b.c') // null
- semver.clean(' =v1.2.3 ') // '1.2.3'
- semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
- semver.gt('1.2.3', '9.8.7') // false
- semver.lt('1.2.3', '9.8.7') // true
-
-As a command-line utility:
-
- $ semver -h
-
- SemVer 5.1.0
-
- A JavaScript implementation of the http://semver.org/ specification
- Copyright Isaac Z. Schlueter
-
- Usage: semver [options] <version> [<version> [...]]
- Prints valid versions sorted by SemVer precedence
-
- Options:
- -r --range <range>
- Print versions that match the specified range.
-
- -i --increment [<level>]
- Increment a version by the specified level. Level can
- be one of: major, minor, patch, premajor, preminor,
- prepatch, or prerelease. Default level is 'patch'.
- Only one version may be specified.
-
- --preid <identifier>
- Identifier to be used to prefix premajor, preminor,
- prepatch or prerelease version increments.
-
- -l --loose
- Interpret versions and ranges loosely
-
- Program exits successfully if any valid version satisfies
- all supplied ranges, and prints all satisfying versions.
-
- If no satisfying versions are found, then exits failure.
-
- Versions are printed in ascending order, so supplying
- multiple versions to the utility will just sort them.
-
-## Versions
-
-A "version" is described by the `v2.0.0` specification found at
-<http://semver.org/>.
-
-A leading `"="` or `"v"` character is stripped off and ignored.
-
-## Ranges
-
-A `version range` is a set of `comparators` which specify versions
-that satisfy the range.
-
-A `comparator` is composed of an `operator` and a `version`. The set
-of primitive `operators` is:
-
-* `<` Less than
-* `<=` Less than or equal to
-* `>` Greater than
-* `>=` Greater than or equal to
-* `=` Equal. If no operator is specified, then equality is assumed,
- so this operator is optional, but MAY be included.
-
-For example, the comparator `>=1.2.7` would match the versions
-`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
-or `1.1.0`.
-
-Comparators can be joined by whitespace to form a `comparator set`,
-which is satisfied by the **intersection** of all of the comparators
-it includes.
-
-A range is composed of one or more comparator sets, joined by `||`. A
-version matches a range if and only if every comparator in at least
-one of the `||`-separated comparator sets is satisfied by the version.
-
-For example, the range `>=1.2.7 <1.3.0` would match the versions
-`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
-or `1.1.0`.
-
-The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
-`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
-
-### Prerelease Tags
-
-If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
-it will only be allowed to satisfy comparator sets if at least one
-comparator with the same `[major, minor, patch]` tuple also has a
-prerelease tag.
-
-For example, the range `>1.2.3-alpha.3` would be allowed to match the
-version `1.2.3-alpha.7`, but it would *not* be satisfied by
-`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
-than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
-range only accepts prerelease tags on the `1.2.3` version. The
-version `3.4.5` *would* satisfy the range, because it does not have a
-prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
-
-The purpose for this behavior is twofold. First, prerelease versions
-frequently are updated very quickly, and contain many breaking changes
-that are (by the author's design) not yet fit for public consumption.
-Therefore, by default, they are excluded from range matching
-semantics.
-
-Second, a user who has opted into using a prerelease version has
-clearly indicated the intent to use *that specific* set of
-alpha/beta/rc versions. By including a prerelease tag in the range,
-the user is indicating that they are aware of the risk. However, it
-is still not appropriate to assume that they have opted into taking a
-similar risk on the *next* set of prerelease versions.
-
-#### Prerelease Identifiers
-
-The method `.inc` takes an additional `identifier` string argument that
-will append the value of the string as a prerelease identifier:
-
-```javascript
-> semver.inc('1.2.3', 'prerelease', 'beta')
-'1.2.4-beta.0'
-```
-
-command-line example:
-
-```shell
-$ semver 1.2.3 -i prerelease --preid beta
-1.2.4-beta.0
-```
-
-Which then can be used to increment further:
-
-```shell
-$ semver 1.2.4-beta.0 -i prerelease
-1.2.4-beta.1
-```
-
-### Advanced Range Syntax
-
-Advanced range syntax desugars to primitive comparators in
-deterministic ways.
-
-Advanced ranges may be combined in the same way as primitive
-comparators using white space or `||`.
-
-#### Hyphen Ranges `X.Y.Z - A.B.C`
-
-Specifies an inclusive set.
-
-* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
-
-If a partial version is provided as the first version in the inclusive
-range, then the missing pieces are replaced with zeroes.
-
-* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
-
-If a partial version is provided as the second version in the
-inclusive range, then all versions that start with the supplied parts
-of the tuple are accepted, but nothing that would be greater than the
-provided tuple parts.
-
-* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
-* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
-
-#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
-
-Any of `X`, `x`, or `*` may be used to "stand in" for one of the
-numeric values in the `[major, minor, patch]` tuple.
-
-* `*` := `>=0.0.0` (Any version satisfies)
-* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
-* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
-
-A partial version range is treated as an X-Range, so the special
-character is in fact optional.
-
-* `""` (empty string) := `*` := `>=0.0.0`
-* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
-* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
-
-#### Tilde Ranges `~1.2.3` `~1.2` `~1`
-
-Allows patch-level changes if a minor version is specified on the
-comparator. Allows minor-level changes if not.
-
-* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
-* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
-* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
-* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
-* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
-* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
-* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-
-#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
-
-Allows changes that do not modify the left-most non-zero digit in the
-`[major, minor, patch]` tuple. In other words, this allows patch and
-minor updates for versions `1.0.0` and above, patch updates for
-versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
-
-Many authors treat a `0.x` version as if the `x` were the major
-"breaking-change" indicator.
-
-Caret ranges are ideal when an author may make breaking changes
-between `0.2.4` and `0.3.0` releases, which is a common practice.
-However, it presumes that there will *not* be breaking changes between
-`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
-additive (but non-breaking), according to commonly observed practices.
-
-* `^1.2.3` := `>=1.2.3 <2.0.0`
-* `^0.2.3` := `>=0.2.3 <0.3.0`
-* `^0.0.3` := `>=0.0.3 <0.0.4`
-* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
- the `1.2.3` version will be allowed, if they are greater than or
- equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
- `1.2.4-beta.2` would not, because it is a prerelease of a
- different `[major, minor, patch]` tuple.
-* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
- `0.0.3` version *only* will be allowed, if they are greater than or
- equal to `beta`. So, `0.0.3-pr.2` would be allowed.
-
-When parsing caret ranges, a missing `patch` value desugars to the
-number `0`, but will allow flexibility within that value, even if the
-major and minor versions are both `0`.
-
-* `^1.2.x` := `>=1.2.0 <2.0.0`
-* `^0.0.x` := `>=0.0.0 <0.1.0`
-* `^0.0` := `>=0.0.0 <0.1.0`
-
-A missing `minor` and `patch` values will desugar to zero, but also
-allow flexibility within those values, even if the major version is
-zero.
-
-* `^1.x` := `>=1.0.0 <2.0.0`
-* `^0.x` := `>=0.0.0 <1.0.0`
-
-### Range Grammar
-
-Putting all this together, here is a Backus-Naur grammar for ranges,
-for the benefit of parser authors:
-
-```bnf
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
-```
-
-## Functions
-
-All methods and classes take a final `loose` boolean argument that, if
-true, will be more forgiving about not-quite-valid semver strings.
-The resulting output will always be 100% strict, of course.
-
-Strict-mode Comparators and Ranges will be strict about the SemVer
-strings that they parse.
-
-* `valid(v)`: Return the parsed version, or null if it's not valid.
-* `inc(v, release)`: Return the version incremented by the release
- type (`major`, `premajor`, `minor`, `preminor`, `patch`,
- `prepatch`, or `prerelease`), or null if it's not valid
- * `premajor` in one call will bump the version up to the next major
- version and down to a prerelease of that major version.
- `preminor`, and `prepatch` work the same way.
- * If called from a non-prerelease version, the `prerelease` will work the
- same as `prepatch`. It increments the patch version, then makes a
- prerelease. If the input version is already a prerelease it simply
- increments it.
-* `prerelease(v)`: Returns an array of prerelease components, or null
- if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
-* `major(v)`: Return the major version number.
-* `minor(v)`: Return the minor version number.
-* `patch(v)`: Return the patch version number.
-
-### Comparison
-
-* `gt(v1, v2)`: `v1 > v2`
-* `gte(v1, v2)`: `v1 >= v2`
-* `lt(v1, v2)`: `v1 < v2`
-* `lte(v1, v2)`: `v1 <= v2`
-* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
- even if they're not the exact same string. You already know how to
- compare strings.
-* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
-* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
- the corresponding function above. `"==="` and `"!=="` do simple
- string comparison, but are included for completeness. Throws if an
- invalid comparison string is provided.
-* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
- `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
-* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
- in descending order when passed to `Array.sort()`.
-* `diff(v1, v2)`: Returns difference between two versions by the release type
- (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
- or null if the versions are the same.
-
-
-### Ranges
-
-* `validRange(range)`: Return the valid range or null if it's not valid
-* `satisfies(version, range)`: Return true if the version satisfies the
- range.
-* `maxSatisfying(versions, range)`: Return the highest version in the list
- that satisfies the range, or `null` if none of them do.
-* `minSatisfying(versions, range)`: Return the lowest version in the list
- that satisfies the range, or `null` if none of them do.
-* `gtr(version, range)`: Return `true` if version is greater than all the
- versions possible in the range.
-* `ltr(version, range)`: Return `true` if version is less than all the
- versions possible in the range.
-* `outside(version, range, hilo)`: Return true if the version is outside
- the bounds of the range in either the high or low direction. The
- `hilo` argument must be either the string `'>'` or `'<'`. (This is
- the function called by `gtr` and `ltr`.)
-
-Note that, since ranges may be non-contiguous, a version might not be
-greater than a range, less than a range, *or* satisfy a range! For
-example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
-until `2.0.0`, so the version `1.2.10` would not be greater than the
-range (because `2.0.1` satisfies, which is higher), nor less than the
-range (since `1.2.8` satisfies, which is lower), and it also does not
-satisfy the range.
-
-If you want to know if a version satisfies or does not satisfy a
-range, use the `satisfies(version, range)` function.
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver b/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver
deleted file mode 100755
index c5f2e857..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env node
-// Standalone semver comparison program.
-// Exits successfully and prints matching version(s) if
-// any supplied version is valid and passes all tests.
-
-var argv = process.argv.slice(2)
- , versions = []
- , range = []
- , gt = []
- , lt = []
- , eq = []
- , inc = null
- , version = require("../package.json").version
- , loose = false
- , identifier = undefined
- , semver = require("../semver")
- , reverse = false
-
-main()
-
-function main () {
- if (!argv.length) return help()
- while (argv.length) {
- var a = argv.shift()
- var i = a.indexOf('=')
- if (i !== -1) {
- a = a.slice(0, i)
- argv.unshift(a.slice(i + 1))
- }
- switch (a) {
- case "-rv": case "-rev": case "--rev": case "--reverse":
- reverse = true
- break
- case "-l": case "--loose":
- loose = true
- break
- case "-v": case "--version":
- versions.push(argv.shift())
- break
- case "-i": case "--inc": case "--increment":
- switch (argv[0]) {
- case "major": case "minor": case "patch": case "prerelease":
- case "premajor": case "preminor": case "prepatch":
- inc = argv.shift()
- break
- default:
- inc = "patch"
- break
- }
- break
- case "--preid":
- identifier = argv.shift()
- break
- case "-r": case "--range":
- range.push(argv.shift())
- break
- case "-h": case "--help": case "-?":
- return help()
- default:
- versions.push(a)
- break
- }
- }
-
- versions = versions.filter(function (v) {
- return semver.valid(v, loose)
- })
- if (!versions.length) return fail()
- if (inc && (versions.length !== 1 || range.length))
- return failInc()
-
- for (var i = 0, l = range.length; i < l ; i ++) {
- versions = versions.filter(function (v) {
- return semver.satisfies(v, range[i], loose)
- })
- if (!versions.length) return fail()
- }
- return success(versions)
-}
-
-function failInc () {
- console.error("--inc can only be used on a single version with no range")
- fail()
-}
-
-function fail () { process.exit(1) }
-
-function success () {
- var compare = reverse ? "rcompare" : "compare"
- versions.sort(function (a, b) {
- return semver[compare](a, b, loose)
- }).map(function (v) {
- return semver.clean(v, loose)
- }).map(function (v) {
- return inc ? semver.inc(v, inc, loose, identifier) : v
- }).forEach(function (v,i,_) { console.log(v) })
-}
-
-function help () {
- console.log(["SemVer " + version
- ,""
- ,"A JavaScript implementation of the http://semver.org/ specification"
- ,"Copyright Isaac Z. Schlueter"
- ,""
- ,"Usage: semver [options] <version> [<version> [...]]"
- ,"Prints valid versions sorted by SemVer precedence"
- ,""
- ,"Options:"
- ,"-r --range <range>"
- ," Print versions that match the specified range."
- ,""
- ,"-i --increment [<level>]"
- ," Increment a version by the specified level. Level can"
- ," be one of: major, minor, patch, premajor, preminor,"
- ," prepatch, or prerelease. Default level is 'patch'."
- ," Only one version may be specified."
- ,""
- ,"--preid <identifier>"
- ," Identifier to be used to prefix premajor, preminor,"
- ," prepatch or prerelease version increments."
- ,""
- ,"-l --loose"
- ," Interpret versions and ranges loosely"
- ,""
- ,"Program exits successfully if any valid version satisfies"
- ,"all supplied ranges, and prints all satisfying versions."
- ,""
- ,"If no satisfying versions are found, then exits failure."
- ,""
- ,"Versions are printed in ascending order, so supplying"
- ,"multiple versions to the utility will just sort them."
- ].join("\n"))
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/package.json b/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/package.json
deleted file mode 100644
index 8793bae3..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/package.json
+++ /dev/null
@@ -1,54 +0,0 @@
-{
- "_from": "semver@~5.3.0",
- "_id": "semver@5.3.0",
- "_inBundle": false,
- "_integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
- "_location": "/node-gyp/semver",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "semver@~5.3.0",
- "name": "semver",
- "escapedName": "semver",
- "rawSpec": "~5.3.0",
- "saveSpec": null,
- "fetchSpec": "~5.3.0"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
- "_shasum": "9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f",
- "_spec": "semver@~5.3.0",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
- "bin": {
- "semver": "./bin/semver"
- },
- "bugs": {
- "url": "https://github.com/npm/node-semver/issues"
- },
- "bundleDependencies": false,
- "deprecated": false,
- "description": "The semantic version parser used by npm.",
- "devDependencies": {
- "tap": "^2.0.0"
- },
- "files": [
- "bin",
- "range.bnf",
- "semver.js"
- ],
- "homepage": "https://github.com/npm/node-semver#readme",
- "license": "ISC",
- "main": "semver.js",
- "name": "semver",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/node-semver.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "5.3.0"
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf b/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf
deleted file mode 100644
index 25ebd5c8..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf
+++ /dev/null
@@ -1,16 +0,0 @@
-range-set ::= range ( logical-or range ) *
-logical-or ::= ( ' ' ) * '||' ( ' ' ) *
-range ::= hyphen | simple ( ' ' simple ) * | ''
-hyphen ::= partial ' - ' partial
-simple ::= primitive | partial | tilde | caret
-primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial
-partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
-xr ::= 'x' | 'X' | '*' | nr
-nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
-tilde ::= '~' partial
-caret ::= '^' partial
-qualifier ::= ( '-' pre )? ( '+' build )?
-pre ::= parts
-build ::= parts
-parts ::= part ( '.' part ) *
-part ::= nr | [-0-9A-Za-z]+
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/semver.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/semver.js
deleted file mode 100644
index 5f1a3c5c..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/semver/semver.js
+++ /dev/null
@@ -1,1203 +0,0 @@
-exports = module.exports = SemVer;
-
-// The debug function is excluded entirely from the minified version.
-/* nomin */ var debug;
-/* nomin */ if (typeof process === 'object' &&
- /* nomin */ process.env &&
- /* nomin */ process.env.NODE_DEBUG &&
- /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG))
- /* nomin */ debug = function() {
- /* nomin */ var args = Array.prototype.slice.call(arguments, 0);
- /* nomin */ args.unshift('SEMVER');
- /* nomin */ console.log.apply(console, args);
- /* nomin */ };
-/* nomin */ else
- /* nomin */ debug = function() {};
-
-// Note: this is the semver.org version of the spec that it implements
-// Not necessarily the package version of this code.
-exports.SEMVER_SPEC_VERSION = '2.0.0';
-
-var MAX_LENGTH = 256;
-var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
-
-// The actual regexps go on exports.re
-var re = exports.re = [];
-var src = exports.src = [];
-var R = 0;
-
-// The following Regular Expressions can be used for tokenizing,
-// validating, and parsing SemVer version strings.
-
-// ## Numeric Identifier
-// A single `0`, or a non-zero digit followed by zero or more digits.
-
-var NUMERICIDENTIFIER = R++;
-src[NUMERICIDENTIFIER] = '0|[1-9]\\d*';
-var NUMERICIDENTIFIERLOOSE = R++;
-src[NUMERICIDENTIFIERLOOSE] = '[0-9]+';
-
-
-// ## Non-numeric Identifier
-// Zero or more digits, followed by a letter or hyphen, and then zero or
-// more letters, digits, or hyphens.
-
-var NONNUMERICIDENTIFIER = R++;
-src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*';
-
-
-// ## Main Version
-// Three dot-separated numeric identifiers.
-
-var MAINVERSION = R++;
-src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')\\.' +
- '(' + src[NUMERICIDENTIFIER] + ')';
-
-var MAINVERSIONLOOSE = R++;
-src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
- '(' + src[NUMERICIDENTIFIERLOOSE] + ')';
-
-// ## Pre-release Version Identifier
-// A numeric identifier, or a non-numeric identifier.
-
-var PRERELEASEIDENTIFIER = R++;
-src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-var PRERELEASEIDENTIFIERLOOSE = R++;
-src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
- '|' + src[NONNUMERICIDENTIFIER] + ')';
-
-
-// ## Pre-release Version
-// Hyphen, followed by one or more dot-separated pre-release version
-// identifiers.
-
-var PRERELEASE = R++;
-src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
- '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))';
-
-var PRERELEASELOOSE = R++;
-src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
- '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))';
-
-// ## Build Metadata Identifier
-// Any combination of digits, letters, or hyphens.
-
-var BUILDIDENTIFIER = R++;
-src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+';
-
-// ## Build Metadata
-// Plus sign, followed by one or more period-separated build metadata
-// identifiers.
-
-var BUILD = R++;
-src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
- '(?:\\.' + src[BUILDIDENTIFIER] + ')*))';
-
-
-// ## Full Version String
-// A main version, followed optionally by a pre-release version and
-// build metadata.
-
-// Note that the only major, minor, patch, and pre-release sections of
-// the version string are capturing groups. The build metadata is not a
-// capturing group, because it should not ever be used in version
-// comparison.
-
-var FULL = R++;
-var FULLPLAIN = 'v?' + src[MAINVERSION] +
- src[PRERELEASE] + '?' +
- src[BUILD] + '?';
-
-src[FULL] = '^' + FULLPLAIN + '$';
-
-// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
-// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
-// common in the npm registry.
-var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
- src[PRERELEASELOOSE] + '?' +
- src[BUILD] + '?';
-
-var LOOSE = R++;
-src[LOOSE] = '^' + LOOSEPLAIN + '$';
-
-var GTLT = R++;
-src[GTLT] = '((?:<|>)?=?)';
-
-// Something like "2.*" or "1.2.x".
-// Note that "x.x" is a valid xRange identifer, meaning "any version"
-// Only the first item is strictly required.
-var XRANGEIDENTIFIERLOOSE = R++;
-src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*';
-var XRANGEIDENTIFIER = R++;
-src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*';
-
-var XRANGEPLAIN = R++;
-src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
- '(?:' + src[PRERELEASE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGEPLAINLOOSE = R++;
-src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
- '(?:' + src[PRERELEASELOOSE] + ')?' +
- src[BUILD] + '?' +
- ')?)?';
-
-var XRANGE = R++;
-src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$';
-var XRANGELOOSE = R++;
-src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$';
-
-// Tilde ranges.
-// Meaning is "reasonably at or greater than"
-var LONETILDE = R++;
-src[LONETILDE] = '(?:~>?)';
-
-var TILDETRIM = R++;
-src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+';
-re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g');
-var tildeTrimReplace = '$1~';
-
-var TILDE = R++;
-src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$';
-var TILDELOOSE = R++;
-src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$';
-
-// Caret ranges.
-// Meaning is "at least and backwards compatible with"
-var LONECARET = R++;
-src[LONECARET] = '(?:\\^)';
-
-var CARETTRIM = R++;
-src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+';
-re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g');
-var caretTrimReplace = '$1^';
-
-var CARET = R++;
-src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$';
-var CARETLOOSE = R++;
-src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$';
-
-// A simple gt/lt/eq thing, or just "" to indicate "any version"
-var COMPARATORLOOSE = R++;
-src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$';
-var COMPARATOR = R++;
-src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$';
-
-
-// An expression to strip any whitespace between the gtlt and the thing
-// it modifies, so that `> 1.2.3` ==> `>1.2.3`
-var COMPARATORTRIM = R++;
-src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
- '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')';
-
-// this one has to use the /g flag
-re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g');
-var comparatorTrimReplace = '$1$2$3';
-
-
-// Something like `1.2.3 - 1.2.4`
-// Note that these all use the loose form, because they'll be
-// checked against either the strict or loose comparator form
-// later.
-var HYPHENRANGE = R++;
-src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAIN] + ')' +
- '\\s*$';
-
-var HYPHENRANGELOOSE = R++;
-src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s+-\\s+' +
- '(' + src[XRANGEPLAINLOOSE] + ')' +
- '\\s*$';
-
-// Star ranges basically just allow anything at all.
-var STAR = R++;
-src[STAR] = '(<|>)?=?\\s*\\*';
-
-// Compile to actual regexp objects.
-// All are flag-free, unless they were created above with a flag.
-for (var i = 0; i < R; i++) {
- debug(i, src[i]);
- if (!re[i])
- re[i] = new RegExp(src[i]);
-}
-
-exports.parse = parse;
-function parse(version, loose) {
- if (version instanceof SemVer)
- return version;
-
- if (typeof version !== 'string')
- return null;
-
- if (version.length > MAX_LENGTH)
- return null;
-
- var r = loose ? re[LOOSE] : re[FULL];
- if (!r.test(version))
- return null;
-
- try {
- return new SemVer(version, loose);
- } catch (er) {
- return null;
- }
-}
-
-exports.valid = valid;
-function valid(version, loose) {
- var v = parse(version, loose);
- return v ? v.version : null;
-}
-
-
-exports.clean = clean;
-function clean(version, loose) {
- var s = parse(version.trim().replace(/^[=v]+/, ''), loose);
- return s ? s.version : null;
-}
-
-exports.SemVer = SemVer;
-
-function SemVer(version, loose) {
- if (version instanceof SemVer) {
- if (version.loose === loose)
- return version;
- else
- version = version.version;
- } else if (typeof version !== 'string') {
- throw new TypeError('Invalid Version: ' + version);
- }
-
- if (version.length > MAX_LENGTH)
- throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
-
- if (!(this instanceof SemVer))
- return new SemVer(version, loose);
-
- debug('SemVer', version, loose);
- this.loose = loose;
- var m = version.trim().match(loose ? re[LOOSE] : re[FULL]);
-
- if (!m)
- throw new TypeError('Invalid Version: ' + version);
-
- this.raw = version;
-
- // these are actually numbers
- this.major = +m[1];
- this.minor = +m[2];
- this.patch = +m[3];
-
- if (this.major > MAX_SAFE_INTEGER || this.major < 0)
- throw new TypeError('Invalid major version')
-
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0)
- throw new TypeError('Invalid minor version')
-
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0)
- throw new TypeError('Invalid patch version')
-
- // numberify any prerelease numeric ids
- if (!m[4])
- this.prerelease = [];
- else
- this.prerelease = m[4].split('.').map(function(id) {
- if (/^[0-9]+$/.test(id)) {
- var num = +id;
- if (num >= 0 && num < MAX_SAFE_INTEGER)
- return num;
- }
- return id;
- });
-
- this.build = m[5] ? m[5].split('.') : [];
- this.format();
-}
-
-SemVer.prototype.format = function() {
- this.version = this.major + '.' + this.minor + '.' + this.patch;
- if (this.prerelease.length)
- this.version += '-' + this.prerelease.join('.');
- return this.version;
-};
-
-SemVer.prototype.toString = function() {
- return this.version;
-};
-
-SemVer.prototype.compare = function(other) {
- debug('SemVer.compare', this.version, this.loose, other);
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return this.compareMain(other) || this.comparePre(other);
-};
-
-SemVer.prototype.compareMain = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- return compareIdentifiers(this.major, other.major) ||
- compareIdentifiers(this.minor, other.minor) ||
- compareIdentifiers(this.patch, other.patch);
-};
-
-SemVer.prototype.comparePre = function(other) {
- if (!(other instanceof SemVer))
- other = new SemVer(other, this.loose);
-
- // NOT having a prerelease is > having one
- if (this.prerelease.length && !other.prerelease.length)
- return -1;
- else if (!this.prerelease.length && other.prerelease.length)
- return 1;
- else if (!this.prerelease.length && !other.prerelease.length)
- return 0;
-
- var i = 0;
- do {
- var a = this.prerelease[i];
- var b = other.prerelease[i];
- debug('prerelease compare', i, a, b);
- if (a === undefined && b === undefined)
- return 0;
- else if (b === undefined)
- return 1;
- else if (a === undefined)
- return -1;
- else if (a === b)
- continue;
- else
- return compareIdentifiers(a, b);
- } while (++i);
-};
-
-// preminor will bump the version up to the next minor release, and immediately
-// down to pre-release. premajor and prepatch work the same way.
-SemVer.prototype.inc = function(release, identifier) {
- switch (release) {
- case 'premajor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor = 0;
- this.major++;
- this.inc('pre', identifier);
- break;
- case 'preminor':
- this.prerelease.length = 0;
- this.patch = 0;
- this.minor++;
- this.inc('pre', identifier);
- break;
- case 'prepatch':
- // If this is already a prerelease, it will bump to the next version
- // drop any prereleases that might already exist, since they are not
- // relevant at this point.
- this.prerelease.length = 0;
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
- // If the input is a non-prerelease version, this acts the same as
- // prepatch.
- case 'prerelease':
- if (this.prerelease.length === 0)
- this.inc('patch', identifier);
- this.inc('pre', identifier);
- break;
-
- case 'major':
- // If this is a pre-major version, bump up to the same major version.
- // Otherwise increment major.
- // 1.0.0-5 bumps to 1.0.0
- // 1.1.0 bumps to 2.0.0
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0)
- this.major++;
- this.minor = 0;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'minor':
- // If this is a pre-minor version, bump up to the same minor version.
- // Otherwise increment minor.
- // 1.2.0-5 bumps to 1.2.0
- // 1.2.1 bumps to 1.3.0
- if (this.patch !== 0 || this.prerelease.length === 0)
- this.minor++;
- this.patch = 0;
- this.prerelease = [];
- break;
- case 'patch':
- // If this is not a pre-release version, it will increment the patch.
- // If it is a pre-release it will bump up to the same patch version.
- // 1.2.0-5 patches to 1.2.0
- // 1.2.0 patches to 1.2.1
- if (this.prerelease.length === 0)
- this.patch++;
- this.prerelease = [];
- break;
- // This probably shouldn't be used publicly.
- // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
- case 'pre':
- if (this.prerelease.length === 0)
- this.prerelease = [0];
- else {
- var i = this.prerelease.length;
- while (--i >= 0) {
- if (typeof this.prerelease[i] === 'number') {
- this.prerelease[i]++;
- i = -2;
- }
- }
- if (i === -1) // didn't increment anything
- this.prerelease.push(0);
- }
- if (identifier) {
- // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
- // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
- if (this.prerelease[0] === identifier) {
- if (isNaN(this.prerelease[1]))
- this.prerelease = [identifier, 0];
- } else
- this.prerelease = [identifier, 0];
- }
- break;
-
- default:
- throw new Error('invalid increment argument: ' + release);
- }
- this.format();
- this.raw = this.version;
- return this;
-};
-
-exports.inc = inc;
-function inc(version, release, loose, identifier) {
- if (typeof(loose) === 'string') {
- identifier = loose;
- loose = undefined;
- }
-
- try {
- return new SemVer(version, loose).inc(release, identifier).version;
- } catch (er) {
- return null;
- }
-}
-
-exports.diff = diff;
-function diff(version1, version2) {
- if (eq(version1, version2)) {
- return null;
- } else {
- var v1 = parse(version1);
- var v2 = parse(version2);
- if (v1.prerelease.length || v2.prerelease.length) {
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return 'pre'+key;
- }
- }
- }
- return 'prerelease';
- }
- for (var key in v1) {
- if (key === 'major' || key === 'minor' || key === 'patch') {
- if (v1[key] !== v2[key]) {
- return key;
- }
- }
- }
- }
-}
-
-exports.compareIdentifiers = compareIdentifiers;
-
-var numeric = /^[0-9]+$/;
-function compareIdentifiers(a, b) {
- var anum = numeric.test(a);
- var bnum = numeric.test(b);
-
- if (anum && bnum) {
- a = +a;
- b = +b;
- }
-
- return (anum && !bnum) ? -1 :
- (bnum && !anum) ? 1 :
- a < b ? -1 :
- a > b ? 1 :
- 0;
-}
-
-exports.rcompareIdentifiers = rcompareIdentifiers;
-function rcompareIdentifiers(a, b) {
- return compareIdentifiers(b, a);
-}
-
-exports.major = major;
-function major(a, loose) {
- return new SemVer(a, loose).major;
-}
-
-exports.minor = minor;
-function minor(a, loose) {
- return new SemVer(a, loose).minor;
-}
-
-exports.patch = patch;
-function patch(a, loose) {
- return new SemVer(a, loose).patch;
-}
-
-exports.compare = compare;
-function compare(a, b, loose) {
- return new SemVer(a, loose).compare(b);
-}
-
-exports.compareLoose = compareLoose;
-function compareLoose(a, b) {
- return compare(a, b, true);
-}
-
-exports.rcompare = rcompare;
-function rcompare(a, b, loose) {
- return compare(b, a, loose);
-}
-
-exports.sort = sort;
-function sort(list, loose) {
- return list.sort(function(a, b) {
- return exports.compare(a, b, loose);
- });
-}
-
-exports.rsort = rsort;
-function rsort(list, loose) {
- return list.sort(function(a, b) {
- return exports.rcompare(a, b, loose);
- });
-}
-
-exports.gt = gt;
-function gt(a, b, loose) {
- return compare(a, b, loose) > 0;
-}
-
-exports.lt = lt;
-function lt(a, b, loose) {
- return compare(a, b, loose) < 0;
-}
-
-exports.eq = eq;
-function eq(a, b, loose) {
- return compare(a, b, loose) === 0;
-}
-
-exports.neq = neq;
-function neq(a, b, loose) {
- return compare(a, b, loose) !== 0;
-}
-
-exports.gte = gte;
-function gte(a, b, loose) {
- return compare(a, b, loose) >= 0;
-}
-
-exports.lte = lte;
-function lte(a, b, loose) {
- return compare(a, b, loose) <= 0;
-}
-
-exports.cmp = cmp;
-function cmp(a, op, b, loose) {
- var ret;
- switch (op) {
- case '===':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a === b;
- break;
- case '!==':
- if (typeof a === 'object') a = a.version;
- if (typeof b === 'object') b = b.version;
- ret = a !== b;
- break;
- case '': case '=': case '==': ret = eq(a, b, loose); break;
- case '!=': ret = neq(a, b, loose); break;
- case '>': ret = gt(a, b, loose); break;
- case '>=': ret = gte(a, b, loose); break;
- case '<': ret = lt(a, b, loose); break;
- case '<=': ret = lte(a, b, loose); break;
- default: throw new TypeError('Invalid operator: ' + op);
- }
- return ret;
-}
-
-exports.Comparator = Comparator;
-function Comparator(comp, loose) {
- if (comp instanceof Comparator) {
- if (comp.loose === loose)
- return comp;
- else
- comp = comp.value;
- }
-
- if (!(this instanceof Comparator))
- return new Comparator(comp, loose);
-
- debug('comparator', comp, loose);
- this.loose = loose;
- this.parse(comp);
-
- if (this.semver === ANY)
- this.value = '';
- else
- this.value = this.operator + this.semver.version;
-
- debug('comp', this);
-}
-
-var ANY = {};
-Comparator.prototype.parse = function(comp) {
- var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var m = comp.match(r);
-
- if (!m)
- throw new TypeError('Invalid comparator: ' + comp);
-
- this.operator = m[1];
- if (this.operator === '=')
- this.operator = '';
-
- // if it literally is just '>' or '' then allow anything.
- if (!m[2])
- this.semver = ANY;
- else
- this.semver = new SemVer(m[2], this.loose);
-};
-
-Comparator.prototype.toString = function() {
- return this.value;
-};
-
-Comparator.prototype.test = function(version) {
- debug('Comparator.test', version, this.loose);
-
- if (this.semver === ANY)
- return true;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- return cmp(version, this.operator, this.semver, this.loose);
-};
-
-
-exports.Range = Range;
-function Range(range, loose) {
- if ((range instanceof Range) && range.loose === loose)
- return range;
-
- if (!(this instanceof Range))
- return new Range(range, loose);
-
- this.loose = loose;
-
- // First, split based on boolean or ||
- this.raw = range;
- this.set = range.split(/\s*\|\|\s*/).map(function(range) {
- return this.parseRange(range.trim());
- }, this).filter(function(c) {
- // throw out any that are not relevant for whatever reason
- return c.length;
- });
-
- if (!this.set.length) {
- throw new TypeError('Invalid SemVer Range: ' + range);
- }
-
- this.format();
-}
-
-Range.prototype.format = function() {
- this.range = this.set.map(function(comps) {
- return comps.join(' ').trim();
- }).join('||').trim();
- return this.range;
-};
-
-Range.prototype.toString = function() {
- return this.range;
-};
-
-Range.prototype.parseRange = function(range) {
- var loose = this.loose;
- range = range.trim();
- debug('range', range, loose);
- // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
- var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE];
- range = range.replace(hr, hyphenReplace);
- debug('hyphen replace', range);
- // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
- range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace);
- debug('comparator trim', range, re[COMPARATORTRIM]);
-
- // `~ 1.2.3` => `~1.2.3`
- range = range.replace(re[TILDETRIM], tildeTrimReplace);
-
- // `^ 1.2.3` => `^1.2.3`
- range = range.replace(re[CARETTRIM], caretTrimReplace);
-
- // normalize spaces
- range = range.split(/\s+/).join(' ');
-
- // At this point, the range is completely trimmed and
- // ready to be split into comparators.
-
- var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR];
- var set = range.split(' ').map(function(comp) {
- return parseComparator(comp, loose);
- }).join(' ').split(/\s+/);
- if (this.loose) {
- // in loose mode, throw out any that are not valid comparators
- set = set.filter(function(comp) {
- return !!comp.match(compRe);
- });
- }
- set = set.map(function(comp) {
- return new Comparator(comp, loose);
- });
-
- return set;
-};
-
-// Mostly just for testing and legacy API reasons
-exports.toComparators = toComparators;
-function toComparators(range, loose) {
- return new Range(range, loose).set.map(function(comp) {
- return comp.map(function(c) {
- return c.value;
- }).join(' ').trim().split(' ');
- });
-}
-
-// comprised of xranges, tildes, stars, and gtlt's at this point.
-// already replaced the hyphen ranges
-// turn into a set of JUST comparators.
-function parseComparator(comp, loose) {
- debug('comp', comp);
- comp = replaceCarets(comp, loose);
- debug('caret', comp);
- comp = replaceTildes(comp, loose);
- debug('tildes', comp);
- comp = replaceXRanges(comp, loose);
- debug('xrange', comp);
- comp = replaceStars(comp, loose);
- debug('stars', comp);
- return comp;
-}
-
-function isX(id) {
- return !id || id.toLowerCase() === 'x' || id === '*';
-}
-
-// ~, ~> --> * (any, kinda silly)
-// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
-// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
-// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
-// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
-// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
-function replaceTildes(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceTilde(comp, loose);
- }).join(' ');
-}
-
-function replaceTilde(comp, loose) {
- var r = loose ? re[TILDELOOSE] : re[TILDE];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('tilde', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p))
- // ~1.2 == >=1.2.0 <1.3.0
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else if (pr) {
- debug('replaceTilde pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- // ~1.2.3 == >=1.2.3 <1.3.0
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
-
- debug('tilde return', ret);
- return ret;
- });
-}
-
-// ^ --> * (any, kinda silly)
-// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
-// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
-// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
-// ^1.2.3 --> >=1.2.3 <2.0.0
-// ^1.2.0 --> >=1.2.0 <2.0.0
-function replaceCarets(comp, loose) {
- return comp.trim().split(/\s+/).map(function(comp) {
- return replaceCaret(comp, loose);
- }).join(' ');
-}
-
-function replaceCaret(comp, loose) {
- debug('caret', comp, loose);
- var r = loose ? re[CARETLOOSE] : re[CARET];
- return comp.replace(r, function(_, M, m, p, pr) {
- debug('caret', comp, _, M, m, p, pr);
- var ret;
-
- if (isX(M))
- ret = '';
- else if (isX(m))
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- else if (isX(p)) {
- if (M === '0')
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- else
- ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0';
- } else if (pr) {
- debug('replaceCaret pr', pr);
- if (pr.charAt(0) !== '-')
- pr = '-' + pr;
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p + pr +
- ' <' + (+M + 1) + '.0.0';
- } else {
- debug('no pr');
- if (M === '0') {
- if (m === '0')
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + m + '.' + (+p + 1);
- else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + M + '.' + (+m + 1) + '.0';
- } else
- ret = '>=' + M + '.' + m + '.' + p +
- ' <' + (+M + 1) + '.0.0';
- }
-
- debug('caret return', ret);
- return ret;
- });
-}
-
-function replaceXRanges(comp, loose) {
- debug('replaceXRanges', comp, loose);
- return comp.split(/\s+/).map(function(comp) {
- return replaceXRange(comp, loose);
- }).join(' ');
-}
-
-function replaceXRange(comp, loose) {
- comp = comp.trim();
- var r = loose ? re[XRANGELOOSE] : re[XRANGE];
- return comp.replace(r, function(ret, gtlt, M, m, p, pr) {
- debug('xRange', comp, ret, gtlt, M, m, p, pr);
- var xM = isX(M);
- var xm = xM || isX(m);
- var xp = xm || isX(p);
- var anyX = xp;
-
- if (gtlt === '=' && anyX)
- gtlt = '';
-
- if (xM) {
- if (gtlt === '>' || gtlt === '<') {
- // nothing is allowed
- ret = '<0.0.0';
- } else {
- // nothing is forbidden
- ret = '*';
- }
- } else if (gtlt && anyX) {
- // replace X with 0
- if (xm)
- m = 0;
- if (xp)
- p = 0;
-
- if (gtlt === '>') {
- // >1 => >=2.0.0
- // >1.2 => >=1.3.0
- // >1.2.3 => >= 1.2.4
- gtlt = '>=';
- if (xm) {
- M = +M + 1;
- m = 0;
- p = 0;
- } else if (xp) {
- m = +m + 1;
- p = 0;
- }
- } else if (gtlt === '<=') {
- // <=0.7.x is actually <0.8.0, since any 0.7.x should
- // pass. Similarly, <=7.x is actually <8.0.0, etc.
- gtlt = '<';
- if (xm)
- M = +M + 1;
- else
- m = +m + 1;
- }
-
- ret = gtlt + M + '.' + m + '.' + p;
- } else if (xm) {
- ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0';
- } else if (xp) {
- ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0';
- }
-
- debug('xRange return', ret);
-
- return ret;
- });
-}
-
-// Because * is AND-ed with everything else in the comparator,
-// and '' means "any version", just remove the *s entirely.
-function replaceStars(comp, loose) {
- debug('replaceStars', comp, loose);
- // Looseness is ignored here. star is always as loose as it gets!
- return comp.trim().replace(re[STAR], '');
-}
-
-// This function is passed to string.replace(re[HYPHENRANGE])
-// M, m, patch, prerelease, build
-// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
-// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
-// 1.2 - 3.4 => >=1.2.0 <3.5.0
-function hyphenReplace($0,
- from, fM, fm, fp, fpr, fb,
- to, tM, tm, tp, tpr, tb) {
-
- if (isX(fM))
- from = '';
- else if (isX(fm))
- from = '>=' + fM + '.0.0';
- else if (isX(fp))
- from = '>=' + fM + '.' + fm + '.0';
- else
- from = '>=' + from;
-
- if (isX(tM))
- to = '';
- else if (isX(tm))
- to = '<' + (+tM + 1) + '.0.0';
- else if (isX(tp))
- to = '<' + tM + '.' + (+tm + 1) + '.0';
- else if (tpr)
- to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr;
- else
- to = '<=' + to;
-
- return (from + ' ' + to).trim();
-}
-
-
-// if ANY of the sets match ALL of its comparators, then pass
-Range.prototype.test = function(version) {
- if (!version)
- return false;
-
- if (typeof version === 'string')
- version = new SemVer(version, this.loose);
-
- for (var i = 0; i < this.set.length; i++) {
- if (testSet(this.set[i], version))
- return true;
- }
- return false;
-};
-
-function testSet(set, version) {
- for (var i = 0; i < set.length; i++) {
- if (!set[i].test(version))
- return false;
- }
-
- if (version.prerelease.length) {
- // Find the set of versions that are allowed to have prereleases
- // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
- // That should allow `1.2.3-pr.2` to pass.
- // However, `1.2.4-alpha.notready` should NOT be allowed,
- // even though it's within the range set by the comparators.
- for (var i = 0; i < set.length; i++) {
- debug(set[i].semver);
- if (set[i].semver === ANY)
- continue;
-
- if (set[i].semver.prerelease.length > 0) {
- var allowed = set[i].semver;
- if (allowed.major === version.major &&
- allowed.minor === version.minor &&
- allowed.patch === version.patch)
- return true;
- }
- }
-
- // Version has a -pre, but it's not one of the ones we like.
- return false;
- }
-
- return true;
-}
-
-exports.satisfies = satisfies;
-function satisfies(version, range, loose) {
- try {
- range = new Range(range, loose);
- } catch (er) {
- return false;
- }
- return range.test(version);
-}
-
-exports.maxSatisfying = maxSatisfying;
-function maxSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return rcompare(a, b, loose);
- })[0] || null;
-}
-
-exports.minSatisfying = minSatisfying;
-function minSatisfying(versions, range, loose) {
- return versions.filter(function(version) {
- return satisfies(version, range, loose);
- }).sort(function(a, b) {
- return compare(a, b, loose);
- })[0] || null;
-}
-
-exports.validRange = validRange;
-function validRange(range, loose) {
- try {
- // Return '*' instead of '' so that truthiness works.
- // This will throw if it's invalid anyway
- return new Range(range, loose).range || '*';
- } catch (er) {
- return null;
- }
-}
-
-// Determine if version is less than all the versions possible in the range
-exports.ltr = ltr;
-function ltr(version, range, loose) {
- return outside(version, range, '<', loose);
-}
-
-// Determine if version is greater than all the versions possible in the range.
-exports.gtr = gtr;
-function gtr(version, range, loose) {
- return outside(version, range, '>', loose);
-}
-
-exports.outside = outside;
-function outside(version, range, hilo, loose) {
- version = new SemVer(version, loose);
- range = new Range(range, loose);
-
- var gtfn, ltefn, ltfn, comp, ecomp;
- switch (hilo) {
- case '>':
- gtfn = gt;
- ltefn = lte;
- ltfn = lt;
- comp = '>';
- ecomp = '>=';
- break;
- case '<':
- gtfn = lt;
- ltefn = gte;
- ltfn = gt;
- comp = '<';
- ecomp = '<=';
- break;
- default:
- throw new TypeError('Must provide a hilo val of "<" or ">"');
- }
-
- // If it satisifes the range it is not outside
- if (satisfies(version, range, loose)) {
- return false;
- }
-
- // From now on, variable terms are as if we're in "gtr" mode.
- // but note that everything is flipped for the "ltr" function.
-
- for (var i = 0; i < range.set.length; ++i) {
- var comparators = range.set[i];
-
- var high = null;
- var low = null;
-
- comparators.forEach(function(comparator) {
- if (comparator.semver === ANY) {
- comparator = new Comparator('>=0.0.0')
- }
- high = high || comparator;
- low = low || comparator;
- if (gtfn(comparator.semver, high.semver, loose)) {
- high = comparator;
- } else if (ltfn(comparator.semver, low.semver, loose)) {
- low = comparator;
- }
- });
-
- // If the edge version comparator has a operator then our version
- // isn't outside it
- if (high.operator === comp || high.operator === ecomp) {
- return false;
- }
-
- // If the lowest version comparator has an operator and our version
- // is less than it then it isn't higher than the range
- if ((!low.operator || low.operator === comp) &&
- ltefn(version, low.semver)) {
- return false;
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
- return false;
- }
- }
- return true;
-}
-
-exports.prerelease = prerelease;
-function prerelease(version, loose) {
- var parsed = parse(version, loose);
- return (parsed && parsed.prerelease.length) ? parsed.prerelease : null;
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore
deleted file mode 100644
index c167ad5b..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.*.swp
-node_modules
-examples/extract/
-test/tmp/
-test/fixtures/
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml
deleted file mode 100644
index fca8ef01..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-language: node_js
-node_js:
- - 0.10
- - 0.11
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE
deleted file mode 100644
index 019b7e40..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE
+++ /dev/null
@@ -1,12 +0,0 @@
-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/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/README.md b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/README.md
deleted file mode 100644
index cfda2ac1..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/README.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# node-tar
-
-Tar for Node.js.
-
-[![NPM](https://nodei.co/npm/tar.png)](https://nodei.co/npm/tar/)
-
-## API
-
-See `examples/` for usage examples.
-
-### var tar = require('tar')
-
-Returns an object with `.Pack`, `.Extract` and `.Parse` methods.
-
-### tar.Pack([properties])
-
-Returns a through stream. Use
-[fstream](https://npmjs.org/package/fstream) to write files into the
-pack stream and you will receive tar archive data from the pack
-stream.
-
-This only works with directories, it does not work with individual files.
-
-The optional `properties` object are used to set properties in the tar
-'Global Extended Header'. If the `fromBase` property is set to true,
-the tar will contain files relative to the path passed, and not with
-the path included.
-
-### tar.Extract([options])
-
-Returns a through stream. Write tar data to the stream and the files
-in the tarball will be extracted onto the filesystem.
-
-`options` can be:
-
-```js
-{
- path: '/path/to/extract/tar/into',
- strip: 0, // how many path segments to strip from the root when extracting
-}
-```
-
-`options` also get passed to the `fstream.Writer` instance that `tar`
-uses internally.
-
-### tar.Parse()
-
-Returns a writable stream. Write tar data to it and it will emit
-`entry` events for each entry parsed from the tarball. This is used by
-`tar.Extract`.
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js
deleted file mode 100644
index f6253a72..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js
+++ /dev/null
@@ -1,19 +0,0 @@
-var tar = require("../tar.js")
- , fs = require("fs")
-
-
-function onError(err) {
- console.error('An error occurred:', err)
-}
-
-function onEnd() {
- console.log('Extracted!')
-}
-
-var extractor = tar.Extract({path: __dirname + "/extract"})
- .on('error', onError)
- .on('end', onEnd);
-
-fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
- .on('error', onError)
- .pipe(extractor);
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js
deleted file mode 100644
index 039969ce..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js
+++ /dev/null
@@ -1,24 +0,0 @@
-var tar = require("../tar.js")
- , fstream = require("fstream")
- , fs = require("fs")
-
-var dirDest = fs.createWriteStream('dir.tar')
-
-
-function onError(err) {
- console.error('An error occurred:', err)
-}
-
-function onEnd() {
- console.log('Packed!')
-}
-
-var packer = tar.Pack({ noProprietary: true })
- .on('error', onError)
- .on('end', onEnd);
-
-// This must be a "directory"
-fstream.Reader({ path: __dirname, type: "Directory" })
- .on('error', onError)
- .pipe(packer)
- .pipe(dirDest)
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js
deleted file mode 100644
index 8d113ad3..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var tar = require("../tar.js")
- , fs = require("fs")
-
-fs.createReadStream(__dirname + "/../test/fixtures/c.tar")
- .pipe(tar.Parse())
- .on("extendedHeader", function (e) {
- console.error("extended pax header", e.props)
- e.on("end", function () {
- console.error("extended pax fields:", e.fields)
- })
- })
- .on("ignoredEntry", function (e) {
- console.error("ignoredEntry?!?", e.props)
- })
- .on("longLinkpath", function (e) {
- console.error("longLinkpath entry", e.props)
- e.on("end", function () {
- console.error("value=%j", e.body.toString())
- })
- })
- .on("longPath", function (e) {
- console.error("longPath entry", e.props)
- e.on("end", function () {
- console.error("value=%j", e.body.toString())
- })
- })
- .on("entry", function (e) {
- console.error("entry", e.props)
- e.on("data", function (c) {
- console.error(" >>>" + c.toString().replace(/\n/g, "\\n"))
- })
- e.on("end", function () {
- console.error(" <<<EOF")
- })
- })
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
deleted file mode 100644
index 6c1da237..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// just like the Entry class, but it buffers the contents
-//
-// XXX It would be good to set a maximum BufferEntry filesize,
-// since it eats up memory. In normal operation,
-// these are only for long filenames or link names, which are
-// rarely very big.
-
-module.exports = BufferEntry
-
-var inherits = require("inherits")
- , Entry = require("./entry.js")
-
-function BufferEntry () {
- Entry.apply(this, arguments)
- this._buffer = new Buffer(this.props.size)
- this._offset = 0
- this.body = ""
- this.on("end", function () {
- this.body = this._buffer.toString().slice(0, -1)
- })
-}
-
-inherits(BufferEntry, Entry)
-
-// collect the bytes as they come in.
-BufferEntry.prototype.write = function (c) {
- c.copy(this._buffer, this._offset)
- this._offset += c.length
- Entry.prototype.write.call(this, c)
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
deleted file mode 100644
index 8e09042d..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js
+++ /dev/null
@@ -1,169 +0,0 @@
-module.exports = EntryWriter
-
-var tar = require("../tar.js")
- , TarHeader = require("./header.js")
- , Entry = require("./entry.js")
- , inherits = require("inherits")
- , BlockStream = require("block-stream")
- , ExtendedHeaderWriter
- , Stream = require("stream").Stream
- , EOF = {}
-
-inherits(EntryWriter, Stream)
-
-function EntryWriter (props) {
- var me = this
-
- if (!(me instanceof EntryWriter)) {
- return new EntryWriter(props)
- }
-
- Stream.apply(this)
-
- me.writable = true
- me.readable = true
-
- me._stream = new BlockStream(512)
-
- me._stream.on("data", function (c) {
- me.emit("data", c)
- })
-
- me._stream.on("drain", function () {
- me.emit("drain")
- })
-
- me._stream.on("end", function () {
- me.emit("end")
- me.emit("close")
- })
-
- me.props = props
- if (props.type === "Directory") {
- props.size = 0
- }
- props.ustar = "ustar\0"
- props.ustarver = "00"
- me.path = props.path
-
- me._buffer = []
- me._didHeader = false
- me._meta = false
-
- me.on("pipe", function () {
- me._process()
- })
-}
-
-EntryWriter.prototype.write = function (c) {
- // console.error(".. ew write")
- if (this._ended) return this.emit("error", new Error("write after end"))
- this._buffer.push(c)
- this._process()
- this._needDrain = this._buffer.length > 0
- return !this._needDrain
-}
-
-EntryWriter.prototype.end = function (c) {
- // console.error(".. ew end")
- if (c) this._buffer.push(c)
- this._buffer.push(EOF)
- this._ended = true
- this._process()
- this._needDrain = this._buffer.length > 0
-}
-
-EntryWriter.prototype.pause = function () {
- // console.error(".. ew pause")
- this._paused = true
- this.emit("pause")
-}
-
-EntryWriter.prototype.resume = function () {
- // console.error(".. ew resume")
- this._paused = false
- this.emit("resume")
- this._process()
-}
-
-EntryWriter.prototype.add = function (entry) {
- // console.error(".. ew add")
- if (!this.parent) return this.emit("error", new Error("no parent"))
-
- // make sure that the _header and such is emitted, and clear out
- // the _currentEntry link on the parent.
- if (!this._ended) this.end()
-
- return this.parent.add(entry)
-}
-
-EntryWriter.prototype._header = function () {
- // console.error(".. ew header")
- if (this._didHeader) return
- this._didHeader = true
-
- var headerBlock = TarHeader.encode(this.props)
-
- if (this.props.needExtended && !this._meta) {
- var me = this
-
- ExtendedHeaderWriter = ExtendedHeaderWriter ||
- require("./extended-header-writer.js")
-
- ExtendedHeaderWriter(this.props)
- .on("data", function (c) {
- me.emit("data", c)
- })
- .on("error", function (er) {
- me.emit("error", er)
- })
- .end()
- }
-
- // console.error(".. .. ew headerBlock emitting")
- this.emit("data", headerBlock)
- this.emit("header")
-}
-
-EntryWriter.prototype._process = function () {
- // console.error(".. .. ew process")
- if (!this._didHeader && !this._meta) {
- this._header()
- }
-
- if (this._paused || this._processing) {
- // console.error(".. .. .. paused=%j, processing=%j", this._paused, this._processing)
- return
- }
-
- this._processing = true
-
- var buf = this._buffer
- for (var i = 0; i < buf.length; i ++) {
- // console.error(".. .. .. i=%d", i)
-
- var c = buf[i]
-
- if (c === EOF) this._stream.end()
- else this._stream.write(c)
-
- if (this._paused) {
- // console.error(".. .. .. paused mid-emission")
- this._processing = false
- if (i < buf.length) {
- this._needDrain = true
- this._buffer = buf.slice(i + 1)
- }
- return
- }
- }
-
- // console.error(".. .. .. emitted")
- this._buffer.length = 0
- this._processing = false
-
- // console.error(".. .. .. emitting drain")
- this.emit("drain")
-}
-
-EntryWriter.prototype.destroy = function () {}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js
deleted file mode 100644
index 5f5dd3c2..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js
+++ /dev/null
@@ -1,220 +0,0 @@
-// A passthrough read/write stream that sets its properties
-// based on a header, extendedHeader, and globalHeader
-//
-// Can be either a file system object of some sort, or
-// a pax/ustar metadata entry.
-
-module.exports = Entry
-
-var TarHeader = require("./header.js")
- , tar = require("../tar")
- , assert = require("assert").ok
- , Stream = require("stream").Stream
- , inherits = require("inherits")
- , fstream = require("fstream").Abstract
-
-function Entry (header, extended, global) {
- Stream.call(this)
- this.readable = true
- this.writable = true
-
- this._needDrain = false
- this._paused = false
- this._reading = false
- this._ending = false
- this._ended = false
- this._remaining = 0
- this._abort = false
- this._queue = []
- this._index = 0
- this._queueLen = 0
-
- this._read = this._read.bind(this)
-
- this.props = {}
- this._header = header
- this._extended = extended || {}
-
- // globals can change throughout the course of
- // a file parse operation. Freeze it at its current state.
- this._global = {}
- var me = this
- Object.keys(global || {}).forEach(function (g) {
- me._global[g] = global[g]
- })
-
- this._setProps()
-}
-
-inherits(Entry, Stream)
-
-Entry.prototype.write = function (c) {
- if (this._ending) this.error("write() after end()", null, true)
- if (this._remaining === 0) {
- this.error("invalid bytes past eof")
- }
-
- // often we'll get a bunch of \0 at the end of the last write,
- // since chunks will always be 512 bytes when reading a tarball.
- if (c.length > this._remaining) {
- c = c.slice(0, this._remaining)
- }
- this._remaining -= c.length
-
- // put it on the stack.
- var ql = this._queueLen
- this._queue.push(c)
- this._queueLen ++
-
- this._read()
-
- // either paused, or buffered
- if (this._paused || ql > 0) {
- this._needDrain = true
- return false
- }
-
- return true
-}
-
-Entry.prototype.end = function (c) {
- if (c) this.write(c)
- this._ending = true
- this._read()
-}
-
-Entry.prototype.pause = function () {
- this._paused = true
- this.emit("pause")
-}
-
-Entry.prototype.resume = function () {
- // console.error(" Tar Entry resume", this.path)
- this.emit("resume")
- this._paused = false
- this._read()
- return this._queueLen - this._index > 1
-}
-
- // This is bound to the instance
-Entry.prototype._read = function () {
- // console.error(" Tar Entry _read", this.path)
-
- if (this._paused || this._reading || this._ended) return
-
- // set this flag so that event handlers don't inadvertently
- // get multiple _read() calls running.
- this._reading = true
-
- // have any data to emit?
- while (this._index < this._queueLen && !this._paused) {
- var chunk = this._queue[this._index ++]
- this.emit("data", chunk)
- }
-
- // check if we're drained
- if (this._index >= this._queueLen) {
- this._queue.length = this._queueLen = this._index = 0
- if (this._needDrain) {
- this._needDrain = false
- this.emit("drain")
- }
- if (this._ending) {
- this._ended = true
- this.emit("end")
- }
- }
-
- // if the queue gets too big, then pluck off whatever we can.
- // this should be fairly rare.
- var mql = this._maxQueueLen
- if (this._queueLen > mql && this._index > 0) {
- mql = Math.min(this._index, mql)
- this._index -= mql
- this._queueLen -= mql
- this._queue = this._queue.slice(mql)
- }
-
- this._reading = false
-}
-
-Entry.prototype._setProps = function () {
- // props = extended->global->header->{}
- var header = this._header
- , extended = this._extended
- , global = this._global
- , props = this.props
-
- // first get the values from the normal header.
- var fields = tar.fields
- for (var f = 0; fields[f] !== null; f ++) {
- var field = fields[f]
- , val = header[field]
- if (typeof val !== "undefined") props[field] = val
- }
-
- // next, the global header for this file.
- // numeric values, etc, will have already been parsed.
- ;[global, extended].forEach(function (p) {
- Object.keys(p).forEach(function (f) {
- if (typeof p[f] !== "undefined") props[f] = p[f]
- })
- })
-
- // no nulls allowed in path or linkpath
- ;["path", "linkpath"].forEach(function (p) {
- if (props.hasOwnProperty(p)) {
- props[p] = props[p].split("\0")[0]
- }
- })
-
-
- // set date fields to be a proper date
- ;["mtime", "ctime", "atime"].forEach(function (p) {
- if (props.hasOwnProperty(p)) {
- props[p] = new Date(props[p] * 1000)
- }
- })
-
- // set the type so that we know what kind of file to create
- var type
- switch (tar.types[props.type]) {
- case "OldFile":
- case "ContiguousFile":
- type = "File"
- break
-
- case "GNUDumpDir":
- type = "Directory"
- break
-
- case undefined:
- type = "Unknown"
- break
-
- case "Link":
- case "SymbolicLink":
- case "CharacterDevice":
- case "BlockDevice":
- case "Directory":
- case "FIFO":
- default:
- type = tar.types[props.type]
- }
-
- this.type = type
- this.path = props.path
- this.size = props.size
-
- // size is special, since it signals when the file needs to end.
- this._remaining = props.size
-}
-
-// the parser may not call write if _abort is true.
-// useful for skipping data from some files quickly.
-Entry.prototype.abort = function(){
- this._abort = true
-}
-
-Entry.prototype.warn = fstream.warn
-Entry.prototype.error = fstream.error
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
deleted file mode 100644
index 1728c458..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js
+++ /dev/null
@@ -1,191 +0,0 @@
-
-module.exports = ExtendedHeaderWriter
-
-var inherits = require("inherits")
- , EntryWriter = require("./entry-writer.js")
-
-inherits(ExtendedHeaderWriter, EntryWriter)
-
-var tar = require("../tar.js")
- , path = require("path")
- , TarHeader = require("./header.js")
-
-// props is the props of the thing we need to write an
-// extended header for.
-// Don't be shy with it. Just encode everything.
-function ExtendedHeaderWriter (props) {
- // console.error(">> ehw ctor")
- var me = this
-
- if (!(me instanceof ExtendedHeaderWriter)) {
- return new ExtendedHeaderWriter(props)
- }
-
- me.fields = props
-
- var p =
- { path : ("PaxHeader" + path.join("/", props.path || ""))
- .replace(/\\/g, "/").substr(0, 100)
- , mode : props.mode || 0666
- , uid : props.uid || 0
- , gid : props.gid || 0
- , size : 0 // will be set later
- , mtime : props.mtime || Date.now() / 1000
- , type : "x"
- , linkpath : ""
- , ustar : "ustar\0"
- , ustarver : "00"
- , uname : props.uname || ""
- , gname : props.gname || ""
- , devmaj : props.devmaj || 0
- , devmin : props.devmin || 0
- }
-
-
- EntryWriter.call(me, p)
- // console.error(">> ehw props", me.props)
- me.props = p
-
- me._meta = true
-}
-
-ExtendedHeaderWriter.prototype.end = function () {
- // console.error(">> ehw end")
- var me = this
-
- if (me._ended) return
- me._ended = true
-
- me._encodeFields()
-
- if (me.props.size === 0) {
- // nothing to write!
- me._ready = true
- me._stream.end()
- return
- }
-
- me._stream.write(TarHeader.encode(me.props))
- me.body.forEach(function (l) {
- me._stream.write(l)
- })
- me._ready = true
-
- // console.error(">> ehw _process calling end()", me.props)
- this._stream.end()
-}
-
-ExtendedHeaderWriter.prototype._encodeFields = function () {
- // console.error(">> ehw _encodeFields")
- this.body = []
- if (this.fields.prefix) {
- this.fields.path = this.fields.prefix + "/" + this.fields.path
- this.fields.prefix = ""
- }
- encodeFields(this.fields, "", this.body, this.fields.noProprietary)
- var me = this
- this.body.forEach(function (l) {
- me.props.size += l.length
- })
-}
-
-function encodeFields (fields, prefix, body, nop) {
- // console.error(">> >> ehw encodeFields")
- // "%d %s=%s\n", <length>, <keyword>, <value>
- // The length is a decimal number, and includes itself and the \n
- // Numeric values are decimal strings.
-
- Object.keys(fields).forEach(function (k) {
- var val = fields[k]
- , numeric = tar.numeric[k]
-
- if (prefix) k = prefix + "." + k
-
- // already including NODETAR.type, don't need File=true also
- if (k === fields.type && val === true) return
-
- switch (k) {
- // don't include anything that's always handled just fine
- // in the normal header, or only meaningful in the context
- // of nodetar
- case "mode":
- case "cksum":
- case "ustar":
- case "ustarver":
- case "prefix":
- case "basename":
- case "dirname":
- case "needExtended":
- case "block":
- case "filter":
- return
-
- case "rdev":
- if (val === 0) return
- break
-
- case "nlink":
- case "dev": // Truly a hero among men, Creator of Star!
- case "ino": // Speak his name with reverent awe! It is:
- k = "SCHILY." + k
- break
-
- default: break
- }
-
- if (val && typeof val === "object" &&
- !Buffer.isBuffer(val)) encodeFields(val, k, body, nop)
- else if (val === null || val === undefined) return
- else body.push.apply(body, encodeField(k, val, nop))
- })
-
- return body
-}
-
-function encodeField (k, v, nop) {
- // lowercase keys must be valid, otherwise prefix with
- // "NODETAR."
- if (k.charAt(0) === k.charAt(0).toLowerCase()) {
- var m = k.split(".")[0]
- if (!tar.knownExtended[m]) k = "NODETAR." + k
- }
-
- // no proprietary
- if (nop && k.charAt(0) !== k.charAt(0).toLowerCase()) {
- return []
- }
-
- if (typeof val === "number") val = val.toString(10)
-
- var s = new Buffer(" " + k + "=" + v + "\n")
- , digits = Math.floor(Math.log(s.length) / Math.log(10)) + 1
-
- // console.error("1 s=%j digits=%j s.length=%d", s.toString(), digits, s.length)
-
- // if adding that many digits will make it go over that length,
- // then add one to it. For example, if the string is:
- // " foo=bar\n"
- // then that's 9 characters. With the "9", that bumps the length
- // up to 10. However, this is invalid:
- // "10 foo=bar\n"
- // but, since that's actually 11 characters, since 10 adds another
- // character to the length, and the length includes the number
- // itself. In that case, just bump it up again.
- if (s.length + digits >= Math.pow(10, digits)) digits += 1
- // console.error("2 s=%j digits=%j s.length=%d", s.toString(), digits, s.length)
-
- var len = digits + s.length
- // console.error("3 s=%j digits=%j s.length=%d len=%d", s.toString(), digits, s.length, len)
- var lenBuf = new Buffer("" + len)
- if (lenBuf.length + s.length !== len) {
- throw new Error("Bad length calculation\n"+
- "len="+len+"\n"+
- "lenBuf="+JSON.stringify(lenBuf.toString())+"\n"+
- "lenBuf.length="+lenBuf.length+"\n"+
- "digits="+digits+"\n"+
- "s="+JSON.stringify(s.toString())+"\n"+
- "s.length="+s.length)
- }
-
- return [lenBuf, s]
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
deleted file mode 100644
index 74f432ce..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js
+++ /dev/null
@@ -1,140 +0,0 @@
-// An Entry consisting of:
-//
-// "%d %s=%s\n", <length>, <keyword>, <value>
-//
-// The length is a decimal number, and includes itself and the \n
-// \0 does not terminate anything. Only the length terminates the string.
-// Numeric values are decimal strings.
-
-module.exports = ExtendedHeader
-
-var Entry = require("./entry.js")
- , inherits = require("inherits")
- , tar = require("../tar.js")
- , numeric = tar.numeric
- , keyTrans = { "SCHILY.dev": "dev"
- , "SCHILY.ino": "ino"
- , "SCHILY.nlink": "nlink" }
-
-function ExtendedHeader () {
- Entry.apply(this, arguments)
- this.on("data", this._parse)
- this.fields = {}
- this._position = 0
- this._fieldPos = 0
- this._state = SIZE
- this._sizeBuf = []
- this._keyBuf = []
- this._valBuf = []
- this._size = -1
- this._key = ""
-}
-
-inherits(ExtendedHeader, Entry)
-ExtendedHeader.prototype._parse = parse
-
-var s = 0
- , states = ExtendedHeader.states = {}
- , SIZE = states.SIZE = s++
- , KEY = states.KEY = s++
- , VAL = states.VAL = s++
- , ERR = states.ERR = s++
-
-Object.keys(states).forEach(function (s) {
- states[states[s]] = states[s]
-})
-
-states[s] = null
-
-// char code values for comparison
-var _0 = "0".charCodeAt(0)
- , _9 = "9".charCodeAt(0)
- , point = ".".charCodeAt(0)
- , a = "a".charCodeAt(0)
- , Z = "Z".charCodeAt(0)
- , a = "a".charCodeAt(0)
- , z = "z".charCodeAt(0)
- , space = " ".charCodeAt(0)
- , eq = "=".charCodeAt(0)
- , cr = "\n".charCodeAt(0)
-
-function parse (c) {
- if (this._state === ERR) return
-
- for ( var i = 0, l = c.length
- ; i < l
- ; this._position++, this._fieldPos++, i++) {
- // console.error("top of loop, size="+this._size)
-
- var b = c[i]
-
- if (this._size >= 0 && this._fieldPos > this._size) {
- error(this, "field exceeds length="+this._size)
- return
- }
-
- switch (this._state) {
- case ERR: return
-
- case SIZE:
- // console.error("parsing size, b=%d, rest=%j", b, c.slice(i).toString())
- if (b === space) {
- this._state = KEY
- // this._fieldPos = this._sizeBuf.length
- this._size = parseInt(new Buffer(this._sizeBuf).toString(), 10)
- this._sizeBuf.length = 0
- continue
- }
- if (b < _0 || b > _9) {
- error(this, "expected [" + _0 + ".." + _9 + "], got " + b)
- return
- }
- this._sizeBuf.push(b)
- continue
-
- case KEY:
- // can be any char except =, not > size.
- if (b === eq) {
- this._state = VAL
- this._key = new Buffer(this._keyBuf).toString()
- if (keyTrans[this._key]) this._key = keyTrans[this._key]
- this._keyBuf.length = 0
- continue
- }
- this._keyBuf.push(b)
- continue
-
- case VAL:
- // field must end with cr
- if (this._fieldPos === this._size - 1) {
- // console.error("finished with "+this._key)
- if (b !== cr) {
- error(this, "expected \\n at end of field")
- return
- }
- var val = new Buffer(this._valBuf).toString()
- if (numeric[this._key]) {
- val = parseFloat(val)
- }
- this.fields[this._key] = val
-
- this._valBuf.length = 0
- this._state = SIZE
- this._size = -1
- this._fieldPos = -1
- continue
- }
- this._valBuf.push(b)
- continue
- }
- }
-}
-
-function error (me, msg) {
- msg = "invalid header: " + msg
- + "\nposition=" + me._position
- + "\nfield position=" + me._fieldPos
-
- me.error(msg)
- me.state = ERR
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js
deleted file mode 100644
index fe1bb976..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js
+++ /dev/null
@@ -1,94 +0,0 @@
-// give it a tarball and a path, and it'll dump the contents
-
-module.exports = Extract
-
-var tar = require("../tar.js")
- , fstream = require("fstream")
- , inherits = require("inherits")
- , path = require("path")
-
-function Extract (opts) {
- if (!(this instanceof Extract)) return new Extract(opts)
- tar.Parse.apply(this)
-
- if (typeof opts !== "object") {
- opts = { path: opts }
- }
-
- // better to drop in cwd? seems more standard.
- opts.path = opts.path || path.resolve("node-tar-extract")
- opts.type = "Directory"
- opts.Directory = true
-
- // similar to --strip or --strip-components
- opts.strip = +opts.strip
- if (!opts.strip || opts.strip <= 0) opts.strip = 0
-
- this._fst = fstream.Writer(opts)
-
- this.pause()
- var me = this
-
- // Hardlinks in tarballs are relative to the root
- // of the tarball. So, they need to be resolved against
- // the target directory in order to be created properly.
- me.on("entry", function (entry) {
- // if there's a "strip" argument, then strip off that many
- // path components.
- if (opts.strip) {
- var p = entry.path.split("/").slice(opts.strip).join("/")
- entry.path = entry.props.path = p
- if (entry.linkpath) {
- var lp = entry.linkpath.split("/").slice(opts.strip).join("/")
- entry.linkpath = entry.props.linkpath = lp
- }
- }
- if (entry.type === "Link") {
- entry.linkpath = entry.props.linkpath =
- path.join(opts.path, path.join("/", entry.props.linkpath))
- }
-
- if (entry.type === "SymbolicLink") {
- var dn = path.dirname(entry.path) || ""
- var linkpath = entry.props.linkpath
- var target = path.resolve(opts.path, dn, linkpath)
- if (target.indexOf(opts.path) !== 0) {
- linkpath = path.join(opts.path, path.join("/", linkpath))
- }
- entry.linkpath = entry.props.linkpath = linkpath
- }
- })
-
- this._fst.on("ready", function () {
- me.pipe(me._fst, { end: false })
- me.resume()
- })
-
- this._fst.on('error', function(err) {
- me.emit('error', err)
- })
-
- this._fst.on('drain', function() {
- me.emit('drain')
- })
-
- // this._fst.on("end", function () {
- // console.error("\nEEEE Extract End", me._fst.path)
- // })
-
- this._fst.on("close", function () {
- // console.error("\nEEEE Extract End", me._fst.path)
- me.emit("finish")
- me.emit("end")
- me.emit("close")
- })
-}
-
-inherits(Extract, tar.Parse)
-
-Extract.prototype._streamEnd = function () {
- var me = this
- if (!me._ended || me._entry) me.error("unexpected eof")
- me._fst.end()
- // my .end() is coming later.
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
deleted file mode 100644
index 0bfc7b80..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js
+++ /dev/null
@@ -1,14 +0,0 @@
-module.exports = GlobalHeaderWriter
-
-var ExtendedHeaderWriter = require("./extended-header-writer.js")
- , inherits = require("inherits")
-
-inherits(GlobalHeaderWriter, ExtendedHeaderWriter)
-
-function GlobalHeaderWriter (props) {
- if (!(this instanceof GlobalHeaderWriter)) {
- return new GlobalHeaderWriter(props)
- }
- ExtendedHeaderWriter.call(this, props)
- this.props.type = "g"
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js
deleted file mode 100644
index 3741d5d3..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js
+++ /dev/null
@@ -1,384 +0,0 @@
-// parse a 512-byte header block to a data object, or vice-versa
-// If the data won't fit nicely in a simple header, then generate
-// the appropriate extended header file, and return that.
-
-module.exports = TarHeader
-
-var tar = require("../tar.js")
- , fields = tar.fields
- , fieldOffs = tar.fieldOffs
- , fieldEnds = tar.fieldEnds
- , fieldSize = tar.fieldSize
- , numeric = tar.numeric
- , assert = require("assert").ok
- , space = " ".charCodeAt(0)
- , slash = "/".charCodeAt(0)
- , bslash = process.platform === "win32" ? "\\".charCodeAt(0) : null
-
-function TarHeader (block) {
- if (!(this instanceof TarHeader)) return new TarHeader(block)
- if (block) this.decode(block)
-}
-
-TarHeader.prototype =
- { decode : decode
- , encode: encode
- , calcSum: calcSum
- , checkSum: checkSum
- }
-
-TarHeader.parseNumeric = parseNumeric
-TarHeader.encode = encode
-TarHeader.decode = decode
-
-// note that this will only do the normal ustar header, not any kind
-// of extended posix header file. If something doesn't fit comfortably,
-// then it will set obj.needExtended = true, and set the block to
-// the closest approximation.
-function encode (obj) {
- if (!obj && !(this instanceof TarHeader)) throw new Error(
- "encode must be called on a TarHeader, or supplied an object")
-
- obj = obj || this
- var block = obj.block = new Buffer(512)
-
- // if the object has a "prefix", then that's actually an extension of
- // the path field.
- if (obj.prefix) {
- // console.error("%% header encoding, got a prefix", obj.prefix)
- obj.path = obj.prefix + "/" + obj.path
- // console.error("%% header encoding, prefixed path", obj.path)
- obj.prefix = ""
- }
-
- obj.needExtended = false
-
- if (obj.mode) {
- if (typeof obj.mode === "string") obj.mode = parseInt(obj.mode, 8)
- obj.mode = obj.mode & 0777
- }
-
- for (var f = 0; fields[f] !== null; f ++) {
- var field = fields[f]
- , off = fieldOffs[f]
- , end = fieldEnds[f]
- , ret
-
- switch (field) {
- case "cksum":
- // special, done below, after all the others
- break
-
- case "prefix":
- // special, this is an extension of the "path" field.
- // console.error("%% header encoding, skip prefix later")
- break
-
- case "type":
- // convert from long name to a single char.
- var type = obj.type || "0"
- if (type.length > 1) {
- type = tar.types[obj.type]
- if (!type) type = "0"
- }
- writeText(block, off, end, type)
- break
-
- case "path":
- // uses the "prefix" field if > 100 bytes, but <= 255
- var pathLen = Buffer.byteLength(obj.path)
- , pathFSize = fieldSize[fields.path]
- , prefFSize = fieldSize[fields.prefix]
-
- // paths between 100 and 255 should use the prefix field.
- // longer than 255
- if (pathLen > pathFSize &&
- pathLen <= pathFSize + prefFSize) {
- // need to find a slash somewhere in the middle so that
- // path and prefix both fit in their respective fields
- var searchStart = pathLen - 1 - pathFSize
- , searchEnd = prefFSize
- , found = false
- , pathBuf = new Buffer(obj.path)
-
- for ( var s = searchStart
- ; (s <= searchEnd)
- ; s ++ ) {
- if (pathBuf[s] === slash || pathBuf[s] === bslash) {
- found = s
- break
- }
- }
-
- if (found !== false) {
- prefix = pathBuf.slice(0, found).toString("utf8")
- path = pathBuf.slice(found + 1).toString("utf8")
-
- ret = writeText(block, off, end, path)
- off = fieldOffs[fields.prefix]
- end = fieldEnds[fields.prefix]
- // console.error("%% header writing prefix", off, end, prefix)
- ret = writeText(block, off, end, prefix) || ret
- break
- }
- }
-
- // paths less than 100 chars don't need a prefix
- // and paths longer than 255 need an extended header and will fail
- // on old implementations no matter what we do here.
- // Null out the prefix, and fallthrough to default.
- // console.error("%% header writing no prefix")
- var poff = fieldOffs[fields.prefix]
- , pend = fieldEnds[fields.prefix]
- writeText(block, poff, pend, "")
- // fallthrough
-
- // all other fields are numeric or text
- default:
- ret = numeric[field]
- ? writeNumeric(block, off, end, obj[field])
- : writeText(block, off, end, obj[field] || "")
- break
- }
- obj.needExtended = obj.needExtended || ret
- }
-
- var off = fieldOffs[fields.cksum]
- , end = fieldEnds[fields.cksum]
-
- writeNumeric(block, off, end, calcSum.call(this, block))
-
- return block
-}
-
-// if it's a negative number, or greater than will fit,
-// then use write256.
-var MAXNUM = { 12: 077777777777
- , 11: 07777777777
- , 8 : 07777777
- , 7 : 0777777 }
-function writeNumeric (block, off, end, num) {
- var writeLen = end - off
- , maxNum = MAXNUM[writeLen] || 0
-
- num = num || 0
- // console.error(" numeric", num)
-
- if (num instanceof Date ||
- Object.prototype.toString.call(num) === "[object Date]") {
- num = num.getTime() / 1000
- }
-
- if (num > maxNum || num < 0) {
- write256(block, off, end, num)
- // need an extended header if negative or too big.
- return true
- }
-
- // god, tar is so annoying
- // if the string is small enough, you should put a space
- // between the octal string and the \0, but if it doesn't
- // fit, then don't.
- var numStr = Math.floor(num).toString(8)
- if (num < MAXNUM[writeLen - 1]) numStr += " "
-
- // pad with "0" chars
- if (numStr.length < writeLen) {
- numStr = (new Array(writeLen - numStr.length).join("0")) + numStr
- }
-
- if (numStr.length !== writeLen - 1) {
- throw new Error("invalid length: " + JSON.stringify(numStr) + "\n" +
- "expected: "+writeLen)
- }
- block.write(numStr, off, writeLen, "utf8")
- block[end - 1] = 0
-}
-
-function write256 (block, off, end, num) {
- var buf = block.slice(off, end)
- var positive = num >= 0
- buf[0] = positive ? 0x80 : 0xFF
-
- // get the number as a base-256 tuple
- if (!positive) num *= -1
- var tuple = []
- do {
- var n = num % 256
- tuple.push(n)
- num = (num - n) / 256
- } while (num)
-
- var bytes = tuple.length
-
- var fill = buf.length - bytes
- for (var i = 1; i < fill; i ++) {
- buf[i] = positive ? 0 : 0xFF
- }
-
- // tuple is a base256 number, with [0] as the *least* significant byte
- // if it's negative, then we need to flip all the bits once we hit the
- // first non-zero bit. The 2's-complement is (0x100 - n), and the 1's-
- // complement is (0xFF - n).
- var zero = true
- for (i = bytes; i > 0; i --) {
- var byte = tuple[bytes - i]
- if (positive) buf[fill + i] = byte
- else if (zero && byte === 0) buf[fill + i] = 0
- else if (zero) {
- zero = false
- buf[fill + i] = 0x100 - byte
- } else buf[fill + i] = 0xFF - byte
- }
-}
-
-function writeText (block, off, end, str) {
- // strings are written as utf8, then padded with \0
- var strLen = Buffer.byteLength(str)
- , writeLen = Math.min(strLen, end - off)
- // non-ascii fields need extended headers
- // long fields get truncated
- , needExtended = strLen !== str.length || strLen > writeLen
-
- // write the string, and null-pad
- if (writeLen > 0) block.write(str, off, writeLen, "utf8")
- for (var i = off + writeLen; i < end; i ++) block[i] = 0
-
- return needExtended
-}
-
-function calcSum (block) {
- block = block || this.block
- assert(Buffer.isBuffer(block) && block.length === 512)
-
- if (!block) throw new Error("Need block to checksum")
-
- // now figure out what it would be if the cksum was " "
- var sum = 0
- , start = fieldOffs[fields.cksum]
- , end = fieldEnds[fields.cksum]
-
- for (var i = 0; i < fieldOffs[fields.cksum]; i ++) {
- sum += block[i]
- }
-
- for (var i = start; i < end; i ++) {
- sum += space
- }
-
- for (var i = end; i < 512; i ++) {
- sum += block[i]
- }
-
- return sum
-}
-
-
-function checkSum (block) {
- var sum = calcSum.call(this, block)
- block = block || this.block
-
- var cksum = block.slice(fieldOffs[fields.cksum], fieldEnds[fields.cksum])
- cksum = parseNumeric(cksum)
-
- return cksum === sum
-}
-
-function decode (block) {
- block = block || this.block
- assert(Buffer.isBuffer(block) && block.length === 512)
-
- this.block = block
- this.cksumValid = this.checkSum()
-
- var prefix = null
-
- // slice off each field.
- for (var f = 0; fields[f] !== null; f ++) {
- var field = fields[f]
- , val = block.slice(fieldOffs[f], fieldEnds[f])
-
- switch (field) {
- case "ustar":
- // if not ustar, then everything after that is just padding.
- if (val.toString() !== "ustar\0") {
- this.ustar = false
- return
- } else {
- // console.error("ustar:", val, val.toString())
- this.ustar = val.toString()
- }
- break
-
- // prefix is special, since it might signal the xstar header
- case "prefix":
- var atime = parseNumeric(val.slice(131, 131 + 12))
- , ctime = parseNumeric(val.slice(131 + 12, 131 + 12 + 12))
- if ((val[130] === 0 || val[130] === space) &&
- typeof atime === "number" &&
- typeof ctime === "number" &&
- val[131 + 12] === space &&
- val[131 + 12 + 12] === space) {
- this.atime = atime
- this.ctime = ctime
- val = val.slice(0, 130)
- }
- prefix = val.toString("utf8").replace(/\0+$/, "")
- // console.error("%% header reading prefix", prefix)
- break
-
- // all other fields are null-padding text
- // or a number.
- default:
- if (numeric[field]) {
- this[field] = parseNumeric(val)
- } else {
- this[field] = val.toString("utf8").replace(/\0+$/, "")
- }
- break
- }
- }
-
- // if we got a prefix, then prepend it to the path.
- if (prefix) {
- this.path = prefix + "/" + this.path
- // console.error("%% header got a prefix", this.path)
- }
-}
-
-function parse256 (buf) {
- // first byte MUST be either 80 or FF
- // 80 for positive, FF for 2's comp
- var positive
- if (buf[0] === 0x80) positive = true
- else if (buf[0] === 0xFF) positive = false
- else return null
-
- // build up a base-256 tuple from the least sig to the highest
- var zero = false
- , tuple = []
- for (var i = buf.length - 1; i > 0; i --) {
- var byte = buf[i]
- if (positive) tuple.push(byte)
- else if (zero && byte === 0) tuple.push(0)
- else if (zero) {
- zero = false
- tuple.push(0x100 - byte)
- } else tuple.push(0xFF - byte)
- }
-
- for (var sum = 0, i = 0, l = tuple.length; i < l; i ++) {
- sum += tuple[i] * Math.pow(256, i)
- }
-
- return positive ? sum : -1 * sum
-}
-
-function parseNumeric (f) {
- if (f[0] & 0x80) return parse256(f)
-
- var str = f.toString("utf8").split("\0")[0].trim()
- , res = parseInt(str, 8)
-
- return isNaN(res) ? null : res
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js
deleted file mode 100644
index 5a3bb95a..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js
+++ /dev/null
@@ -1,236 +0,0 @@
-// pipe in an fstream, and it'll make a tarball.
-// key-value pair argument is global extended header props.
-
-module.exports = Pack
-
-var EntryWriter = require("./entry-writer.js")
- , Stream = require("stream").Stream
- , path = require("path")
- , inherits = require("inherits")
- , GlobalHeaderWriter = require("./global-header-writer.js")
- , collect = require("fstream").collect
- , eof = new Buffer(512)
-
-for (var i = 0; i < 512; i ++) eof[i] = 0
-
-inherits(Pack, Stream)
-
-function Pack (props) {
- // console.error("-- p ctor")
- var me = this
- if (!(me instanceof Pack)) return new Pack(props)
-
- if (props) me._noProprietary = props.noProprietary
- else me._noProprietary = false
-
- me._global = props
-
- me.readable = true
- me.writable = true
- me._buffer = []
- // console.error("-- -- set current to null in ctor")
- me._currentEntry = null
- me._processing = false
-
- me._pipeRoot = null
- me.on("pipe", function (src) {
- if (src.root === me._pipeRoot) return
- me._pipeRoot = src
- src.on("end", function () {
- me._pipeRoot = null
- })
- me.add(src)
- })
-}
-
-Pack.prototype.addGlobal = function (props) {
- // console.error("-- p addGlobal")
- if (this._didGlobal) return
- this._didGlobal = true
-
- var me = this
- GlobalHeaderWriter(props)
- .on("data", function (c) {
- me.emit("data", c)
- })
- .end()
-}
-
-Pack.prototype.add = function (stream) {
- if (this._global && !this._didGlobal) this.addGlobal(this._global)
-
- if (this._ended) return this.emit("error", new Error("add after end"))
-
- collect(stream)
- this._buffer.push(stream)
- this._process()
- this._needDrain = this._buffer.length > 0
- return !this._needDrain
-}
-
-Pack.prototype.pause = function () {
- this._paused = true
- if (this._currentEntry) this._currentEntry.pause()
- this.emit("pause")
-}
-
-Pack.prototype.resume = function () {
- this._paused = false
- if (this._currentEntry) this._currentEntry.resume()
- this.emit("resume")
- this._process()
-}
-
-Pack.prototype.end = function () {
- this._ended = true
- this._buffer.push(eof)
- this._process()
-}
-
-Pack.prototype._process = function () {
- var me = this
- if (me._paused || me._processing) {
- return
- }
-
- var entry = me._buffer.shift()
-
- if (!entry) {
- if (me._needDrain) {
- me.emit("drain")
- }
- return
- }
-
- if (entry.ready === false) {
- // console.error("-- entry is not ready", entry)
- me._buffer.unshift(entry)
- entry.on("ready", function () {
- // console.error("-- -- ready!", entry)
- me._process()
- })
- return
- }
-
- me._processing = true
-
- if (entry === eof) {
- // need 2 ending null blocks.
- me.emit("data", eof)
- me.emit("data", eof)
- me.emit("end")
- me.emit("close")
- return
- }
-
- // Change the path to be relative to the root dir that was
- // added to the tarball.
- //
- // XXX This should be more like how -C works, so you can
- // explicitly set a root dir, and also explicitly set a pathname
- // in the tarball to use. That way we can skip a lot of extra
- // work when resolving symlinks for bundled dependencies in npm.
-
- var root = path.dirname((entry.root || entry).path);
- if (me._global && me._global.fromBase && entry.root && entry.root.path) {
- // user set 'fromBase: true' indicating tar root should be directory itself
- root = entry.root.path;
- }
-
- var wprops = {}
-
- Object.keys(entry.props || {}).forEach(function (k) {
- wprops[k] = entry.props[k]
- })
-
- if (me._noProprietary) wprops.noProprietary = true
-
- wprops.path = path.relative(root, entry.path || '')
-
- // actually not a matter of opinion or taste.
- if (process.platform === "win32") {
- wprops.path = wprops.path.replace(/\\/g, "/")
- }
-
- if (!wprops.type)
- wprops.type = 'Directory'
-
- switch (wprops.type) {
- // sockets not supported
- case "Socket":
- return
-
- case "Directory":
- wprops.path += "/"
- wprops.size = 0
- break
-
- case "Link":
- var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
- wprops.linkpath = path.relative(root, lp) || "."
- wprops.size = 0
- break
-
- case "SymbolicLink":
- var lp = path.resolve(path.dirname(entry.path), entry.linkpath)
- wprops.linkpath = path.relative(path.dirname(entry.path), lp) || "."
- wprops.size = 0
- break
- }
-
- // console.error("-- new writer", wprops)
- // if (!wprops.type) {
- // // console.error("-- no type?", entry.constructor.name, entry)
- // }
-
- // console.error("-- -- set current to new writer", wprops.path)
- var writer = me._currentEntry = EntryWriter(wprops)
-
- writer.parent = me
-
- // writer.on("end", function () {
- // // console.error("-- -- writer end", writer.path)
- // })
-
- writer.on("data", function (c) {
- me.emit("data", c)
- })
-
- writer.on("header", function () {
- Buffer.prototype.toJSON = function () {
- return this.toString().split(/\0/).join(".")
- }
- // console.error("-- -- writer header %j", writer.props)
- if (writer.props.size === 0) nextEntry()
- })
- writer.on("close", nextEntry)
-
- var ended = false
- function nextEntry () {
- if (ended) return
- ended = true
-
- // console.error("-- -- writer close", writer.path)
- // console.error("-- -- set current to null", wprops.path)
- me._currentEntry = null
- me._processing = false
- me._process()
- }
-
- writer.on("error", function (er) {
- // console.error("-- -- writer error", writer.path)
- me.emit("error", er)
- })
-
- // if it's the root, then there's no need to add its entries,
- // or data, since they'll be added directly.
- if (entry === me._pipeRoot) {
- // console.error("-- is the root, don't auto-add")
- writer.add = null
- }
-
- entry.pipe(writer)
-}
-
-Pack.prototype.destroy = function () {}
-Pack.prototype.write = function () {}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js
deleted file mode 100644
index 600ad782..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js
+++ /dev/null
@@ -1,275 +0,0 @@
-
-// A writable stream.
-// It emits "entry" events, which provide a readable stream that has
-// header info attached.
-
-module.exports = Parse.create = Parse
-
-var stream = require("stream")
- , Stream = stream.Stream
- , BlockStream = require("block-stream")
- , tar = require("../tar.js")
- , TarHeader = require("./header.js")
- , Entry = require("./entry.js")
- , BufferEntry = require("./buffer-entry.js")
- , ExtendedHeader = require("./extended-header.js")
- , assert = require("assert").ok
- , inherits = require("inherits")
- , fstream = require("fstream")
-
-// reading a tar is a lot like reading a directory
-// However, we're actually not going to run the ctor,
-// since it does a stat and various other stuff.
-// This inheritance gives us the pause/resume/pipe
-// behavior that is desired.
-inherits(Parse, fstream.Reader)
-
-function Parse () {
- var me = this
- if (!(me instanceof Parse)) return new Parse()
-
- // doesn't apply fstream.Reader ctor?
- // no, becasue we don't want to stat/etc, we just
- // want to get the entry/add logic from .pipe()
- Stream.apply(me)
-
- me.writable = true
- me.readable = true
- me._stream = new BlockStream(512)
- me.position = 0
- me._ended = false
-
- me._stream.on("error", function (e) {
- me.emit("error", e)
- })
-
- me._stream.on("data", function (c) {
- me._process(c)
- })
-
- me._stream.on("end", function () {
- me._streamEnd()
- })
-
- me._stream.on("drain", function () {
- me.emit("drain")
- })
-}
-
-// overridden in Extract class, since it needs to
-// wait for its DirWriter part to finish before
-// emitting "end"
-Parse.prototype._streamEnd = function () {
- var me = this
- if (!me._ended || me._entry) me.error("unexpected eof")
- me.emit("end")
-}
-
-// a tar reader is actually a filter, not just a readable stream.
-// So, you should pipe a tarball stream into it, and it needs these
-// write/end methods to do that.
-Parse.prototype.write = function (c) {
- if (this._ended) {
- // gnutar puts a LOT of nulls at the end.
- // you can keep writing these things forever.
- // Just ignore them.
- for (var i = 0, l = c.length; i > l; i ++) {
- if (c[i] !== 0) return this.error("write() after end()")
- }
- return
- }
- return this._stream.write(c)
-}
-
-Parse.prototype.end = function (c) {
- this._ended = true
- return this._stream.end(c)
-}
-
-// don't need to do anything, since we're just
-// proxying the data up from the _stream.
-// Just need to override the parent's "Not Implemented"
-// error-thrower.
-Parse.prototype._read = function () {}
-
-Parse.prototype._process = function (c) {
- assert(c && c.length === 512, "block size should be 512")
-
- // one of three cases.
- // 1. A new header
- // 2. A part of a file/extended header
- // 3. One of two or more EOF null blocks
-
- if (this._entry) {
- var entry = this._entry
- if(!entry._abort) entry.write(c)
- else {
- entry._remaining -= c.length
- if(entry._remaining < 0) entry._remaining = 0
- }
- if (entry._remaining === 0) {
- entry.end()
- this._entry = null
- }
- } else {
- // either zeroes or a header
- var zero = true
- for (var i = 0; i < 512 && zero; i ++) {
- zero = c[i] === 0
- }
-
- // eof is *at least* 2 blocks of nulls, and then the end of the
- // file. you can put blocks of nulls between entries anywhere,
- // so appending one tarball to another is technically valid.
- // ending without the eof null blocks is not allowed, however.
- if (zero) {
- if (this._eofStarted)
- this._ended = true
- this._eofStarted = true
- } else {
- this._eofStarted = false
- this._startEntry(c)
- }
- }
-
- this.position += 512
-}
-
-// take a header chunk, start the right kind of entry.
-Parse.prototype._startEntry = function (c) {
- var header = new TarHeader(c)
- , self = this
- , entry
- , ev
- , EntryType
- , onend
- , meta = false
-
- if (null === header.size || !header.cksumValid) {
- var e = new Error("invalid tar file")
- e.header = header
- e.tar_file_offset = this.position
- e.tar_block = this.position / 512
- return this.emit("error", e)
- }
-
- switch (tar.types[header.type]) {
- case "File":
- case "OldFile":
- case "Link":
- case "SymbolicLink":
- case "CharacterDevice":
- case "BlockDevice":
- case "Directory":
- case "FIFO":
- case "ContiguousFile":
- case "GNUDumpDir":
- // start a file.
- // pass in any extended headers
- // These ones consumers are typically most interested in.
- EntryType = Entry
- ev = "entry"
- break
-
- case "GlobalExtendedHeader":
- // extended headers that apply to the rest of the tarball
- EntryType = ExtendedHeader
- onend = function () {
- self._global = self._global || {}
- Object.keys(entry.fields).forEach(function (k) {
- self._global[k] = entry.fields[k]
- })
- }
- ev = "globalExtendedHeader"
- meta = true
- break
-
- case "ExtendedHeader":
- case "OldExtendedHeader":
- // extended headers that apply to the next entry
- EntryType = ExtendedHeader
- onend = function () {
- self._extended = entry.fields
- }
- ev = "extendedHeader"
- meta = true
- break
-
- case "NextFileHasLongLinkpath":
- // set linkpath=<contents> in extended header
- EntryType = BufferEntry
- onend = function () {
- self._extended = self._extended || {}
- self._extended.linkpath = entry.body
- }
- ev = "longLinkpath"
- meta = true
- break
-
- case "NextFileHasLongPath":
- case "OldGnuLongPath":
- // set path=<contents> in file-extended header
- EntryType = BufferEntry
- onend = function () {
- self._extended = self._extended || {}
- self._extended.path = entry.body
- }
- ev = "longPath"
- meta = true
- break
-
- default:
- // all the rest we skip, but still set the _entry
- // member, so that we can skip over their data appropriately.
- // emit an event to say that this is an ignored entry type?
- EntryType = Entry
- ev = "ignoredEntry"
- break
- }
-
- var global, extended
- if (meta) {
- global = extended = null
- } else {
- var global = this._global
- var extended = this._extended
-
- // extendedHeader only applies to one entry, so once we start
- // an entry, it's over.
- this._extended = null
- }
- entry = new EntryType(header, extended, global)
- entry.meta = meta
-
- // only proxy data events of normal files.
- if (!meta) {
- entry.on("data", function (c) {
- me.emit("data", c)
- })
- }
-
- if (onend) entry.on("end", onend)
-
- this._entry = entry
- var me = this
-
- entry.on("pause", function () {
- me.pause()
- })
-
- entry.on("resume", function () {
- me.resume()
- })
-
- if (this.listeners("*").length) {
- this.emit("*", ev, entry)
- }
-
- this.emit(ev, entry)
-
- // Zero-byte entry. End immediately.
- if (entry.props.size === 0) {
- entry.end()
- this._entry = null
- }
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/package.json b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/package.json
deleted file mode 100644
index 2ab77e47..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "tar@^2.0.0",
- "_id": "tar@2.2.1",
- "_inBundle": false,
- "_integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
- "_location": "/node-gyp/tar",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "tar@^2.0.0",
- "name": "tar",
- "escapedName": "tar",
- "rawSpec": "^2.0.0",
- "saveSpec": null,
- "fetchSpec": "^2.0.0"
- },
- "_requiredBy": [
- "/node-gyp"
- ],
- "_resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
- "_shasum": "8e4d2a256c0e2185c6b18ad694aec968b83cb1d1",
- "_spec": "tar@^2.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/node-gyp",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/isaacs/node-tar/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "block-stream": "*",
- "fstream": "^1.0.2",
- "inherits": "2"
- },
- "deprecated": false,
- "description": "tar for node",
- "devDependencies": {
- "graceful-fs": "^4.1.2",
- "mkdirp": "^0.5.0",
- "rimraf": "1.x",
- "tap": "0.x"
- },
- "homepage": "https://github.com/isaacs/node-tar#readme",
- "license": "ISC",
- "main": "tar.js",
- "name": "tar",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/node-tar.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "2.2.1"
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js
deleted file mode 100644
index a81298b9..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/tar.js
+++ /dev/null
@@ -1,173 +0,0 @@
-// field paths that every tar file must have.
-// header is padded to 512 bytes.
-var f = 0
- , fields = {}
- , path = fields.path = f++
- , mode = fields.mode = f++
- , uid = fields.uid = f++
- , gid = fields.gid = f++
- , size = fields.size = f++
- , mtime = fields.mtime = f++
- , cksum = fields.cksum = f++
- , type = fields.type = f++
- , linkpath = fields.linkpath = f++
- , headerSize = 512
- , blockSize = 512
- , fieldSize = []
-
-fieldSize[path] = 100
-fieldSize[mode] = 8
-fieldSize[uid] = 8
-fieldSize[gid] = 8
-fieldSize[size] = 12
-fieldSize[mtime] = 12
-fieldSize[cksum] = 8
-fieldSize[type] = 1
-fieldSize[linkpath] = 100
-
-// "ustar\0" may introduce another bunch of headers.
-// these are optional, and will be nulled out if not present.
-
-var ustar = fields.ustar = f++
- , ustarver = fields.ustarver = f++
- , uname = fields.uname = f++
- , gname = fields.gname = f++
- , devmaj = fields.devmaj = f++
- , devmin = fields.devmin = f++
- , prefix = fields.prefix = f++
- , fill = fields.fill = f++
-
-// terminate fields.
-fields[f] = null
-
-fieldSize[ustar] = 6
-fieldSize[ustarver] = 2
-fieldSize[uname] = 32
-fieldSize[gname] = 32
-fieldSize[devmaj] = 8
-fieldSize[devmin] = 8
-fieldSize[prefix] = 155
-fieldSize[fill] = 12
-
-// nb: prefix field may in fact be 130 bytes of prefix,
-// a null char, 12 bytes for atime, 12 bytes for ctime.
-//
-// To recognize this format:
-// 1. prefix[130] === ' ' or '\0'
-// 2. atime and ctime are octal numeric values
-// 3. atime and ctime have ' ' in their last byte
-
-var fieldEnds = {}
- , fieldOffs = {}
- , fe = 0
-for (var i = 0; i < f; i ++) {
- fieldOffs[i] = fe
- fieldEnds[i] = (fe += fieldSize[i])
-}
-
-// build a translation table of field paths.
-Object.keys(fields).forEach(function (f) {
- if (fields[f] !== null) fields[fields[f]] = f
-})
-
-// different values of the 'type' field
-// paths match the values of Stats.isX() functions, where appropriate
-var types =
- { 0: "File"
- , "\0": "OldFile" // like 0
- , "": "OldFile"
- , 1: "Link"
- , 2: "SymbolicLink"
- , 3: "CharacterDevice"
- , 4: "BlockDevice"
- , 5: "Directory"
- , 6: "FIFO"
- , 7: "ContiguousFile" // like 0
- // posix headers
- , g: "GlobalExtendedHeader" // k=v for the rest of the archive
- , x: "ExtendedHeader" // k=v for the next file
- // vendor-specific stuff
- , A: "SolarisACL" // skip
- , D: "GNUDumpDir" // like 5, but with data, which should be skipped
- , I: "Inode" // metadata only, skip
- , K: "NextFileHasLongLinkpath" // data = link path of next file
- , L: "NextFileHasLongPath" // data = path of next file
- , M: "ContinuationFile" // skip
- , N: "OldGnuLongPath" // like L
- , S: "SparseFile" // skip
- , V: "TapeVolumeHeader" // skip
- , X: "OldExtendedHeader" // like x
- }
-
-Object.keys(types).forEach(function (t) {
- types[types[t]] = types[types[t]] || t
-})
-
-// values for the mode field
-var modes =
- { suid: 04000 // set uid on extraction
- , sgid: 02000 // set gid on extraction
- , svtx: 01000 // set restricted deletion flag on dirs on extraction
- , uread: 0400
- , uwrite: 0200
- , uexec: 0100
- , gread: 040
- , gwrite: 020
- , gexec: 010
- , oread: 4
- , owrite: 2
- , oexec: 1
- , all: 07777
- }
-
-var numeric =
- { mode: true
- , uid: true
- , gid: true
- , size: true
- , mtime: true
- , devmaj: true
- , devmin: true
- , cksum: true
- , atime: true
- , ctime: true
- , dev: true
- , ino: true
- , nlink: true
- }
-
-Object.keys(modes).forEach(function (t) {
- modes[modes[t]] = modes[modes[t]] || t
-})
-
-var knownExtended =
- { atime: true
- , charset: true
- , comment: true
- , ctime: true
- , gid: true
- , gname: true
- , linkpath: true
- , mtime: true
- , path: true
- , realtime: true
- , security: true
- , size: true
- , uid: true
- , uname: true }
-
-
-exports.fields = fields
-exports.fieldSize = fieldSize
-exports.fieldOffs = fieldOffs
-exports.fieldEnds = fieldEnds
-exports.types = types
-exports.modes = modes
-exports.numeric = numeric
-exports.headerSize = headerSize
-exports.blockSize = blockSize
-exports.knownExtended = knownExtended
-
-exports.Pack = require("./lib/pack.js")
-exports.Parse = require("./lib/parse.js")
-exports.Extract = require("./lib/extract.js")
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
deleted file mode 100644
index 1524ff7a..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// the fixtures have some weird stuff that is painful
-// to include directly in the repo for various reasons.
-//
-// So, unpack the fixtures with the system tar first.
-//
-// This means, of course, that it'll only work if you
-// already have a tar implementation, and some of them
-// will not properly unpack the fixtures anyway.
-//
-// But, since usually those tests will fail on Windows
-// and other systems with less capable filesystems anyway,
-// at least this way we don't cause inconveniences by
-// merely cloning the repo or installing the package.
-
-var tap = require("tap")
-, child_process = require("child_process")
-, rimraf = require("rimraf")
-, test = tap.test
-, path = require("path")
-
-test("clean fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "rimraf ./fixtures/")
- t.end()
- })
-})
-
-test("clean tmp", function (t) {
- rimraf(path.resolve(__dirname, "tmp"), function (er) {
- t.ifError(er, "rimraf ./tmp/")
- t.end()
- })
-})
-
-test("extract fixtures", function (t) {
- var c = child_process.spawn("tar"
- ,["xzvf", "fixtures.tgz"]
- ,{ cwd: __dirname })
-
- c.stdout.on("data", errwrite)
- c.stderr.on("data", errwrite)
- function errwrite (chunk) {
- process.stderr.write(chunk)
- }
-
- c.on("exit", function (code) {
- t.equal(code, 0, "extract fixtures should exit with 0")
- if (code) {
- t.comment("Note, all tests from here on out will fail because of this.")
- }
- t.end()
- })
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz
deleted file mode 100644
index 9e7014d8..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz
+++ /dev/null
Binary files differ
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js
deleted file mode 100644
index 9719c42f..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js
+++ /dev/null
@@ -1,177 +0,0 @@
-// Set the umask, so that it works the same everywhere.
-process.umask(parseInt('22', 8))
-
-var fs = require('fs')
-var path = require('path')
-
-var fstream = require('fstream')
-var test = require('tap').test
-
-var tar = require('../tar.js')
-var file = path.resolve(__dirname, 'dir-normalization.tar')
-var target = path.resolve(__dirname, 'tmp/dir-normalization-test')
-var ee = 0
-
-var expectEntries = [
- { path: 'fixtures/',
- mode: '755',
- type: '5',
- linkpath: ''
- },
- { path: 'fixtures/a/',
- mode: '755',
- type: '5',
- linkpath: ''
- },
- { path: 'fixtures/the-chumbler',
- mode: '755',
- type: '2',
- linkpath: path.resolve(target, 'a/b/c/d/the-chumbler'),
- },
- { path: 'fixtures/a/b/',
- mode: '755',
- type: '5',
- linkpath: ''
- },
- { path: 'fixtures/a/x',
- mode: '644',
- type: '0',
- linkpath: ''
- },
- { path: 'fixtures/a/b/c/',
- mode: '755',
- type: '5',
- linkpath: ''
- },
- { path: 'fixtures/a/b/c/y',
- mode: '755',
- type: '2',
- linkpath: '../../x',
- }
-]
-
-var ef = 0
-var expectFiles = [
- { path: '',
- mode: '40755',
- type: 'Directory',
- depth: 0,
- linkpath: undefined
- },
- { path: '/fixtures',
- mode: '40755',
- type: 'Directory',
- depth: 1,
- linkpath: undefined
- },
- { path: '/fixtures/a',
- mode: '40755',
- type: 'Directory',
- depth: 2,
- linkpath: undefined
- },
- { path: '/fixtures/a/b',
- mode: '40755',
- type: 'Directory',
- depth: 3,
- linkpath: undefined
- },
- { path: '/fixtures/a/b/c',
- mode: '40755',
- type: 'Directory',
- depth: 4,
- linkpath: undefined
- },
- { path: '/fixtures/a/b/c/y',
- mode: '120755',
- type: 'SymbolicLink',
- depth: 5,
- linkpath: '../../x'
- },
- { path: '/fixtures/a/x',
- mode: '100644',
- type: 'File',
- depth: 3,
- linkpath: undefined
- },
- { path: '/fixtures/the-chumbler',
- mode: '120755',
- type: 'SymbolicLink',
- depth: 2,
- linkpath: path.resolve(target, 'a/b/c/d/the-chumbler')
- }
-]
-
-test('preclean', function (t) {
- require('rimraf').sync(path.join(__dirname, '/tmp/dir-normalization-test'))
- t.pass('cleaned!')
- t.end()
-})
-
-test('extract test', function (t) {
- var extract = tar.Extract(target)
- var inp = fs.createReadStream(file)
-
- inp.pipe(extract)
-
- extract.on('end', function () {
- t.equal(ee, expectEntries.length, 'should see ' + expectEntries.length + ' entries')
-
- // should get no more entries after end
- extract.removeAllListeners('entry')
- extract.on('entry', function (e) {
- t.fail('Should not get entries after end!')
- })
-
- next()
- })
-
- extract.on('entry', function (entry) {
- var mode = entry.props.mode & (~parseInt('22', 8))
- var found = {
- path: entry.path,
- mode: mode.toString(8),
- type: entry.props.type,
- linkpath: entry.props.linkpath,
- }
-
- var wanted = expectEntries[ee++]
- t.equivalent(found, wanted, 'tar entry ' + ee + ' ' + (wanted && wanted.path))
- })
-
- function next () {
- var r = fstream.Reader({
- path: target,
- type: 'Directory',
- sort: 'alpha'
- })
-
- r.on('ready', function () {
- foundEntry(r)
- })
-
- r.on('end', finish)
-
- function foundEntry (entry) {
- var p = entry.path.substr(target.length)
- var mode = entry.props.mode & (~parseInt('22', 8))
- var found = {
- path: p,
- mode: mode.toString(8),
- type: entry.props.type,
- depth: entry.props.depth,
- linkpath: entry.props.linkpath
- }
-
- var wanted = expectFiles[ef++]
- t.equivalent(found, wanted, 'unpacked file ' + ef + ' ' + (wanted && wanted.path))
-
- entry.on('entry', foundEntry)
- }
-
- function finish () {
- t.equal(ef, expectFiles.length, 'should have ' + ef + ' items')
- t.end()
- }
- }
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar
deleted file mode 100644
index 3c484535..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar
+++ /dev/null
Binary files differ
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js
deleted file mode 100644
index e484920f..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var fs = require('fs')
-var path = require('path')
-var zlib = require('zlib')
-
-var tap = require('tap')
-
-var tar = require('../tar.js')
-
-var file = path.join(__dirname, 'cb-never-called-1.0.1.tgz')
-var target = path.join(__dirname, 'tmp/extract-test')
-
-tap.test('preclean', function (t) {
- require('rimraf').sync(__dirname + '/tmp/extract-test')
- t.pass('cleaned!')
- t.end()
-})
-
-tap.test('extract test', function (t) {
- var extract = tar.Extract(target)
- var inp = fs.createReadStream(file)
-
- inp.pipe(zlib.createGunzip()).pipe(extract)
-
- extract.on('error', function (er) {
- t.equal(er.message, 'unexpected eof', 'error noticed')
- t.end()
- })
-
- extract.on('end', function () {
- t.fail('shouldn\'t reach this point due to errors')
- t.end()
- })
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js
deleted file mode 100644
index 45400cd9..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js
+++ /dev/null
@@ -1,132 +0,0 @@
-// Set the umask, so that it works the same everywhere.
-process.umask(parseInt('22', 8))
-
-var tap = require("tap")
- , tar = require("../tar.js")
- , fs = require("fs")
- , gfs = require("graceful-fs")
- , path = require("path")
- , file = path.resolve(__dirname, "fixtures/dir.tar")
- , target = path.resolve(__dirname, "tmp/extract-test")
- , index = 0
- , fstream = require("fstream")
- , rimraf = require("rimraf")
- , mkdirp = require("mkdirp")
-
- , ee = 0
- , expectEntries = [
- {
- "path" : "dir/",
- "mode" : "750",
- "type" : "5",
- "depth" : undefined,
- "size" : 0,
- "linkpath" : "",
- "nlink" : undefined,
- "dev" : undefined,
- "ino" : undefined
- },
- {
- "path" : "dir/sub/",
- "mode" : "750",
- "type" : "5",
- "depth" : undefined,
- "size" : 0,
- "linkpath" : "",
- "nlink" : undefined,
- "dev" : undefined,
- "ino" : undefined
- } ]
-
-function slow (fs, method, t1, t2) {
- var orig = fs[method]
- if (!orig) return null
- fs[method] = function () {
- var args = [].slice.call(arguments)
- console.error("slow", method, args[0])
- var cb = args.pop()
-
- setTimeout(function () {
- orig.apply(fs, args.concat(function(er, data) {
- setTimeout(function() {
- cb(er, data)
- }, t2)
- }))
- }, t1)
- }
-}
-
-// Make sure we get the graceful-fs that fstream is using.
-var gfs2
-try {
- gfs2 = require("fstream/node_modules/graceful-fs")
-} catch (er) {}
-
-var slowMethods = ["chown", "chmod", "utimes", "lutimes"]
-slowMethods.forEach(function (method) {
- var t1 = 500
- var t2 = 0
- slow(fs, method, t1, t2)
- slow(gfs, method, t1, t2)
- if (gfs2) {
- slow(gfs2, method, t1, t2)
- }
-})
-
-
-
-// The extract class basically just pipes the input
-// to a Reader, and then to a fstream.DirWriter
-
-// So, this is as much a test of fstream.Reader and fstream.Writer
-// as it is of tar.Extract, but it sort of makes sense.
-
-tap.test("preclean", function (t) {
- rimraf.sync(target)
- /mkdirp.sync(target)
- t.pass("cleaned!")
- t.end()
-})
-
-tap.test("extract test", function (t) {
- var extract = tar.Extract(target)
- var inp = fs.createReadStream(file)
-
- // give it a weird buffer size to try to break in odd places
- inp.bufferSize = 1234
-
- inp.pipe(extract)
-
- extract.on("end", function () {
- rimraf.sync(target)
-
- t.equal(ee, expectEntries.length, "should see "+ee+" entries")
-
- // should get no more entries after end
- extract.removeAllListeners("entry")
- extract.on("entry", function (e) {
- t.fail("Should not get entries after end!")
- })
-
- t.end()
- })
-
-
- extract.on("entry", function (entry) {
- var found =
- { path: entry.path
- , mode: entry.props.mode.toString(8)
- , type: entry.props.type
- , depth: entry.props.depth
- , size: entry.props.size
- , linkpath: entry.props.linkpath
- , nlink: entry.props.nlink
- , dev: entry.props.dev
- , ino: entry.props.ino
- }
-
- var wanted = expectEntries[ee ++]
-
- t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path)
- })
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js
deleted file mode 100644
index eca4e7cc..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js
+++ /dev/null
@@ -1,367 +0,0 @@
-// Set the umask, so that it works the same everywhere.
-process.umask(parseInt('22', 8))
-
-var tap = require("tap")
- , tar = require("../tar.js")
- , fs = require("fs")
- , path = require("path")
- , file = path.resolve(__dirname, "fixtures/c.tar")
- , target = path.resolve(__dirname, "tmp/extract-test")
- , index = 0
- , fstream = require("fstream")
-
- , ee = 0
- , expectEntries =
-[ { path: 'c.txt',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 513,
- linkpath: '',
- nlink: undefined,
- dev: undefined,
- ino: undefined },
- { path: 'cc.txt',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 513,
- linkpath: '',
- nlink: undefined,
- dev: undefined,
- ino: undefined },
- { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 100,
- linkpath: '',
- nlink: undefined,
- dev: undefined,
- ino: undefined },
- { path: 'Ω.txt',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 2,
- linkpath: '',
- nlink: undefined,
- dev: undefined,
- ino: undefined },
- { path: 'Ω.txt',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 2,
- linkpath: '',
- nlink: 1,
- dev: 234881026,
- ino: 51693379 },
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 200,
- linkpath: '',
- nlink: 1,
- dev: 234881026,
- ino: 51681874 },
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 201,
- linkpath: '',
- nlink: undefined,
- dev: undefined,
- ino: undefined },
- { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
- mode: '777',
- type: '2',
- depth: undefined,
- size: 0,
- linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- nlink: undefined,
- dev: undefined,
- ino: undefined },
- { path: '200-hard',
- mode: '644',
- type: '0',
- depth: undefined,
- size: 200,
- linkpath: '',
- nlink: 2,
- dev: 234881026,
- ino: 51681874 },
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: '644',
- type: '1',
- depth: undefined,
- size: 0,
- linkpath: path.resolve(target, '200-hard'),
- nlink: 2,
- dev: 234881026,
- ino: 51681874 } ]
-
- , ef = 0
- , expectFiles =
-[ { path: '',
- mode: '40755',
- type: 'Directory',
- depth: 0,
- linkpath: undefined },
- { path: '/200-hard',
- mode: '100644',
- type: 'File',
- depth: 1,
- size: 200,
- linkpath: undefined,
- nlink: 2 },
- { path: '/200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
- mode: '120777',
- type: 'SymbolicLink',
- depth: 1,
- size: 200,
- linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- nlink: 1 },
- { path: '/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: '100644',
- type: 'Link',
- depth: 1,
- size: 200,
- linkpath: path.join(target, '200-hard'),
- nlink: 2 },
- { path: '/c.txt',
- mode: '100644',
- type: 'File',
- depth: 1,
- size: 513,
- linkpath: undefined,
- nlink: 1 },
- { path: '/cc.txt',
- mode: '100644',
- type: 'File',
- depth: 1,
- size: 513,
- linkpath: undefined,
- nlink: 1 },
- { path: '/r',
- mode: '40755',
- type: 'Directory',
- depth: 1,
- linkpath: undefined },
- { path: '/r/e',
- mode: '40755',
- type: 'Directory',
- depth: 2,
- linkpath: undefined },
- { path: '/r/e/a',
- mode: '40755',
- type: 'Directory',
- depth: 3,
- linkpath: undefined },
- { path: '/r/e/a/l',
- mode: '40755',
- type: 'Directory',
- depth: 4,
- linkpath: undefined },
- { path: '/r/e/a/l/l',
- mode: '40755',
- type: 'Directory',
- depth: 5,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y',
- mode: '40755',
- type: 'Directory',
- depth: 6,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-',
- mode: '40755',
- type: 'Directory',
- depth: 7,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d',
- mode: '40755',
- type: 'Directory',
- depth: 8,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e',
- mode: '40755',
- type: 'Directory',
- depth: 9,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e',
- mode: '40755',
- type: 'Directory',
- depth: 10,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p',
- mode: '40755',
- type: 'Directory',
- depth: 11,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-',
- mode: '40755',
- type: 'Directory',
- depth: 12,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f',
- mode: '40755',
- type: 'Directory',
- depth: 13,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o',
- mode: '40755',
- type: 'Directory',
- depth: 14,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l',
- mode: '40755',
- type: 'Directory',
- depth: 15,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d',
- mode: '40755',
- type: 'Directory',
- depth: 16,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e',
- mode: '40755',
- type: 'Directory',
- depth: 17,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r',
- mode: '40755',
- type: 'Directory',
- depth: 18,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-',
- mode: '40755',
- type: 'Directory',
- depth: 19,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p',
- mode: '40755',
- type: 'Directory',
- depth: 20,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a',
- mode: '40755',
- type: 'Directory',
- depth: 21,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t',
- mode: '40755',
- type: 'Directory',
- depth: 22,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h',
- mode: '40755',
- type: 'Directory',
- depth: 23,
- linkpath: undefined },
- { path: '/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: '100644',
- type: 'File',
- depth: 24,
- size: 100,
- linkpath: undefined,
- nlink: 1 },
- { path: '/Ω.txt',
- mode: '100644',
- type: 'File',
- depth: 1,
- size: 2,
- linkpath: undefined,
- nlink: 1 } ]
-
-
-
-// The extract class basically just pipes the input
-// to a Reader, and then to a fstream.DirWriter
-
-// So, this is as much a test of fstream.Reader and fstream.Writer
-// as it is of tar.Extract, but it sort of makes sense.
-
-tap.test("preclean", function (t) {
- require("rimraf").sync(__dirname + "/tmp/extract-test")
- t.pass("cleaned!")
- t.end()
-})
-
-tap.test("extract test", function (t) {
- var extract = tar.Extract(target)
- var inp = fs.createReadStream(file)
-
- // give it a weird buffer size to try to break in odd places
- inp.bufferSize = 1234
-
- inp.pipe(extract)
-
- extract.on("end", function () {
- t.equal(ee, expectEntries.length, "should see "+ee+" entries")
-
- // should get no more entries after end
- extract.removeAllListeners("entry")
- extract.on("entry", function (e) {
- t.fail("Should not get entries after end!")
- })
-
- next()
- })
-
- extract.on("entry", function (entry) {
- var found =
- { path: entry.path
- , mode: entry.props.mode.toString(8)
- , type: entry.props.type
- , depth: entry.props.depth
- , size: entry.props.size
- , linkpath: entry.props.linkpath
- , nlink: entry.props.nlink
- , dev: entry.props.dev
- , ino: entry.props.ino
- }
-
- var wanted = expectEntries[ee ++]
-
- t.equivalent(found, wanted, "tar entry " + ee + " " + wanted.path)
- })
-
- function next () {
- var r = fstream.Reader({ path: target
- , type: "Directory"
- // this is just to encourage consistency
- , sort: "alpha" })
-
- r.on("ready", function () {
- foundEntry(r)
- })
-
- r.on("end", finish)
-
- function foundEntry (entry) {
- var p = entry.path.substr(target.length)
- var found =
- { path: p
- , mode: entry.props.mode.toString(8)
- , type: entry.props.type
- , depth: entry.props.depth
- , size: entry.props.size
- , linkpath: entry.props.linkpath
- , nlink: entry.props.nlink
- }
-
- var wanted = expectFiles[ef ++]
-
- t.has(found, wanted, "unpacked file " + ef + " " + wanted.path)
-
- entry.on("entry", foundEntry)
- }
-
- function finish () {
- t.equal(ef, expectFiles.length, "should have "+ef+" items")
- t.end()
- }
- }
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
deleted file mode 100644
index f1676023..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz
+++ /dev/null
Binary files differ
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js
deleted file mode 100644
index 8ea6f795..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js
+++ /dev/null
@@ -1,183 +0,0 @@
-var tap = require("tap")
-var TarHeader = require("../lib/header.js")
-var tar = require("../tar.js")
-var fs = require("fs")
-
-
-var headers =
- { "a.txt file header":
- [ "612e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303430312031313635313336303333332030313234353100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- , { cksumValid: true
- , path: 'a.txt'
- , mode: 420
- , uid: 24561
- , gid: 20
- , size: 257
- , mtime: 1319493851
- , cksum: 5417
- , type: '0'
- , linkpath: ''
- , ustar: 'ustar\0'
- , ustarver: '00'
- , uname: 'isaacs'
- , gname: 'staff'
- , devmaj: 0
- , devmin: 0
- , fill: '' }
- ]
-
- , "omega pax": // the extended header from omega tar.
- [ "5061784865616465722fcea92e74787400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303137302031313534333731303631312030313530353100207800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- , { cksumValid: true
- , path: 'PaxHeader/Ω.txt'
- , mode: 420
- , uid: 24561
- , gid: 20
- , size: 120
- , mtime: 1301254537
- , cksum: 6697
- , type: 'x'
- , linkpath: ''
- , ustar: 'ustar\0'
- , ustarver: '00'
- , uname: 'isaacs'
- , gname: 'staff'
- , devmaj: 0
- , devmin: 0
- , fill: '' } ]
-
- , "omega file header":
- [ "cea92e7478740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030322031313534333731303631312030313330373200203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- , { cksumValid: true
- , path: 'Ω.txt'
- , mode: 420
- , uid: 24561
- , gid: 20
- , size: 2
- , mtime: 1301254537
- , cksum: 5690
- , type: '0'
- , linkpath: ''
- , ustar: 'ustar\0'
- , ustarver: '00'
- , uname: 'isaacs'
- , gname: 'staff'
- , devmaj: 0
- , devmin: 0
- , fill: '' } ]
-
- , "foo.js file header":
- [ "666f6f2e6a730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030303030342031313534333637303734312030313236313700203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- , { cksumValid: true
- , path: 'foo.js'
- , mode: 420
- , uid: 24561
- , gid: 20
- , size: 4
- , mtime: 1301246433
- , cksum: 5519
- , type: '0'
- , linkpath: ''
- , ustar: 'ustar\0'
- , ustarver: '00'
- , uname: 'isaacs'
- , gname: 'staff'
- , devmaj: 0
- , devmin: 0
- , fill: '' }
- ]
-
- , "b.txt file header":
- [ "622e747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030303036343420003035373736312000303030303234200030303030303030313030302031313635313336303637372030313234363100203000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000757374617200303069736161637300000000000000000000000000000000000000000000000000007374616666000000000000000000000000000000000000000000000000000000303030303030200030303030303020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- , { cksumValid: true
- , path: 'b.txt'
- , mode: 420
- , uid: 24561
- , gid: 20
- , size: 512
- , mtime: 1319494079
- , cksum: 5425
- , type: '0'
- , linkpath: ''
- , ustar: 'ustar\0'
- , ustarver: '00'
- , uname: 'isaacs'
- , gname: 'staff'
- , devmaj: 0
- , devmin: 0
- , fill: '' }
- ]
-
- , "deep nested file":
- [ "636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363633030303634342000303537373631200030303030323420003030303030303030313434203131363532313531353333203034333331340020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075737461720030306973616163730000000000000000000000000000000000000000000000000000737461666600000000000000000000000000000000000000000000000000000030303030303020003030303030302000722f652f612f6c2f6c2f792f2d2f642f652f652f702f2d2f662f6f2f6c2f642f652f722f2d2f702f612f742f680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
- , { cksumValid: true,
- path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'
- , mode: 420
- , uid: 24561
- , gid: 20
- , size: 100
- , mtime: 1319687003
- , cksum: 18124
- , type: '0'
- , linkpath: ''
- , ustar: 'ustar\0'
- , ustarver: '00'
- , uname: 'isaacs'
- , gname: 'staff'
- , devmaj: 0
- , devmin: 0
- , fill: '' }
- ]
- }
-
-tap.test("parsing", function (t) {
- Object.keys(headers).forEach(function (name) {
- var h = headers[name]
- , header = new Buffer(h[0], "hex")
- , expect = h[1]
- , parsed = new TarHeader(header)
-
- // console.error(parsed)
- t.has(parsed, expect, "parse " + name)
- })
- t.end()
-})
-
-tap.test("encoding", function (t) {
- Object.keys(headers).forEach(function (name) {
- var h = headers[name]
- , expect = new Buffer(h[0], "hex")
- , encoded = TarHeader.encode(h[1])
-
- // might have slightly different bytes, since the standard
- // isn't very strict, but should have the same semantics
- // checkSum will be different, but cksumValid will be true
-
- var th = new TarHeader(encoded)
- delete h[1].block
- delete h[1].needExtended
- delete h[1].cksum
- t.has(th, h[1], "fields "+name)
- })
- t.end()
-})
-
-// test these manually. they're a bit rare to find in the wild
-tap.test("parseNumeric tests", function (t) {
- var parseNumeric = TarHeader.parseNumeric
- , numbers =
- { "303737373737373700": 2097151
- , "30373737373737373737373700": 8589934591
- , "303030303036343400": 420
- , "800000ffffffffffff": 281474976710655
- , "ffffff000000000001": -281474976710654
- , "ffffff000000000000": -281474976710655
- , "800000000000200000": 2097152
- , "8000000000001544c5": 1393861
- , "ffffffffffff1544c5": -15383354 }
- Object.keys(numbers).forEach(function (n) {
- var b = new Buffer(n, "hex")
- t.equal(parseNumeric(b), numbers[n], n + " === " + numbers[n])
- })
- t.end()
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
deleted file mode 100644
index d4b03a1f..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js
+++ /dev/null
@@ -1,886 +0,0 @@
-// This is exactly like test/pack.js, except that it's excluding
-// any proprietary headers.
-//
-// This loses some information about the filesystem, but creates
-// tarballs that are supported by more versions of tar, especially
-// old non-spec-compliant copies of gnutar.
-
-// the symlink file is excluded from git, because it makes
-// windows freak the hell out.
-var fs = require("fs")
- , path = require("path")
- , symlink = path.resolve(__dirname, "fixtures/symlink")
-try { fs.unlinkSync(symlink) } catch (e) {}
-fs.symlinkSync("./hardlink-1", symlink)
-process.on("exit", function () {
- fs.unlinkSync(symlink)
-})
-
-var tap = require("tap")
- , tar = require("../tar.js")
- , pkg = require("../package.json")
- , Pack = tar.Pack
- , fstream = require("fstream")
- , Reader = fstream.Reader
- , Writer = fstream.Writer
- , input = path.resolve(__dirname, "fixtures/")
- , target = path.resolve(__dirname, "tmp/pack.tar")
- , uid = process.getuid ? process.getuid() : 0
- , gid = process.getgid ? process.getgid() : 0
-
- , entries =
-
- // the global header and root fixtures/ dir are going to get
- // a different date each time, so omit that bit.
- // Also, dev/ino values differ across machines, so that's not
- // included.
- [ [ 'entry',
- { path: 'fixtures/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'extendedHeader',
- { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: uid,
- gid: gid,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- uid: uid,
- gid: gid,
- size: 200 } ]
-
- , [ 'entry',
- { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 200,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/a.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 257,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/b.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 512,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/c.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 513,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/cc.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 513,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/dir/',
- mode: 488,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/dir/sub/',
- mode: 488,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/foo.js',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 4,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/hardlink-1',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 200,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/hardlink-2',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 0,
- type: '1',
- linkpath: 'fixtures/hardlink-1',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/omega.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/omega.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/star.4.html',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 54081,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'extendedHeader',
- { path: 'PaxHeader/fixtures/packtest/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: 'fixtures/packtest/Ω.txt',
- uid: uid,
- gid: gid,
- size: 2 } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 100,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/symlink',
- uid: uid,
- gid: gid,
- size: 0,
- type: '2',
- linkpath: 'hardlink-1',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'extendedHeader',
- { path: 'PaxHeader/fixtures/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: "fixtures/Ω.txt"
- , uid: uid
- , gid: gid
- , size: 2 } ]
-
- , [ 'entry',
- { path: 'fixtures/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
- ]
-
-
-// first, make sure that the hardlinks are actually hardlinks, or this
-// won't work. Git has a way of replacing them with a copy.
-var hard1 = path.resolve(__dirname, "fixtures/hardlink-1")
- , hard2 = path.resolve(__dirname, "fixtures/hardlink-2")
- , fs = require("fs")
-
-try { fs.unlinkSync(hard2) } catch (e) {}
-fs.linkSync(hard1, hard2)
-
-tap.test("with global header", { timeout: 10000 }, function (t) {
- runTest(t, true)
-})
-
-tap.test("without global header", { timeout: 10000 }, function (t) {
- runTest(t, false)
-})
-
-function alphasort (a, b) {
- return a === b ? 0
- : a.toLowerCase() > b.toLowerCase() ? 1
- : a.toLowerCase() < b.toLowerCase() ? -1
- : a > b ? 1
- : -1
-}
-
-
-function runTest (t, doGH) {
- var reader = Reader({ path: input
- , filter: function () {
- return !this.path.match(/\.(tar|hex)$/)
- }
- , sort: alphasort
- })
-
- var props = doGH ? pkg : {}
- props.noProprietary = true
- var pack = Pack(props)
- var writer = Writer(target)
-
- // global header should be skipped regardless, since it has no content.
- var entry = 0
-
- t.ok(reader, "reader ok")
- t.ok(pack, "pack ok")
- t.ok(writer, "writer ok")
-
- pack.pipe(writer)
-
- var parse = tar.Parse()
- t.ok(parse, "parser should be ok")
-
- pack.on("data", function (c) {
- // console.error("PACK DATA")
- if (c.length !== 512) {
- // this one is too noisy, only assert if it'll be relevant
- t.equal(c.length, 512, "parser should emit data in 512byte blocks")
- }
- parse.write(c)
- })
-
- pack.on("end", function () {
- // console.error("PACK END")
- t.pass("parser ends")
- parse.end()
- })
-
- pack.on("error", function (er) {
- t.fail("pack error", er)
- })
-
- parse.on("error", function (er) {
- t.fail("parse error", er)
- })
-
- writer.on("error", function (er) {
- t.fail("writer error", er)
- })
-
- reader.on("error", function (er) {
- t.fail("reader error", er)
- })
-
- parse.on("*", function (ev, e) {
- var wanted = entries[entry++]
- if (!wanted) {
- t.fail("unexpected event: "+ev)
- return
- }
- t.equal(ev, wanted[0], "event type should be "+wanted[0])
-
- if (ev !== wanted[0] || e.path !== wanted[1].path) {
- console.error("wanted", wanted)
- console.error([ev, e.props])
- e.on("end", function () {
- console.error(e.fields)
- throw "break"
- })
- }
-
- t.has(e.props, wanted[1], "properties "+wanted[1].path)
- if (wanted[2]) {
- e.on("end", function () {
- if (!e.fields) {
- t.ok(e.fields, "should get fields")
- } else {
- t.has(e.fields, wanted[2], "should get expected fields")
- }
- })
- }
- })
-
- reader.pipe(pack)
-
- writer.on("close", function () {
- t.equal(entry, entries.length, "should get all expected entries")
- t.pass("it finished")
- t.end()
- })
-
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js
deleted file mode 100644
index 0f16c07b..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js
+++ /dev/null
@@ -1,952 +0,0 @@
-
-// the symlink file is excluded from git, because it makes
-// windows freak the hell out.
-var fs = require("fs")
- , path = require("path")
- , symlink = path.resolve(__dirname, "fixtures/symlink")
-try { fs.unlinkSync(symlink) } catch (e) {}
-fs.symlinkSync("./hardlink-1", symlink)
-process.on("exit", function () {
- fs.unlinkSync(symlink)
-})
-
-
-var tap = require("tap")
- , tar = require("../tar.js")
- , pkg = require("../package.json")
- , Pack = tar.Pack
- , fstream = require("fstream")
- , Reader = fstream.Reader
- , Writer = fstream.Writer
- , input = path.resolve(__dirname, "fixtures/")
- , target = path.resolve(__dirname, "tmp/pack.tar")
- , uid = process.getuid ? process.getuid() : 0
- , gid = process.getgid ? process.getgid() : 0
-
- , entries =
-
- // the global header and root fixtures/ dir are going to get
- // a different date each time, so omit that bit.
- // Also, dev/ino values differ across machines, so that's not
- // included.
- [ [ 'globalExtendedHeader',
- { path: 'PaxHeader/',
- mode: 438,
- uid: 0,
- gid: 0,
- type: 'g',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { "NODETAR.author": pkg.author,
- "NODETAR.name": pkg.name,
- "NODETAR.description": pkg.description,
- "NODETAR.version": pkg.version,
- "NODETAR.repository.type": pkg.repository.type,
- "NODETAR.repository.url": pkg.repository.url,
- "NODETAR.main": pkg.main,
- "NODETAR.scripts.test": pkg.scripts.test } ]
-
- , [ 'entry',
- { path: 'fixtures/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'extendedHeader',
- { path: 'PaxHeader/fixtures/200cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: uid,
- gid: gid,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- 'NODETAR.depth': '1',
- 'NODETAR.type': 'File',
- nlink: 1,
- uid: uid,
- gid: gid,
- size: 200,
- 'NODETAR.blksize': '4096',
- 'NODETAR.blocks': '8' } ]
-
- , [ 'entry',
- { path: 'fixtures/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 200,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '',
- 'NODETAR.depth': '1',
- 'NODETAR.type': 'File',
- nlink: 1,
- 'NODETAR.blksize': '4096',
- 'NODETAR.blocks': '8' } ]
-
- , [ 'entry',
- { path: 'fixtures/a.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 257,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/b.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 512,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/c.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 513,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/cc.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 513,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/dir/',
- mode: 488,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/dir/sub/',
- mode: 488,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
-
- , [ 'entry',
- { path: 'fixtures/foo.js',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 4,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/hardlink-1',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 200,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/hardlink-2',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 0,
- type: '1',
- linkpath: 'fixtures/hardlink-1',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/omega.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/omega.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/star.4.html',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 54081,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'extendedHeader',
- { path: 'PaxHeader/fixtures/packtest/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: 'fixtures/packtest/Ω.txt',
- 'NODETAR.depth': '2',
- 'NODETAR.type': 'File',
- nlink: 1,
- uid: uid,
- gid: gid,
- size: 2,
- 'NODETAR.blksize': '4096',
- 'NODETAR.blocks': '8' } ]
-
- , [ 'entry',
- { path: 'fixtures/packtest/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '',
- 'NODETAR.depth': '2',
- 'NODETAR.type': 'File',
- nlink: 1,
- 'NODETAR.blksize': '4096',
- 'NODETAR.blocks': '8' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/',
- mode: 493,
- uid: uid,
- gid: gid,
- size: 0,
- type: '5',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 100,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'entry',
- { path: 'fixtures/symlink',
- uid: uid,
- gid: gid,
- size: 0,
- type: '2',
- linkpath: 'hardlink-1',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' } ]
-
- , [ 'extendedHeader',
- { path: 'PaxHeader/fixtures/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: "fixtures/Ω.txt"
- , "NODETAR.depth": "1"
- , "NODETAR.type": "File"
- , nlink: 1
- , uid: uid
- , gid: gid
- , size: 2
- , "NODETAR.blksize": "4096"
- , "NODETAR.blocks": "8" } ]
-
- , [ 'entry',
- { path: 'fixtures/Ω.txt',
- mode: 420,
- uid: uid,
- gid: gid,
- size: 2,
- type: '0',
- linkpath: '',
- ustar: 'ustar\u0000',
- ustarver: '00',
- uname: '',
- gname: '',
- devmaj: 0,
- devmin: 0,
- fill: '',
- 'NODETAR.depth': '1',
- 'NODETAR.type': 'File',
- nlink: 1,
- 'NODETAR.blksize': '4096',
- 'NODETAR.blocks': '8' } ]
- ]
-
-
-// first, make sure that the hardlinks are actually hardlinks, or this
-// won't work. Git has a way of replacing them with a copy.
-var hard1 = path.resolve(__dirname, "fixtures/hardlink-1")
- , hard2 = path.resolve(__dirname, "fixtures/hardlink-2")
- , fs = require("fs")
-
-try { fs.unlinkSync(hard2) } catch (e) {}
-fs.linkSync(hard1, hard2)
-
-tap.test("with global header", { timeout: 10000 }, function (t) {
- runTest(t, true)
-})
-
-tap.test("without global header", { timeout: 10000 }, function (t) {
- runTest(t, false)
-})
-
-tap.test("with from base", { timeout: 10000 }, function (t) {
- runTest(t, true, true)
-})
-
-function alphasort (a, b) {
- return a === b ? 0
- : a.toLowerCase() > b.toLowerCase() ? 1
- : a.toLowerCase() < b.toLowerCase() ? -1
- : a > b ? 1
- : -1
-}
-
-
-function runTest (t, doGH, doFromBase) {
- var reader = Reader({ path: input
- , filter: function () {
- return !this.path.match(/\.(tar|hex)$/)
- }
- , sort: alphasort
- })
-
- var props = doGH ? pkg : {}
- if(doFromBase) props.fromBase = true;
-
- var pack = Pack(props)
- var writer = Writer(target)
-
- // skip the global header if we're not doing that.
- var entry = doGH ? 0 : 1
-
- t.ok(reader, "reader ok")
- t.ok(pack, "pack ok")
- t.ok(writer, "writer ok")
-
- pack.pipe(writer)
-
- var parse = tar.Parse()
- t.ok(parse, "parser should be ok")
-
- pack.on("data", function (c) {
- // console.error("PACK DATA")
- if (c.length !== 512) {
- // this one is too noisy, only assert if it'll be relevant
- t.equal(c.length, 512, "parser should emit data in 512byte blocks")
- }
- parse.write(c)
- })
-
- pack.on("end", function () {
- // console.error("PACK END")
- t.pass("parser ends")
- parse.end()
- })
-
- pack.on("error", function (er) {
- t.fail("pack error", er)
- })
-
- parse.on("error", function (er) {
- t.fail("parse error", er)
- })
-
- writer.on("error", function (er) {
- t.fail("writer error", er)
- })
-
- reader.on("error", function (er) {
- t.fail("reader error", er)
- })
-
- parse.on("*", function (ev, e) {
- var wanted = entries[entry++]
- if (!wanted) {
- t.fail("unexpected event: "+ev)
- return
- }
- t.equal(ev, wanted[0], "event type should be "+wanted[0])
-
- if(doFromBase) {
- if(wanted[1].path.indexOf('fixtures/') && wanted[1].path.length == 100)
- wanted[1].path = wanted[1].path.replace('fixtures/', '') + 'ccccccccc'
-
- if(wanted[1]) wanted[1].path = wanted[1].path.replace('fixtures/', '').replace('//', '/')
- if(wanted[1].path == '') wanted[1].path = '/'
- if(wanted[2] && wanted[2].path) wanted[2].path = wanted[2].path.replace('fixtures', '').replace(/^\//, '')
-
- wanted[1].linkpath = wanted[1].linkpath.replace('fixtures/', '')
- }
-
- if (ev !== wanted[0] || e.path !== wanted[1].path) {
- console.error("wanted", wanted)
- console.error([ev, e.props])
- e.on("end", function () {
- console.error(e.fields)
- throw "break"
- })
- }
-
-
- t.has(e.props, wanted[1], "properties "+wanted[1].path)
- if (wanted[2]) {
- e.on("end", function () {
- if (!e.fields) {
- t.ok(e.fields, "should get fields")
- } else {
- t.has(e.fields, wanted[2], "should get expected fields")
- }
- })
- }
- })
-
- reader.pipe(pack)
-
- writer.on("close", function () {
- t.equal(entry, entries.length, "should get all expected entries")
- t.pass("it finished")
- t.end()
- })
-
-}
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js
deleted file mode 100644
index 79408c27..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js
+++ /dev/null
@@ -1,29 +0,0 @@
-var tap = require("tap")
- , tar = require("../tar.js")
- , fs = require("fs")
- , path = require("path")
- , file = path.resolve(__dirname, "fixtures/c.tar")
-
-tap.test("parser test", function (t) {
- var parser = tar.Parse()
- var total = 0
- var dataTotal = 0
-
- parser.on("end", function () {
-
- t.equals(total-513,dataTotal,'should have discarded only c.txt')
-
- t.end()
- })
-
- fs.createReadStream(file)
- .pipe(parser)
- .on('entry',function(entry){
- if(entry.path === 'c.txt') entry.abort()
-
- total += entry.size;
- entry.on('data',function(data){
- dataTotal += data.length
- })
- })
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js
deleted file mode 100644
index f765a501..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js
+++ /dev/null
@@ -1,359 +0,0 @@
-var tap = require("tap")
- , tar = require("../tar.js")
- , fs = require("fs")
- , path = require("path")
- , file = path.resolve(__dirname, "fixtures/c.tar")
- , index = 0
-
- , expect =
-[ [ 'entry',
- { path: 'c.txt',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 513,
- mtime: new Date('Wed, 26 Oct 2011 01:10:58 GMT'),
- cksum: 5422,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- undefined ],
- [ 'entry',
- { path: 'cc.txt',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 513,
- mtime: new Date('Wed, 26 Oct 2011 01:11:02 GMT'),
- cksum: 5525,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- undefined ],
- [ 'entry',
- { path: 'r/e/a/l/l/y/-/d/e/e/p/-/f/o/l/d/e/r/-/p/a/t/h/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 100,
- mtime: new Date('Thu, 27 Oct 2011 03:43:23 GMT'),
- cksum: 18124,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- undefined ],
- [ 'entry',
- { path: 'Ω.txt',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 2,
- mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
- cksum: 5695,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- undefined ],
- [ 'extendedHeader',
- { path: 'PaxHeader/Ω.txt',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 120,
- mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
- cksum: 6702,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: 'Ω.txt',
- ctime: 1319737909,
- atime: 1319739061,
- dev: 234881026,
- ino: 51693379,
- nlink: 1 } ],
- [ 'entry',
- { path: 'Ω.txt',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 2,
- mtime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
- cksum: 5695,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '',
- ctime: new Date('Thu, 27 Oct 2011 17:51:49 GMT'),
- atime: new Date('Thu, 27 Oct 2011 18:11:01 GMT'),
- dev: 234881026,
- ino: 51693379,
- nlink: 1 },
- undefined ],
- [ 'extendedHeader',
- { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 353,
- mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- cksum: 14488,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- ctime: 1319686868,
- atime: 1319741254,
- 'LIBARCHIVE.creationtime': '1319686852',
- dev: 234881026,
- ino: 51681874,
- nlink: 1 } ],
- [ 'entry',
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 200,
- mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- cksum: 14570,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '',
- ctime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- atime: new Date('Thu, 27 Oct 2011 18:47:34 GMT'),
- 'LIBARCHIVE.creationtime': '1319686852',
- dev: 234881026,
- ino: 51681874,
- nlink: 1 },
- undefined ],
- [ 'longPath',
- { path: '././@LongLink',
- mode: 0,
- uid: 0,
- gid: 0,
- size: 201,
- mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
- cksum: 4976,
- type: 'L',
- linkpath: '',
- ustar: false },
- '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ],
- [ 'entry',
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: 1000,
- gid: 1000,
- size: 201,
- mtime: new Date('Thu, 27 Oct 2011 22:21:50 GMT'),
- cksum: 14086,
- type: '0',
- linkpath: '',
- ustar: false },
- undefined ],
- [ 'longLinkpath',
- { path: '././@LongLink',
- mode: 0,
- uid: 0,
- gid: 0,
- size: 201,
- mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
- cksum: 4975,
- type: 'K',
- linkpath: '',
- ustar: false },
- '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc' ],
- [ 'longPath',
- { path: '././@LongLink',
- mode: 0,
- uid: 0,
- gid: 0,
- size: 201,
- mtime: new Date('Thu, 01 Jan 1970 00:00:00 GMT'),
- cksum: 4976,
- type: 'L',
- linkpath: '',
- ustar: false },
- '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL' ],
- [ 'entry',
- { path: '200LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL',
- mode: 511,
- uid: 1000,
- gid: 1000,
- size: 0,
- mtime: new Date('Fri, 28 Oct 2011 23:05:17 GMT'),
- cksum: 21603,
- type: '2',
- linkpath: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- ustar: false },
- undefined ],
- [ 'extendedHeader',
- { path: 'PaxHeader/200-hard',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 143,
- mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- cksum: 6533,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { ctime: 1320617144,
- atime: 1320617232,
- 'LIBARCHIVE.creationtime': '1319686852',
- dev: 234881026,
- ino: 51681874,
- nlink: 2 } ],
- [ 'entry',
- { path: '200-hard',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 200,
- mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- cksum: 5526,
- type: '0',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '',
- ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'),
- atime: new Date('Sun, 06 Nov 2011 22:07:12 GMT'),
- 'LIBARCHIVE.creationtime': '1319686852',
- dev: 234881026,
- ino: 51681874,
- nlink: 2 },
- undefined ],
- [ 'extendedHeader',
- { path: 'PaxHeader/200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 353,
- mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- cksum: 14488,
- type: 'x',
- linkpath: '',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '' },
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- ctime: 1320617144,
- atime: 1320617406,
- 'LIBARCHIVE.creationtime': '1319686852',
- dev: 234881026,
- ino: 51681874,
- nlink: 2 } ],
- [ 'entry',
- { path: '200ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
- mode: 420,
- uid: 24561,
- gid: 20,
- size: 0,
- mtime: new Date('Thu, 27 Oct 2011 03:41:08 GMT'),
- cksum: 15173,
- type: '1',
- linkpath: '200-hard',
- ustar: 'ustar\0',
- ustarver: '00',
- uname: 'isaacs',
- gname: 'staff',
- devmaj: 0,
- devmin: 0,
- fill: '',
- ctime: new Date('Sun, 06 Nov 2011 22:05:44 GMT'),
- atime: new Date('Sun, 06 Nov 2011 22:10:06 GMT'),
- 'LIBARCHIVE.creationtime': '1319686852',
- dev: 234881026,
- ino: 51681874,
- nlink: 2 },
- undefined ] ]
-
-
-tap.test("parser test", function (t) {
- var parser = tar.Parse()
-
- parser.on("end", function () {
- t.equal(index, expect.length, "saw all expected events")
- t.end()
- })
-
- fs.createReadStream(file)
- .pipe(parser)
- .on("*", function (ev, entry) {
- var wanted = expect[index]
- if (!wanted) {
- return t.fail("Unexpected event: " + ev)
- }
- var result = [ev, entry.props]
- entry.on("end", function () {
- result.push(entry.fields || entry.body)
-
- t.equal(ev, wanted[0], index + " event type")
- t.equivalent(entry.props, wanted[1], wanted[1].path + " entry properties")
- if (wanted[2]) {
- t.equivalent(result[2], wanted[2], "metadata values")
- }
- index ++
- })
- })
-})
diff --git a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js b/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
deleted file mode 100644
index a00ff7fa..00000000
--- a/deps/node/deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js
+++ /dev/null
@@ -1,20 +0,0 @@
-// clean up the fixtures
-
-var tap = require("tap")
-, rimraf = require("rimraf")
-, test = tap.test
-, path = require("path")
-
-test("clean fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "rimraf ./fixtures/")
- t.end()
- })
-})
-
-test("clean tmp", function (t) {
- rimraf(path.resolve(__dirname, "tmp"), function (er) {
- t.ifError(er, "rimraf ./tmp/")
- t.end()
- })
-})