summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/worker-farm/node_modules/errno
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/worker-farm/node_modules/errno')
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore1
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml11
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/README.md10
-rwxr-xr-xdeps/npm/node_modules/worker-farm/node_modules/errno/cli.js8
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/custom.js10
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml2
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE39
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md11
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md8
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json30
-rw-r--r--deps/npm/node_modules/worker-farm/node_modules/errno/package.json30
-rwxr-xr-x[-rw-r--r--]deps/npm/node_modules/worker-farm/node_modules/errno/test.js79
12 files changed, 93 insertions, 146 deletions
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore b/deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore
new file mode 100644
index 0000000000..b512c09d47
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/.npmignore
@@ -0,0 +1 @@
+node_modules \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml b/deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml
deleted file mode 100644
index f996821c51..0000000000
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/.travis.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-sudo: false
-
-language: node_js
-
-node_js:
- - 9
- - 8
- - 7
- - 6
- - 5
- - 4
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/README.md b/deps/npm/node_modules/worker-farm/node_modules/errno/README.md
index a4d0fb542d..2c1f8a525d 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/README.md
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/README.md
@@ -1,10 +1,6 @@
# node-errno
-> Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*.
-
-[![npm](https://img.shields.io/npm/v/errno.svg)](https://www.npmjs.com/package/errno)
-[![Build Status](https://secure.travis-ci.org/rvagg/node-errno.png)](http://travis-ci.org/rvagg/node-errno)
-[![npm](https://img.shields.io/npm/dm/errno.svg)](https://www.npmjs.com/package/errno)
+Better [libuv](https://github.com/libuv/libuv)/[Node.js](https://nodejs.org)/[io.js](https://iojs.org) error handling & reporting. Available in npm as *errno*.
* [errno exposed](#errnoexposed)
* [Custom errors](#customerrors)
@@ -90,7 +86,7 @@ You will need to install with `npm install errno -g` if you want the `errno` com
<a name="customerrors"></a>
## Custom errors
-Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error hierarchies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor.
+Use `errno.custom.createError()` to create custom `Error` objects to throw around in your Node.js library. Create error heirachies so `instanceof` becomes a useful tool in tracking errors. Call-stack is correctly captured at the time you create an instance of the error object, plus a `cause` property will make available the original error object if you pass one in to the constructor.
```js
var create = require('errno').custom.createError
@@ -142,4 +138,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js b/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js
index 61d179bbe6..f841771b8a 100755
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/cli.js
@@ -4,10 +4,8 @@ var errno = require('./')
, arg = process.argv[2]
, data, code
-if (arg === undefined) {
- console.log(JSON.stringify(errno.code, null, 2))
- process.exit(0)
-}
+if (arg === undefined)
+ return console.log(JSON.stringify(errno.code, null, 2))
if ((code = +arg) == arg)
data = errno.errno[code]
@@ -19,4 +17,4 @@ if (data)
else {
console.error('No such errno/code: "' + arg + '"')
process.exit(1)
-}
+} \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js b/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js
index ca8c1d8dcd..7be16c1e4d 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/custom.js
@@ -1,15 +1,13 @@
var prr = require('prr')
function init (type, message, cause) {
- if (!!message && typeof message != 'string') {
- message = message.message || message.name
- }
prr(this, {
type : type
, name : type
// can be passed just a 'cause'
, cause : typeof message != 'string' ? message : cause
- , message : message
+ , message : !!message && typeof message != 'string' ? message.message : message
+
}, 'ewr')
}
@@ -17,7 +15,7 @@ function init (type, message, cause) {
function CustomError (message, cause) {
Error.call(this)
if (Error.captureStackTrace)
- Error.captureStackTrace(this, this.constructor)
+ Error.captureStackTrace(this, arguments.callee)
init.call(this, 'CustomError', message, cause)
}
@@ -39,7 +37,7 @@ function createError (errno, type, proto) {
}
Error.call(this)
if (Error.captureStackTrace)
- Error.captureStackTrace(this, err)
+ Error.captureStackTrace(this, arguments.callee)
}
err.prototype = !!proto ? new proto() : new CustomError()
return err
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
index 33dcbc3a86..fe3f4eb153 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/.travis.yml
@@ -7,4 +7,4 @@ branches:
- master
notifications:
email:
- - rod@vagg.org \ No newline at end of file
+ - rod@vagg.org
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE
new file mode 100644
index 0000000000..f6a0029de1
--- /dev/null
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE
@@ -0,0 +1,39 @@
+Copyright 2013, Rod Vagg (the "Original Author")
+All rights reserved.
+
+MIT +no-false-attribs License
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+Distributions of all or part of the Software intended to be used
+by the recipients as they would use the unmodified Software,
+containing modifications that substantially alter, remove, or
+disable functionality of the Software, outside of the documented
+configuration mechanisms provided by the Software, shall be
+modified such that the Original Author's bug reporting email
+addresses and urls are either replaced with the contact information
+of the parties responsible for the changes, or removed entirely.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+
+Except where noted, this license applies to any and all software
+programs and associated documentation files created by the
+Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md
deleted file mode 100644
index 29b95e39a5..0000000000
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/LICENSE.md
+++ /dev/null
@@ -1,11 +0,0 @@
-The MIT License (MIT)
-=====================
-
-Copyright (c) 2014 Rod Vagg
----------------------------
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
index b934048235..3e709e3bd9 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/README.md
@@ -4,7 +4,7 @@ An sensible alternative to `Object.defineProperty()`. Available in npm and Ender
## Usage
-Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (`'enumerable'`, `'configurable'` and `'writable'` are all `false`):
+Set the property `'foo'` (`obj.foo`) to have the value `'bar'` with default options (*enumerable, configurable and writable are all false*):
```js
prr(obj, 'foo', 'bar')
@@ -24,9 +24,7 @@ prr(obj, { one: 'one', two: 'two' })
prr(obj, { one: 'one', two: 'two' }, { enumerable: true, writable: true })
```
-### Simplify!
-
-But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can simplify.
+But obviously, having to write out the full options object makes it nearly as bad as the original `Object.defineProperty()` so we can **simplify**.
As an alternative method we can use an options string where each character represents a option: `'e'=='enumerable'`, `'c'=='configurable'` and `'w'=='writable'`:
@@ -44,4 +42,4 @@ Anywhere! For pre-ES5 environments *prr* will simply fall-back to an `object[pro
## Licence
-prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
+prr is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. \ No newline at end of file
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
index 706d2aec4e..4af59e2e92 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/node_modules/prr/package.json
@@ -1,32 +1,30 @@
{
- "_from": "prr@~1.0.1",
- "_id": "prr@1.0.1",
+ "_from": "prr@~0.0.0",
+ "_id": "prr@0.0.0",
"_inBundle": false,
- "_integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+ "_integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=",
"_location": "/worker-farm/errno/prr",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "prr@~1.0.1",
+ "raw": "prr@~0.0.0",
"name": "prr",
"escapedName": "prr",
- "rawSpec": "~1.0.1",
+ "rawSpec": "~0.0.0",
"saveSpec": null,
- "fetchSpec": "~1.0.1"
+ "fetchSpec": "~0.0.0"
},
"_requiredBy": [
"/worker-farm/errno"
],
- "_resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
- "_shasum": "d3fc114ba06995a45ec6893f484ceb1d78f5f476",
- "_spec": "prr@~1.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/worker-farm/node_modules/errno",
- "author": {
- "name": "Rod Vagg",
- "email": "rod@vagg.org",
- "url": "https://github.com/rvagg"
- },
+ "_resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz",
+ "_shasum": "1a84b85908325501411853d0081ee3fa86e2926a",
+ "_spec": "prr@~0.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/worker-farm/node_modules/errno",
+ "authors": [
+ "Rod Vagg <rod@vagg.org> (https://github.com/rvagg)"
+ ],
"bugs": {
"url": "https://github.com/rvagg/prr/issues"
},
@@ -54,5 +52,5 @@
"scripts": {
"test": "node ./test.js"
},
- "version": "1.0.1"
+ "version": "0.0.0"
}
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/package.json b/deps/npm/node_modules/worker-farm/node_modules/errno/package.json
index ce2a8cb2ad..c0df7f24aa 100644
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/package.json
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/package.json
@@ -1,27 +1,27 @@
{
- "_from": "errno@^0.1.4",
- "_id": "errno@0.1.7",
+ "_from": "errno@>=0.1.1 <0.2.0-0",
+ "_id": "errno@0.1.4",
"_inBundle": false,
- "_integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+ "_integrity": "sha1-uJbiOp5ei6M4cfyZar02NfyaHH0=",
"_location": "/worker-farm/errno",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
- "raw": "errno@^0.1.4",
+ "raw": "errno@>=0.1.1 <0.2.0-0",
"name": "errno",
"escapedName": "errno",
- "rawSpec": "^0.1.4",
+ "rawSpec": ">=0.1.1 <0.2.0-0",
"saveSpec": null,
- "fetchSpec": "^0.1.4"
+ "fetchSpec": ">=0.1.1 <0.2.0-0"
},
"_requiredBy": [
"/worker-farm"
],
- "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
- "_shasum": "4684d71779ad39af177e3f007996f7c67c852618",
- "_spec": "errno@^0.1.4",
- "_where": "/Users/rebecca/code/npm/node_modules/worker-farm",
+ "_resolved": "https://registry.npmjs.org/errno/-/errno-0.1.4.tgz",
+ "_shasum": "b896e23a9e5e8ba33871fc996abd3635fc9a1c7d",
+ "_spec": "errno@>=0.1.1 <0.2.0-0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/worker-farm",
"authors": [
"Rod Vagg @rvagg <rod@vagg.org> (https://github.com/rvagg)"
],
@@ -33,14 +33,12 @@
},
"bundleDependencies": false,
"dependencies": {
- "prr": "~1.0.1"
+ "prr": "~0.0.0"
},
"deprecated": false,
"description": "libuv errno details exposed",
"devDependencies": {
- "error-stack-parser": "^2.0.1",
- "inherits": "^2.0.3",
- "tape": "~4.8.0"
+ "tape": "~3.5.0"
},
"homepage": "https://github.com/rvagg/node-errno#readme",
"keywords": [
@@ -56,7 +54,7 @@
"url": "git+https://github.com/rvagg/node-errno.git"
},
"scripts": {
- "test": "node --use_strict test.js"
+ "test": "tape test.js"
},
- "version": "0.1.7"
+ "version": "0.1.4"
}
diff --git a/deps/npm/node_modules/worker-farm/node_modules/errno/test.js b/deps/npm/node_modules/worker-farm/node_modules/errno/test.js
index 1c046357bc..6b76a85ae1 100644..100755
--- a/deps/npm/node_modules/worker-farm/node_modules/errno/test.js
+++ b/deps/npm/node_modules/worker-farm/node_modules/errno/test.js
@@ -1,27 +1,27 @@
-var test = require('tape')
- , inherits = require('inherits')
- , ErrorStackParser = require('error-stack-parser')
- , errno = require('./')
+#!/usr/bin/env node
+
+var test = require('tape')
+ , errno = require('./')
test('sanity checks', function (t) {
t.ok(errno.all, 'errno.all not found')
t.ok(errno.errno, 'errno.errno not found')
t.ok(errno.code, 'errno.code not found')
- t.equal(errno.all.length, 60, 'found ' + errno.all.length + ', expected 60')
- t.equal(errno.errno['-1'], errno.all[1], 'errno -1 not second element')
+ t.equal(errno.all.length, 59, 'found ' + errno.all.length + ', expected 59')
+ t.equal(errno.errno['-1'], errno.all[0], 'errno -1 not first element')
- t.equal(errno.code['UNKNOWN'], errno.all[1], 'code UNKNOWN not second element')
+ t.equal(errno.code['UNKNOWN'], errno.all[0], 'code UNKNOWN not first element')
- t.equal(errno.errno[1], errno.all[3], 'errno 1 not fourth element')
+ t.equal(errno.errno[1], errno.all[2], 'errno 1 not third element')
- t.equal(errno.code['EOF'], errno.all[3], 'code EOF not fourth element')
+ t.equal(errno.code['EOF'], errno.all[2], 'code EOF not third element')
t.end()
})
test('custom errors', function (t) {
- const Cust = errno.create('FooNotBarError')
- const cust = new Cust('foo is not bar')
+ var Cust = errno.create('FooNotBarError')
+ var cust = new Cust('foo is not bar')
t.equal(cust.name, 'FooNotBarError', 'correct custom name')
t.equal(cust.type, 'FooNotBarError', 'correct custom type')
@@ -29,60 +29,3 @@ test('custom errors', function (t) {
t.notOk(cust.cause, 'no cause')
t.end()
})
-
-test('callstack', function (t) {
- const MyError = errno.create('MyError')
-
- function lastFunction (ErrorType, cb) {
- process.nextTick(cb, new ErrorType('oh noes!'))
- }
-
- function secondLastFunction (ErrorType, cb) {
- lastFunction(ErrorType, cb)
- }
-
- function testFrames (t) {
- return function (err) {
- const stack = ErrorStackParser.parse(err)
- t.same(stack[0].functionName, 'lastFunction', 'last stack frame ok')
- t.same(stack[1].functionName, 'secondLastFunction', 'second last stack frame ok')
- t.end()
- }
- }
-
- t.test('custom error, default prototype', function (t) {
- secondLastFunction(MyError, testFrames(t))
- })
-
- t.test('custom error, custom prototype', function (t) {
- const MyError2 = errno.create('MyError2', MyError)
- secondLastFunction(MyError2, testFrames(t))
- })
-
- t.test('custom error, using inheritance', function (t) {
- const CustomError = errno.custom.CustomError
-
- function MyError3 (message, cause) {
- CustomError.call(this, message, cause)
- }
-
- inherits(MyError3, CustomError)
-
- secondLastFunction(MyError3, testFrames(t))
- })
-})
-
-test('error without message', function (t) {
- const Cust = errno.create('WriteError')
- const cust = new Cust({
- code: 22,
- message: '',
- name: 'QuotaExceededError'
- })
-
- t.equal(cust.name, 'WriteError', 'correct custom name')
- t.equal(cust.type, 'WriteError', 'correct custom type')
- t.equal(cust.message, 'QuotaExceededError', 'message is the name')
- t.notOk(cust.cause, 'no cause')
- t.end()
-})