From 479cbe74d8580b66442c644d3545de3ca3892f63 Mon Sep 17 00:00:00 2001 From: Alex Lapa Date: Fri, 25 May 2018 15:23:11 +1200 Subject: [PATCH 01/10] Issue #64: Support for inner errors --- lib/raygun.js | 5 +-- lib/raygun.messageBuilder.js | 63 +++++++++++++++++++++++------------- 2 files changed, 44 insertions(+), 24 deletions(-) diff --git a/lib/raygun.js b/lib/raygun.js index 263e2e0..5a7a14b 100644 --- a/lib/raygun.js +++ b/lib/raygun.js @@ -15,7 +15,7 @@ var MessageBuilder = require('./raygun.messageBuilder'); var OfflineStorage = require('./raygun.offline'); var Raygun = function () { - var _apiKey, _filters, raygun = this, _user, _version, _host, _port, _useSSL, _onBeforeSend, _offlineStorage, _isOffline, _offlineStorageOptions, _groupingKey, _tags, _useHumanStringForObject, _reportColumnNumbers; + var _apiKey, _filters, raygun = this, _user, _version, _host, _port, _useSSL, _onBeforeSend, _offlineStorage, _isOffline, _offlineStorageOptions, _groupingKey, _tags, _useHumanStringForObject, _reportColumnNumbers, _innerErrorFieldName; raygun.init = function (options) { _apiKey = options.apiKey; @@ -31,6 +31,7 @@ var Raygun = function () { _tags = options.tags; _useHumanStringForObject = options.useHumanStringForObject === undefined ? true : options.useHumanStringForObject; _reportColumnNumbers = options.reportColumnNumbers; + _innerErrorFieldName = options.innerErrorFieldName || 'cause'; // VError function to retrieve inner error; if (_isOffline) { _offlineStorage.init(_offlineStorageOptions); @@ -94,7 +95,7 @@ var Raygun = function () { mergedTags = mergedTags.concat(tags); } - var builder = new MessageBuilder({filters: _filters, useHumanStringForObject: _useHumanStringForObject, reportColumnNumbers: _reportColumnNumbers}) + var builder = new MessageBuilder({filters: _filters, useHumanStringForObject: _useHumanStringForObject, reportColumnNumbers: _reportColumnNumbers, innerErrorFieldName: _innerErrorFieldName}) .setErrorDetails(exception) .setRequestDetails(request) .setMachineName() diff --git a/lib/raygun.messageBuilder.js b/lib/raygun.messageBuilder.js index 0afd1e0..31b52a9 100644 --- a/lib/raygun.messageBuilder.js +++ b/lib/raygun.messageBuilder.js @@ -27,6 +27,46 @@ function filterKeys(obj, filters) { return obj; } +function getStackTrace(error, options) { + var stack = []; + var trace = stackTrace.parse(error); + + trace.forEach(function (callSite) { + var frame = { + lineNumber: callSite.getLineNumber(), + className: callSite.getTypeName() || 'unknown', + fileName: callSite.getFileName(), + methodName: callSite.getFunctionName() || '[anonymous]' + }; + + if (!!options.reportColumnNumbers && typeof (callSite.getColumnNumber) === 'function') { + frame.columnNumber = callSite.getColumnNumber(); + } + + stack.push(frame); + }); + + return stack; +} + +function buildError(error, options) { + var builtError = { + stackTrace: getStackTrace(error, options), + message: error.message || "NoMessage", + className: error.name + }; + + var innerError = error[options.innerErrorFieldName]; + + innerError = typeof innerError === 'function' ? innerError() : innerError; + + if(innerError instanceof Error) { + builtError.innerError = buildError(innerError, options); + } + + return builtError; +} + var RaygunMessageBuilder = function (options) { options = options || {}; var _filters; @@ -63,28 +103,7 @@ var RaygunMessageBuilder = function (options) { return this; } - var stack = []; - var trace = stackTrace.parse(error); - trace.forEach(function (callSite) { - var frame = { - lineNumber: callSite.getLineNumber(), - className: callSite.getTypeName() || 'unknown', - fileName: callSite.getFileName(), - methodName: callSite.getFunctionName() || '[anonymous]' - }; - - if (!!options.reportColumnNumbers && typeof (callSite.getColumnNumber) === 'function') { - frame.columnNumber = callSite.getColumnNumber(); - } - - stack.push(frame); - }); - - message.details.error = { - stackTrace: stack, - message: error.message || "NoMessage", - className: error.name - }; + message.details.error = buildError(error, options); return this; }; From 1375f009ded79e843bc6e0c45b9f2f5540c53c0f Mon Sep 17 00:00:00 2001 From: Alex Lapa Date: Fri, 25 May 2018 15:23:21 +1200 Subject: [PATCH 02/10] Issue #64: Tests for inner errors --- test/raygun.messageBuilder_test.js | 73 ++++++++++++++++++++++++++++++ test/raygun_send_test.js | 23 ++++++++++ 2 files changed, 96 insertions(+) diff --git a/test/raygun.messageBuilder_test.js b/test/raygun.messageBuilder_test.js index 75e512f..4049f0c 100644 --- a/test/raygun.messageBuilder_test.js +++ b/test/raygun.messageBuilder_test.js @@ -136,6 +136,79 @@ test('error builder tests', function (t) { }); }); +test('inner error builder tests', function (t) { + var innerErrorMessage = 'Inner'; + var innerInnerErrorMessage = 'InnerInner'; + + var innerErrorFieldName = 'innerCause'; + + var error = new Error('Outer'); + var innerError = new Error(innerErrorMessage); + var innerInnerError = new Error(innerInnerErrorMessage); + + error[innerErrorFieldName] = function () { + return innerError; + }; + + innerError[innerErrorFieldName] = function () { + return innerInnerError; + }; + + var builder = new MessageBuilder({ innerErrorFieldName: innerErrorFieldName }); + builder.setErrorDetails(error); + var message = builder.build(); + + t.test('inner errors', function (tt) { + tt.ok(message.details.error.innerError); + tt.ok(message.details.error.innerError.innerError); + tt.notOk(message.details.error.innerError.innerError.innerError); + + tt.end(); + }); + + t.test('inner errors stack traces', function (tt) { + tt.ok(message.details.error.innerError.stackTrace); + tt.ok(message.details.error.innerError.innerError.stackTrace); + var lines = 14; + + if (semver.satisfies(process.version, '>=6.0.0')) { + lines = 15; + } + + tt.equal(message.details.error.stackTrace.length, lines); + + tt.end(); + }); + + t.test('inner stack traces correct', function (tt) { + var stackTraces = [ + message.details.error.innerError.stackTrace, + message.details.error.innerError.innerError.stackTrace + ]; + + stackTraces.forEach(function (stackTrace) { + stackTrace.forEach(function (stackTraceLine) { + tt.ok(stackTraceLine.lineNumber); + tt.ok(stackTraceLine.className); + tt.ok(stackTraceLine.fileName); + tt.ok(stackTraceLine.methodName); + }); + }); + tt.end(); + }); + + t.test('inner errors messages correct', function (tt) { + tt.ok(message.details.error.innerError.message); + tt.ok(message.details.error.innerError.innerError.message); + + tt.equal(message.details.error.innerError.message, innerErrorMessage); + tt.equal(message.details.error.innerError.innerError.message, innerInnerErrorMessage); + + tt.end(); + t.end(); + }); +}); + test('environment builder', function (t) { var builder = new MessageBuilder(); builder.setEnvironmentDetails(); diff --git a/test/raygun_send_test.js b/test/raygun_send_test.js index 66aafd3..fe1fefb 100644 --- a/test/raygun_send_test.js +++ b/test/raygun_send_test.js @@ -37,6 +37,29 @@ test('send complex', {}, function (t) { }); }); +test('send with inner error', {}, function (t) { + t.plan(1); + + if (semver.satisfies(process.version, '=0.10')) { + t.pass('Ignored on node 0.10'); + t.end(); + return; + } + + var error = new Error('Outer'); + var innerError = new Error('Inner'); + + error.cause = function () { + return innerError; + }; + + var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); + client.send(error, {}, function (response) { + t.equals(response.statusCode, 202); + t.end(); + }); +}); + test('send with OnBeforeSend', {}, function (t) { t.plan(1); From 285cafa8ec1d97474089c9c683222cae26bcf5de Mon Sep 17 00:00:00 2001 From: Alex Lapa Date: Fri, 25 May 2018 15:46:57 +1200 Subject: [PATCH 03/10] Issue #64: Updated documentation and changelog with inner errors info --- CHANGELOG.md | 3 +++ README.md | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb5dffb..378d670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.10.0 +- Add support for inner errors. Option `innerErrorFieldName` to specify a field or a function on the error object to use for retrieval of an inner error. Defaults to `cause` which is used in [VError](https://github.com/joyent/node-verror) + ## 0.9.1 - Add an option to report column number for each frame of the stack trace diff --git a/README.md b/README.md index 290ce6b..3822e71 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,10 @@ Release 0.3 previously had a setUser function that accepted a string or function Call setVersion(*string*) on a RaygunClient to set the version of the calling application. This is expected to be of the format x.x.x.x, where x is a positive integer. The version will be visible in the dashboard. +### Inner Errors + +Starting from 0.10.0 support for inner errors was added. Provide option `innerErrorFieldName` to specify a field or a function on the error object to use for retrieval of an inner error. Inner errors will be retrieved recursively until there is no more errors. Option `innerErrorFieldName` defaults to `cause` which is used in [VError](https://github.com/joyent/node-verror), therefore `VError` is supported out of the box. + ### Changing the API endpoint You can change the endpoint that error messages are sent to by specifying the `host`, `port`, and `useSSL` properties in the `raygunClient.init()` options hash. By default, `host` is `api.raygun.io`, `port` is `443`, and `useSSL` is `true`. From 0c28a2d05bfcfd204480d26093270d3d4e1dec6e Mon Sep 17 00:00:00 2001 From: Alex Lapa Date: Fri, 25 May 2018 15:47:04 +1200 Subject: [PATCH 04/10] 0.10.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c890aec..1bf5535 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "raygun", "description": "Raygun.io plugin for Node", - "version": "0.9.1", + "version": "0.10.0", "homepage": "https://github.com/MindscapeHQ/raygun4node", "author": { "name": "MindscapeHQ", From 2803f19051fc765676f03ba24823f4cc6584742b Mon Sep 17 00:00:00 2001 From: Alex Lapa Date: Fri, 15 Jun 2018 14:28:24 +1200 Subject: [PATCH 05/10] Issue #64: Fix support for verrors --- lib/raygun.messageBuilder.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/raygun.messageBuilder.js b/lib/raygun.messageBuilder.js index 31b52a9..466bf79 100644 --- a/lib/raygun.messageBuilder.js +++ b/lib/raygun.messageBuilder.js @@ -55,10 +55,8 @@ function buildError(error, options) { message: error.message || "NoMessage", className: error.name }; - - var innerError = error[options.innerErrorFieldName]; - innerError = typeof innerError === 'function' ? innerError() : innerError; + var innerError = typeof error[options.innerErrorFieldName] === 'function' ? error[options.innerErrorFieldName]() : error[options.innerErrorFieldName]; if(innerError instanceof Error) { builtError.innerError = buildError(innerError, options); From 122dd10edb64da77a972fba6c1528e5f0a539c5d Mon Sep 17 00:00:00 2001 From: Alex Lapa Date: Fri, 15 Jun 2018 14:35:50 +1200 Subject: [PATCH 06/10] Issue #64: Tests for verror support --- package.json | 3 ++- test/raygun.messageBuilder_test.js | 22 ++++++++++++++++++++++ test/raygun_send_test.js | 20 ++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1bf5535..c507c4a 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "devDependencies": { "jshint": "^2.5.6", "semver": "^5.0.3", - "tap": "^7.1.2" + "tap": "^7.1.2", + "verror": "^1.10.0" }, "dependencies": { "object-to-human-string": "0.0.3", diff --git a/test/raygun.messageBuilder_test.js b/test/raygun.messageBuilder_test.js index 4049f0c..d0f4c25 100644 --- a/test/raygun.messageBuilder_test.js +++ b/test/raygun.messageBuilder_test.js @@ -3,6 +3,7 @@ var test = require("tap").test; var MessageBuilder = require('../lib/raygun.messageBuilder.js'); var semver = require('semver'); +var VError = require('verror'); test('basic builder tests', function (t) { var builder = new MessageBuilder(); @@ -209,6 +210,27 @@ test('inner error builder tests', function (t) { }); }); +test('VError support', function (t) { + var innerErrorMessage = 'Inner'; + var innerInnerErrorMessage = 'InnerInner'; + + var error = new VError(new VError(new VError(innerInnerErrorMessage), innerErrorMessage), 'Outer Error'); + + var builder = new MessageBuilder({ innerErrorFieldName: 'cause'}); + builder.setErrorDetails(error); + var message = builder.build(); + + t.test('inner errors', function (tt) { + tt.ok(message.details.error.innerError); + tt.ok(message.details.error.innerError.innerError); + tt.notOk(message.details.error.innerError.innerError.innerError); + + tt.end(); + }); + + t.end(); +}); + test('environment builder', function (t) { var builder = new MessageBuilder(); builder.setEnvironmentDetails(); diff --git a/test/raygun_send_test.js b/test/raygun_send_test.js index fe1fefb..7dd580f 100644 --- a/test/raygun_send_test.js +++ b/test/raygun_send_test.js @@ -2,6 +2,8 @@ var test = require("tap").test; var semver = require('semver'); +var VError = require('verror'); + var Raygun = require('../lib/raygun.js'); test('send basic', {}, function (t) { @@ -60,6 +62,24 @@ test('send with inner error', {}, function (t) { }); }); +test('send with verror', {}, function (t) { + t.plan(1); + + if (semver.satisfies(process.version, '=0.10')) { + t.pass('Ignored on node 0.10'); + t.end(); + return; + } + + var error = new VError(new VError(new VError('Deep Error'), 'Inner Error'), 'Outer Error'); + + var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); + client.send(error, {}, function (response) { + t.equals(response.statusCode, 202); + t.end(); + }); +}); + test('send with OnBeforeSend', {}, function (t) { t.plan(1); From b3a42483aea4303d45bb672dfafbae55b58f9d4a Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Mon, 18 Jun 2018 14:37:28 +1200 Subject: [PATCH 07/10] Remove tests checking length of stacktrace as it is inconsistent --- test/raygun.messageBuilder_test.js | 353 +++++++++++++++-------------- 1 file changed, 187 insertions(+), 166 deletions(-) diff --git a/test/raygun.messageBuilder_test.js b/test/raygun.messageBuilder_test.js index d0f4c25..7322682 100644 --- a/test/raygun.messageBuilder_test.js +++ b/test/raygun.messageBuilder_test.js @@ -1,45 +1,44 @@ -'use strict'; +"use strict"; var test = require("tap").test; -var MessageBuilder = require('../lib/raygun.messageBuilder.js'); -var semver = require('semver'); -var VError = require('verror'); +var MessageBuilder = require("../lib/raygun.messageBuilder.js"); +var VError = require("verror"); -test('basic builder tests', function (t) { +test("basic builder tests", function(t) { var builder = new MessageBuilder(); var message = builder.build(); - t.test('messageBuild', function (tt) { + t.test("messageBuild", function(tt) { tt.ok(message); tt.end(); }); - t.test('occurred on', function (tt) { + t.test("occurred on", function(tt) { tt.ok(message.occurredOn); tt.end(); }); - t.test('details', function (tt) { + t.test("details", function(tt) { tt.ok(message.details); tt.end(); }); - - t.test('client details', function (tt) { + + t.test("client details", function(tt) { tt.ok(message.details.client); tt.ok(message.details.client.name); tt.ok(message.details.client.version); tt.end(); }); - - t.test('machine name', function (tt) { + + t.test("machine name", function(tt) { var builder = new MessageBuilder(); - builder.setMachineName('server1'); + builder.setMachineName("server1"); var message = builder.build(); - tt.equals(message.details.machineName, 'server1'); + tt.equals(message.details.machineName, "server1"); tt.end(); }); - - t.test('default machine name', function (tt) { + + t.test("default machine name", function(tt) { var builder = new MessageBuilder(); builder.setMachineName(); var message = builder.build(); @@ -47,54 +46,42 @@ test('basic builder tests', function (t) { tt.end(); }); - t.test('humanise error string', function (tt){ - var builder = new MessageBuilder({ useHumanStringForObject:true }); - builder.setErrorDetails({name:'Test'}); + t.test("humanise error string", function(tt) { + var builder = new MessageBuilder({ useHumanStringForObject: true }); + builder.setErrorDetails({ name: "Test" }); var message = builder.build(); tt.ok(message.details.error.message); - tt.equal('name=Test', message.details.error.message); + tt.equal("name=Test", message.details.error.message); tt.ok(message.details.groupingKey); tt.end(); }); - t.test('dont humanise string', function (tt){ - var builder = new MessageBuilder({useHumanStringForObject:false}); - builder.setErrorDetails({name:'Test'}); + t.test("dont humanise string", function(tt) { + var builder = new MessageBuilder({ useHumanStringForObject: false }); + builder.setErrorDetails({ name: "Test" }); var message = builder.build(); tt.notOk(message.details.groupingKey); - tt.equal('NoMessage', message.details.error.message); + tt.equal("NoMessage", message.details.error.message); tt.end(); t.end(); }); }); -test('error builder tests', function (t) { +test("error builder tests", function(t) { var builder = new MessageBuilder(); builder.setErrorDetails(new Error()); var message = builder.build(); - - t.test('error', function (tt) { + + t.test("error", function(tt) { tt.ok(message.details.error); tt.end(); }); - - t.test('stack trace', function (tt) { - tt.ok(message.details.error.stackTrace); - var lines = 14; - if (semver.satisfies(process.version, '>=6.0.0')) { - lines = 15; - } - - tt.equal(message.details.error.stackTrace.length, lines); - tt.end(); - }); - - t.test('stack trace correct', function (tt) { + t.test("stack trace correct", function(tt) { var stackTrace = message.details.error.stackTrace; - stackTrace.forEach(function (stackTraceLine) { + stackTrace.forEach(function(stackTraceLine) { tt.ok(stackTraceLine.lineNumber); tt.ok(stackTraceLine.className); tt.ok(stackTraceLine.fileName); @@ -102,9 +89,9 @@ test('error builder tests', function (t) { }); tt.end(); }); - - t.test('error message correct', function (tt) { - var errorMessage = 'WarpCoreAlignment'; + + t.test("error message correct", function(tt) { + var errorMessage = "WarpCoreAlignment"; var builder = new MessageBuilder(); builder.setErrorDetails(new Error(errorMessage)); var message = builder.build(); @@ -112,21 +99,21 @@ test('error builder tests', function (t) { tt.equals(message.details.error.message, errorMessage); tt.end(); }); - - t.test('default error message correct', function (tt) { + + t.test("default error message correct", function(tt) { tt.ok(message.details.error.message); - tt.equals(message.details.error.message, 'NoMessage'); + tt.equals(message.details.error.message, "NoMessage"); tt.end(); }); - - t.test('class name correct', function (tt) { + + t.test("class name correct", function(tt) { tt.ok(message.details.error.className); - tt.equals(message.details.error.className, 'Error'); + tt.equals(message.details.error.className, "Error"); tt.end(); }); - - t.test('error from string', function(tt) { - var errorMessage = 'WarpCoreAlignment'; + + t.test("error from string", function(tt) { + var errorMessage = "WarpCoreAlignment"; var builder = new MessageBuilder(); builder.setErrorDetails(errorMessage); var message = builder.build(); @@ -137,58 +124,46 @@ test('error builder tests', function (t) { }); }); -test('inner error builder tests', function (t) { - var innerErrorMessage = 'Inner'; - var innerInnerErrorMessage = 'InnerInner'; +test("inner error builder tests", function(t) { + var innerErrorMessage = "Inner"; + var innerInnerErrorMessage = "InnerInner"; - var innerErrorFieldName = 'innerCause'; + var innerErrorFieldName = "innerCause"; - var error = new Error('Outer'); + var error = new Error("Outer"); var innerError = new Error(innerErrorMessage); var innerInnerError = new Error(innerInnerErrorMessage); - error[innerErrorFieldName] = function () { - return innerError; + error[innerErrorFieldName] = function() { + return innerError; }; - innerError[innerErrorFieldName] = function () { + innerError[innerErrorFieldName] = function() { return innerInnerError; }; - var builder = new MessageBuilder({ innerErrorFieldName: innerErrorFieldName }); + var builder = new MessageBuilder({ + innerErrorFieldName: innerErrorFieldName + }); builder.setErrorDetails(error); var message = builder.build(); - - t.test('inner errors', function (tt) { + + t.test("inner errors", function(tt) { tt.ok(message.details.error.innerError); tt.ok(message.details.error.innerError.innerError); tt.notOk(message.details.error.innerError.innerError.innerError); - - tt.end(); - }); - - t.test('inner errors stack traces', function (tt) { - tt.ok(message.details.error.innerError.stackTrace); - tt.ok(message.details.error.innerError.innerError.stackTrace); - var lines = 14; - - if (semver.satisfies(process.version, '>=6.0.0')) { - lines = 15; - } - - tt.equal(message.details.error.stackTrace.length, lines); tt.end(); }); - - t.test('inner stack traces correct', function (tt) { + + t.test("inner stack traces correct", function(tt) { var stackTraces = [ message.details.error.innerError.stackTrace, message.details.error.innerError.innerError.stackTrace ]; - stackTraces.forEach(function (stackTrace) { - stackTrace.forEach(function (stackTraceLine) { + stackTraces.forEach(function(stackTrace) { + stackTrace.forEach(function(stackTraceLine) { tt.ok(stackTraceLine.lineNumber); tt.ok(stackTraceLine.className); tt.ok(stackTraceLine.fileName); @@ -197,30 +172,36 @@ test('inner error builder tests', function (t) { }); tt.end(); }); - - t.test('inner errors messages correct', function (tt) { + + t.test("inner errors messages correct", function(tt) { tt.ok(message.details.error.innerError.message); tt.ok(message.details.error.innerError.innerError.message); tt.equal(message.details.error.innerError.message, innerErrorMessage); - tt.equal(message.details.error.innerError.innerError.message, innerInnerErrorMessage); - + tt.equal( + message.details.error.innerError.innerError.message, + innerInnerErrorMessage + ); + tt.end(); - t.end(); + t.end(); }); }); -test('VError support', function (t) { - var innerErrorMessage = 'Inner'; - var innerInnerErrorMessage = 'InnerInner'; +test("VError support", function(t) { + var innerErrorMessage = "Inner"; + var innerInnerErrorMessage = "InnerInner"; - var error = new VError(new VError(new VError(innerInnerErrorMessage), innerErrorMessage), 'Outer Error'); + var error = new VError( + new VError(new VError(innerInnerErrorMessage), innerErrorMessage), + "Outer Error" + ); - var builder = new MessageBuilder({ innerErrorFieldName: 'cause'}); + var builder = new MessageBuilder({ innerErrorFieldName: "cause" }); builder.setErrorDetails(error); var message = builder.build(); - t.test('inner errors', function (tt) { + t.test("inner errors", function(tt) { tt.ok(message.details.error.innerError); tt.ok(message.details.error.innerError.innerError); tt.notOk(message.details.error.innerError.innerError.innerError); @@ -231,37 +212,43 @@ test('VError support', function (t) { t.end(); }); -test('environment builder', function (t) { +test("environment builder", function(t) { var builder = new MessageBuilder(); builder.setEnvironmentDetails(); var message = builder.build(); - + // missing utcOffset for now as need to find a good way to test for its existence - var properties = ['processorCount', 'osVersion', 'cpu', 'architecture', 'totalPhysicalMemory', 'availablePhysicalMemory']; - + var properties = [ + "processorCount", + "osVersion", + "cpu", + "architecture", + "totalPhysicalMemory", + "availablePhysicalMemory" + ]; + t.plan(properties.length + 1); - + t.ok(message.details.environment); - - properties.forEach(function (i) { - t.ok(message.details.environment[i], i + ' should be set'); + + properties.forEach(function(i) { + t.ok(message.details.environment[i], i + " should be set"); }); }); -test('custom data builder', function (t) { - - t.test('custom data is set', function (tt) { +test("custom data builder", function(t) { + t.test("custom data is set", function(tt) { var builder = new MessageBuilder(); - builder.setUserCustomData({ foo: 'bar' }); + builder.setUserCustomData({ foo: "bar" }); var message = builder.build(); - + tt.ok(message.details.userCustomData); - tt.equals(message.details.userCustomData.foo, 'bar'); - + tt.equals(message.details.userCustomData.foo, "bar"); + tt.end(); }); - t.test('allow empty custom data', function (tt) { + t.test("allow empty custom data", function(tt) { var builder = new MessageBuilder(); builder.setUserCustomData(); var message = builder.build(); @@ -271,134 +258,168 @@ test('custom data builder', function (t) { }); }); -test('express4 request builder', function (t) { +test("express4 request builder", function(t) { var builder = new MessageBuilder(); - builder.setRequestDetails({ hostname: 'localhost' }); + builder.setRequestDetails({ hostname: "localhost" }); var message = builder.build(); - + t.ok(message.details.request.hostName); t.end(); }); -test('express3 request builder', function (t) { +test("express3 request builder", function(t) { var builder = new MessageBuilder(); - builder.setRequestDetails({ host: 'localhost' }); + builder.setRequestDetails({ host: "localhost" }); var message = builder.build(); t.ok(message.details.request.hostName); t.end(); }); -test('user and version builder tests', function (t) { - t.test('simple user', function (tt) { +test("user and version builder tests", function(t) { + t.test("simple user", function(tt) { var builder = new MessageBuilder(); - builder.setUser('testuser'); + builder.setUser("testuser"); var message = builder.build(); - tt.equals(message.details.user.identifier, 'testuser'); + tt.equals(message.details.user.identifier, "testuser"); tt.end(); }); - - t.test('user function', function (tt) { + + t.test("user function", function(tt) { var builder = new MessageBuilder(); - builder.setUser(function() { return 'testuser'; }); + builder.setUser(function() { + return "testuser"; + }); var message = builder.build(); - tt.equals(message.details.user.identifier, 'testuser'); + tt.equals(message.details.user.identifier, "testuser"); tt.end(); }); - - t.test('user function returning object', function (tt) { + + t.test("user function returning object", function(tt) { var builder = new MessageBuilder(); - builder.setUser(function() { return {identifier: 'testuser', email: 'test@example.com', notSupportedProp: 'ignore'}; }); + builder.setUser(function() { + return { + identifier: "testuser", + email: "test@example.com", + notSupportedProp: "ignore" + }; + }); var message = builder.build(); - tt.equals(message.details.user.identifier, 'testuser'); - tt.equals(message.details.user.email, 'test@example.com'); + tt.equals(message.details.user.identifier, "testuser"); + tt.equals(message.details.user.email, "test@example.com"); tt.equals(message.details.user.notSupportedProp, undefined); tt.end(); }); - t.test('set user with object', function (tt) { + t.test("set user with object", function(tt) { var builder = new MessageBuilder(); - builder.setUser({identifier: 'testuser', email: 'test@example.com', notSupportedProp: 'ignore'}); + builder.setUser({ + identifier: "testuser", + email: "test@example.com", + notSupportedProp: "ignore" + }); var message = builder.build(); - tt.equals(message.details.user.identifier, 'testuser', 'identifier should be set to the one in the object we returned from the user function'); - tt.equals(message.details.user.email, 'test@example.com', 'email should be set to the one in the object we returned from the user function'); - tt.equals(message.details.user.notSupportedProp, undefined, 'should skip unknown properties'); - tt.end(); - }); - - t.test('version set', function (tt) { + tt.equals( + message.details.user.identifier, + "testuser", + "identifier should be set to the one in the object we returned from the user function" + ); + tt.equals( + message.details.user.email, + "test@example.com", + "email should be set to the one in the object we returned from the user function" + ); + tt.equals( + message.details.user.notSupportedProp, + undefined, + "should skip unknown properties" + ); + tt.end(); + }); + + t.test("version set", function(tt) { var builder = new MessageBuilder(); - builder.setVersion('1.0.0.0'); + builder.setVersion("1.0.0.0"); var message = builder.build(); - tt.equals(message.details.version, '1.0.0.0'); + tt.equals(message.details.version, "1.0.0.0"); tt.end(); t.end(); }); }); -test('filter keys tests', function (t) { - var builder = new MessageBuilder({ filters: ['username', 'password', 'X-ApiKey'] }); - var body = { username: 'admin@raygun.io', password: 'nice try', remember: true }; - var queryString = { username: 'admin@raygun.io', remember: false }; - var headers = { 'X-ApiKey': '123456', 'Host': 'app.raygun.io' }; - builder.setRequestDetails({ body: body, query: queryString, headers: headers }); +test("filter keys tests", function(t) { + var builder = new MessageBuilder({ + filters: ["username", "password", "X-ApiKey"] + }); + var body = { + username: "admin@raygun.io", + password: "nice try", + remember: true + }; + var queryString = { username: "admin@raygun.io", remember: false }; + var headers = { "X-ApiKey": "123456", Host: "app.raygun.io" }; + builder.setRequestDetails({ + body: body, + query: queryString, + headers: headers + }); var message = builder.build(); - - t.test('form is filtered', function (tt) { + + t.test("form is filtered", function(tt) { tt.equals(message.details.request.form.username, undefined); tt.equals(message.details.request.form.password, undefined); tt.equals(message.details.request.form.remember, true); tt.end(); }); - - t.test('query string is filtered', function (tt) { + + t.test("query string is filtered", function(tt) { tt.equals(message.details.request.queryString.username, undefined); tt.equals(message.details.request.queryString.password, undefined); tt.equals(message.details.request.queryString.remember, false); tt.end(); }); - - t.test('headers are filtered', function (tt) { - tt.equals(message.details.request.headers['X-ApiKey'], undefined); - tt.equals(message.details.request.headers['Host'], 'app.raygun.io'); + + t.test("headers are filtered", function(tt) { + tt.equals(message.details.request.headers["X-ApiKey"], undefined); + tt.equals(message.details.request.headers["Host"], "app.raygun.io"); tt.end(); t.end(); }); }); -test('custom tags', function (t) { - t.test('with array', function(tt) { +test("custom tags", function(t) { + t.test("with array", function(tt) { var builder = new MessageBuilder(); - builder.setTags(['a', 'bb', 'c']); + builder.setTags(["a", "bb", "c"]); var message = builder.build(); - - tt.deepEqual(message.details.tags, ['a', 'bb', 'c']); + + tt.deepEqual(message.details.tags, ["a", "bb", "c"]); tt.end(); }); - - t.test('with null', function(tt) { + + t.test("with null", function(tt) { var builder = new MessageBuilder(); builder.setTags(null); var message = builder.build(); - + tt.notOk(message.details.tags); tt.end(); }); - - t.test('with undefined', function(tt) { + + t.test("with undefined", function(tt) { var builder = new MessageBuilder(); builder.setTags(undefined); var message = builder.build(); - + tt.notOk(message.details.tags); tt.end(); }); - - t.test('with non-array type', function(tt) { + + t.test("with non-array type", function(tt) { var builder = new MessageBuilder(); builder.setTags(5); var message = builder.build(); - + tt.notOk(message.details.tags); tt.end(); t.end(); From cbaa43a0b6b59c7fae3983c3f9ad71d6a99821c5 Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Mon, 18 Jun 2018 14:37:45 +1200 Subject: [PATCH 08/10] Add yarn.lock & nock --- package.json | 1 + yarn.lock | 1770 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1771 insertions(+) create mode 100644 yarn.lock diff --git a/package.json b/package.json index c507c4a..01381b9 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "verror": "^1.10.0" }, "dependencies": { + "nock": "~8", "object-to-human-string": "0.0.3", "stack-trace": "0.0.6" }, diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..1836682 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,1770 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + dependencies: + default-require-extensions "^1.0.0" + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +asn1@~0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + +assert-plus@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" + +assertion-error@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + +async@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + +aws-sign2@~0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" + +aws4@^1.2.1: + version "1.7.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" + +babel-code-frame@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + dependencies: + chalk "^1.1.3" + esutils "^2.0.2" + js-tokens "^3.0.2" + +babel-generator@^6.18.0: + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + dependencies: + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + detect-indent "^4.0.0" + jsesc "^1.3.0" + lodash "^4.17.4" + source-map "^0.5.7" + trim-right "^1.0.1" + +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + +babel-runtime@^6.22.0, babel-runtime@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.11.0" + +babel-template@^6.16.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + dependencies: + babel-runtime "^6.26.0" + babel-traverse "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + lodash "^4.17.4" + +babel-traverse@^6.18.0, babel-traverse@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + dependencies: + babel-code-frame "^6.26.0" + babel-messages "^6.23.0" + babel-runtime "^6.26.0" + babel-types "^6.26.0" + babylon "^6.18.0" + debug "^2.6.8" + globals "^9.18.0" + invariant "^2.2.2" + lodash "^4.17.4" + +babel-types@^6.18.0, babel-types@^6.26.0: + version "6.26.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + dependencies: + babel-runtime "^6.26.0" + esutils "^2.0.2" + lodash "^4.17.4" + to-fast-properties "^1.0.3" + +babylon@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + +bcrypt-pbkdf@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + dependencies: + tweetnacl "^0.14.3" + +bluebird@^3.3.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" + +boom@2.x.x: + version "2.10.1" + resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" + dependencies: + hoek "2.x.x" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +caching-transform@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-1.0.1.tgz#6dbdb2f20f8d8fbce79f3e94e9d1742dcdf5c0a1" + dependencies: + md5-hex "^1.2.0" + mkdirp "^0.5.1" + write-file-atomic "^1.1.4" + +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +"chai@>=1.9.2 <4.0.0": + version "3.5.0" + resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247" + dependencies: + assertion-error "^1.0.1" + deep-eql "^0.1.3" + type-detect "^1.0.0" + +chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +clean-yaml-object@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz#63fb110dc2ce1a84dc21f6d9334876d010ae8b68" + +cli@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cli/-/cli-1.0.1.tgz#22817534f24bfa4950c34d532d48ecbc621b8c14" + dependencies: + exit "0.1.2" + glob "^7.1.1" + +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +color-support@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + +combined-stream@^1.0.5, combined-stream@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" + dependencies: + delayed-stream "~1.0.0" + +commander@^2.9.0: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +console-browserify@1.1.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" + dependencies: + date-now "^0.1.4" + +convert-source-map@^1.3.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" + +core-js@^2.4.0: + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +coveralls@^2.11.2: + version "2.13.3" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" + dependencies: + js-yaml "3.6.1" + lcov-parse "0.0.10" + log-driver "1.2.5" + minimist "1.2.0" + request "2.79.0" + +cross-spawn@^4: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +cryptiles@2.x.x: + version "2.0.5" + resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" + dependencies: + boom "2.x.x" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + dependencies: + assert-plus "^1.0.0" + +date-now@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" + +debug@^2.1.3, debug@^2.2.0, debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + +decamelize@^1.0.0, decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-eql@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2" + dependencies: + type-detect "0.1.1" + +deep-equal@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" + +deeper@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/deeper/-/deeper-2.1.0.tgz#bc564e5f73174fdf201e08b00030e8a14da74368" + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + dependencies: + strip-bom "^2.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +detect-indent@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + dependencies: + repeating "^2.0.0" + +diff@^1.3.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" + +dom-serializer@0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82" + dependencies: + domelementtype "~1.1.1" + entities "~1.1.1" + +domelementtype@1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" + +domelementtype@~1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b" + +domhandler@2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.3.0.tgz#2de59a0822d5027fabff6f032c2b25a2a8abe738" + dependencies: + domelementtype "1" + +domutils@1.5: + version "1.5.1" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" + dependencies: + dom-serializer "0" + domelementtype "1" + +ecc-jsbn@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" + dependencies: + jsbn "~0.1.0" + +entities@1.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.0.0.tgz#b2987aa3821347fcde642b24fdfc9e4fb712bf26" + +entities@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +events-to-array@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/events-to-array/-/events-to-array-1.1.2.tgz#2d41f563e1fe400ed4962fe1a4d5c6a7539df7f6" + +exit@0.1.2, exit@0.1.x: + version "0.1.2" + resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +extend@~3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +fill-range@^2.1.0: + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^3.0.0" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + +find-up@^1.0.0, find-up@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +foreground-child@^1.3.3, foreground-child@^1.5.3, foreground-child@^1.5.6: + version "1.5.6" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-1.5.6.tgz#4fd71ad2dfde96789b980a5c0a295937cb2f5ce9" + dependencies: + cross-spawn "^4" + signal-exit "^3.0.0" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + +form-data@~2.1.1: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1" + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.5" + mime-types "^2.1.12" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + dependencies: + assert-plus "^1.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.18.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + +graceful-fs@^4.1.11, graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +handlebars@^4.0.3: + version "4.0.11" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" + dependencies: + async "^1.4.0" + optimist "^0.6.1" + source-map "^0.4.4" + optionalDependencies: + uglify-js "^2.6" + +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +hawk@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" + dependencies: + boom "2.x.x" + cryptiles "2.x.x" + hoek "2.x.x" + sntp "1.x.x" + +hoek@2.x.x: + version "2.16.3" + resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" + +hosted-git-info@^2.1.4: + version "2.6.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" + +htmlparser2@3.8.x: + version "3.8.3" + resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.8.3.tgz#996c28b191516a8be86501a7d79757e5c70c1068" + dependencies: + domelementtype "1" + domhandler "2.3" + domutils "1.5" + entities "1.0" + readable-stream "1.1" + +http-signature@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" + dependencies: + assert-plus "^0.2.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +invariant@^2.2.2: + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + dependencies: + loose-envify "^1.0.0" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-dotfile@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-my-ip-valid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz#7b351b8e8edd4d3995d4d066680e664d94696824" + +is-my-json-valid@^2.12.4: + version "2.17.2" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.17.2.tgz#6b2103a288e94ef3de5cf15d29dd85fc4b78d65c" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + is-my-ip-valid "^1.0.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-number@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + +istanbul-lib-coverage@^1.0.0-alpha.4, istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" + +istanbul-lib-hook@^1.0.0-alpha.4: + version "1.1.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b" + dependencies: + append-transform "^0.4.0" + +istanbul-lib-instrument@^1.1.0-alpha.3: + version "1.10.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" + dependencies: + babel-generator "^6.18.0" + babel-template "^6.16.0" + babel-traverse "^6.18.0" + babel-types "^6.18.0" + babylon "^6.18.0" + istanbul-lib-coverage "^1.2.0" + semver "^5.3.0" + +istanbul-lib-report@^1.0.0-alpha.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259" + dependencies: + istanbul-lib-coverage "^1.1.2" + mkdirp "^0.5.1" + path-parse "^1.0.5" + supports-color "^3.1.2" + +istanbul-lib-source-maps@^1.0.0-alpha.10: + version "1.2.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6" + dependencies: + debug "^3.1.0" + istanbul-lib-coverage "^1.1.2" + mkdirp "^0.5.1" + rimraf "^2.6.1" + source-map "^0.5.3" + +istanbul-reports@^1.0.0-alpha.8: + version "1.3.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" + dependencies: + handlebars "^4.0.3" + +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + +js-yaml@3.6.1: + version "3.6.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +js-yaml@^3.2.7, js-yaml@^3.3.1: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + +jsesc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + +jshint@^2.5.6: + version "2.9.5" + resolved "https://registry.yarnpkg.com/jshint/-/jshint-2.9.5.tgz#1e7252915ce681b40827ee14248c46d34e9aa62c" + dependencies: + cli "~1.0.0" + console-browserify "1.1.x" + exit "0.1.x" + htmlparser2 "3.8.x" + lodash "3.7.x" + minimatch "~3.0.2" + shelljs "0.3.x" + strip-json-comments "1.0.x" + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + +json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +kind-of@^6.0.0: + version "6.0.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +lcov-parse@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash.assign@^4.0.3, lodash.assign@^4.0.6, lodash.assign@^4.0.9: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash@3.7.x: + version "3.7.0" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.7.0.tgz#3678bd8ab995057c07ade836ed2ef087da811d45" + +lodash@^4.17.4: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + +lodash@~4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.9.0.tgz#4c20d742f03ce85dc700e0dd7ab9bcab85e6fc14" + +log-driver@1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" + +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +loose-envify@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" + dependencies: + js-tokens "^3.0.0" + +lru-cache@^4.0.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + +md5-hex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" + dependencies: + md5-o-matic "^0.1.1" + +md5-o-matic@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/md5-o-matic/-/md5-o-matic-0.1.1.tgz#822bccd65e117c514fab176b25945d54100a03c3" + +micromatch@^2.3.11, micromatch@^2.3.8: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" + +mime-types@^2.1.12, mime-types@~2.1.7: + version "2.1.18" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" + dependencies: + mime-db "~1.33.0" + +minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + +mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +nock@~8: + version "8.2.2" + resolved "https://registry.yarnpkg.com/nock/-/nock-8.2.2.tgz#fe9d1b9d30e899e886bd79c420b06de7e90c478f" + dependencies: + chai ">=1.9.2 <4.0.0" + debug "^2.2.0" + deep-equal "^1.0.0" + json-stringify-safe "^5.0.1" + lodash "~4.9.0" + mkdirp "^0.5.0" + propagate "0.4.0" + qs "^6.0.2" + +normalize-package-data@^2.3.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +nyc@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-7.1.0.tgz#8e14971f3a15d1abbec7ac610ef54cb889e9ffb4" + dependencies: + arrify "^1.0.1" + caching-transform "^1.0.0" + convert-source-map "^1.3.0" + default-require-extensions "^1.0.0" + find-cache-dir "^0.1.1" + find-up "^1.1.2" + foreground-child "^1.5.3" + glob "^7.0.3" + istanbul-lib-coverage "^1.0.0-alpha.4" + istanbul-lib-hook "^1.0.0-alpha.4" + istanbul-lib-instrument "^1.1.0-alpha.3" + istanbul-lib-report "^1.0.0-alpha.3" + istanbul-lib-source-maps "^1.0.0-alpha.10" + istanbul-reports "^1.0.0-alpha.8" + md5-hex "^1.2.0" + micromatch "^2.3.11" + mkdirp "^0.5.0" + pkg-up "^1.0.0" + resolve-from "^2.0.0" + rimraf "^2.5.4" + signal-exit "^3.0.0" + spawn-wrap "^1.2.4" + test-exclude "^1.1.0" + yargs "^4.8.1" + yargs-parser "^2.4.1" + +oauth-sign@~0.8.1: + version "0.8.2" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + +object-to-human-string@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/object-to-human-string/-/object-to-human-string-0.0.3.tgz#7feb121a79496248ef8daa160da23862c09e89f2" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +only-shallow@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/only-shallow/-/only-shallow-1.2.0.tgz#71cecedba9324bc0518aef10ec080d3249dc2465" + +opener@^1.4.1: + version "1.4.3" + resolved "https://registry.yarnpkg.com/opener/-/opener-1.4.3.tgz#5c6da2c5d7e5831e8ffa3964950f8d6674ac90b8" + +optimist@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + dependencies: + minimist "~0.0.1" + wordwrap "~0.0.2" + +os-homedir@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.1.tgz#0d62bdf44b916fd3bbdcf2cab191948fb094f007" + +os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + +pkg-up@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" + dependencies: + find-up "^1.0.0" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + +propagate@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/propagate/-/propagate-0.4.0.tgz#f3fcca0a6fe06736a7ba572966069617c130b481" + +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +punycode@^1.3.2, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + +qs@^6.0.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" + dependencies: + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +readable-stream@1.1: + version "1.1.13" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.13.tgz#f6eef764f514c89e2b9e23146a75ba106756d23e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2, readable-stream@^2.0.2, readable-stream@^2.1.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +regenerator-runtime@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + +regex-cache@^0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + dependencies: + is-equal-shallow "^0.1.3" + +remove-trailing-separator@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +request@2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +resolve-from@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57" + +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + dependencies: + glob "^7.0.5" + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + +safer-buffer@^2.0.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +shelljs@0.3.x: + version "0.3.0" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +slide@^1.1.5: + version "1.1.6" + resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + +sntp@1.x.x: + version "1.0.9" + resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" + dependencies: + hoek "2.x.x" + +source-map@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@^0.5.3, source-map@^0.5.7, source-map@~0.5.1: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + +spawn-wrap@^1.2.4: + version "1.4.2" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c" + dependencies: + foreground-child "^1.5.6" + mkdirp "^0.5.0" + os-homedir "^1.0.1" + rimraf "^2.6.2" + signal-exit "^3.0.2" + which "^1.3.0" + +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +sshpk@^1.7.0: + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + dashdash "^1.12.0" + getpass "^0.1.1" + safer-buffer "^2.0.2" + optionalDependencies: + bcrypt-pbkdf "^1.0.0" + ecc-jsbn "~0.1.1" + jsbn "~0.1.0" + tweetnacl "~0.14.0" + +stack-trace@0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.6.tgz#1e719bd6a2629ff09c189e17a9ef902a94fc5db0" + +stack-utils@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-0.4.0.tgz#940cb82fccfa84e8ff2f3fdf293fe78016beccd1" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + dependencies: + safe-buffer "~5.1.0" + +stringstream@~0.0.4: + version "0.0.6" + resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" + +strip-ansi@^3.0.0, strip-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-json-comments@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.1.2: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +tap-mocha-reporter@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/tap-mocha-reporter/-/tap-mocha-reporter-2.0.1.tgz#c70316173d6e3a16c58e1ba92d5d6cd8de58a12e" + dependencies: + color-support "^1.1.0" + debug "^2.1.3" + diff "^1.3.2" + escape-string-regexp "^1.0.3" + glob "^7.0.5" + js-yaml "^3.3.1" + tap-parser "^2.0.0" + unicode-length "^1.0.0" + optionalDependencies: + readable-stream "^2.1.5" + +tap-parser@^2.0.0, tap-parser@^2.2.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/tap-parser/-/tap-parser-2.2.3.tgz#ade6e96e37bfd38ce0f162da067f34034f068b01" + dependencies: + events-to-array "^1.0.1" + js-yaml "^3.2.7" + optionalDependencies: + readable-stream "^2" + +tap@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/tap/-/tap-7.1.2.tgz#dfac3ecf14ac8547bbad25bbd16cf2c3743f65cf" + dependencies: + bluebird "^3.3.1" + clean-yaml-object "^0.1.0" + color-support "^1.1.0" + coveralls "^2.11.2" + deeper "^2.1.0" + foreground-child "^1.3.3" + glob "^7.0.0" + isexe "^1.0.0" + js-yaml "^3.3.1" + nyc "^7.1.0" + only-shallow "^1.0.2" + opener "^1.4.1" + os-homedir "1.0.1" + readable-stream "^2.0.2" + signal-exit "^3.0.0" + stack-utils "^0.4.0" + tap-mocha-reporter "^2.0.0" + tap-parser "^2.2.0" + tmatch "^2.0.1" + +test-exclude@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-1.1.0.tgz#f5ddd718927b12fd02f270a0aa939ceb6eea4151" + dependencies: + arrify "^1.0.1" + lodash.assign "^4.0.9" + micromatch "^2.3.8" + read-pkg-up "^1.0.1" + require-main-filename "^1.0.1" + +tmatch@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-2.0.1.tgz#0c56246f33f30da1b8d3d72895abaf16660f38cf" + +to-fast-properties@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + +tough-cookie@~2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" + dependencies: + punycode "^1.4.1" + +trim-right@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + +type-detect@0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822" + +type-detect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2" + +uglify-js@^2.6: + version "2.8.29" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +unicode-length@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/unicode-length/-/unicode-length-1.0.3.tgz#5ada7a7fed51841a418a328cf149478ac8358abb" + dependencies: + punycode "^1.3.2" + strip-ansi "^3.0.1" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +uuid@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" + +validate-npm-package-license@^3.0.1: + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +verror@1.10.0, verror@^1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +which@^1.2.9, which@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + dependencies: + isexe "^2.0.0" + +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +window-size@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" + +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wordwrap@~0.0.2: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write-file-atomic@^1.1.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-1.3.4.tgz#f807a4f0b1d9e913ae7a48112e6cc3af1991b45f" + dependencies: + graceful-fs "^4.1.11" + imurmurhash "^0.1.4" + slide "^1.1.5" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yargs-parser@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" + dependencies: + camelcase "^3.0.0" + lodash.assign "^4.0.6" + +yargs@^4.8.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" + dependencies: + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + lodash.assign "^4.0.3" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.1" + which-module "^1.0.0" + window-size "^0.2.0" + y18n "^3.2.1" + yargs-parser "^2.4.1" + +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" From fcb7b7df45861b795f0d7c016d6c207cd25f4661 Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Mon, 18 Jun 2018 14:38:18 +1200 Subject: [PATCH 09/10] Nock API queries so we do not have to hit real API --- test/raygun_send_test.js | 283 ++++++++++++++++++++++----------------- 1 file changed, 157 insertions(+), 126 deletions(-) diff --git a/test/raygun_send_test.js b/test/raygun_send_test.js index 7dd580f..e1644cd 100644 --- a/test/raygun_send_test.js +++ b/test/raygun_send_test.js @@ -1,150 +1,181 @@ -'use strict'; +"use strict"; var test = require("tap").test; -var semver = require('semver'); -var VError = require('verror'); - -var Raygun = require('../lib/raygun.js'); - -test('send basic', {}, function (t) { - t.plan(1); - - if (semver.satisfies(process.version, '=0.10')) { - t.pass('Ignored on node 0.10'); - t.end(); - return; - } - - var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); - client.send(new Error(), {}, function (response) { - t.equals(response.statusCode, 202); - t.end(); - }); +var semver = require("semver"); +var VError = require("verror"); +var nock = require("nock"); + +var Raygun = require("../lib/raygun.js"); + +nock(/.*/) + .post(/.*/, function() { + return true; + }) + .reply(202, {}) + .persist(); +var API_KEY = "apikey"; + +test("send basic", {}, function(t) { + t.plan(1); + + if (semver.satisfies(process.version, "=0.10")) { + t.pass("Ignored on node 0.10"); + t.end(); + return; + } + + var client = new Raygun.Client().init({ + apiKey: API_KEY + }); + client.send(new Error(), {}, function(response) { + t.equals(response.statusCode, 202); + t.end(); + }); }); -test('send complex', {}, function (t) { - t.plan(1); +test("send complex", {}, function(t) { + t.plan(1); - if (semver.satisfies(process.version, '=0.10')) { - t.pass('Ignored on node 0.10'); - t.end(); - return; - } + if (semver.satisfies(process.version, "=0.10")) { + t.pass("Ignored on node 0.10"); + t.end(); + return; + } - var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}).setUser("callum@mindscape.co.nz").setVersion("1.0.0.0"); + var client = new Raygun.Client() + .init({ apiKey: API_KEY }) + .setUser("callum@mindscape.co.nz") + .setVersion("1.0.0.0"); - client.send(new Error(), {}, function (response) { - t.equals(response.statusCode, 202); - t.end(); - }); + client.send(new Error(), {}, function(response) { + t.equals(response.statusCode, 202); + t.end(); + }); }); -test('send with inner error', {}, function (t) { - t.plan(1); - - if (semver.satisfies(process.version, '=0.10')) { - t.pass('Ignored on node 0.10'); - t.end(); - return; - } - - var error = new Error('Outer'); - var innerError = new Error('Inner'); - - error.cause = function () { - return innerError; - }; - - var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); - client.send(error, {}, function (response) { - t.equals(response.statusCode, 202); - t.end(); - }); +test("send with inner error", {}, function(t) { + t.plan(1); + + if (semver.satisfies(process.version, "=0.10")) { + t.pass("Ignored on node 0.10"); + t.end(); + return; + } + + var error = new Error("Outer"); + var innerError = new Error("Inner"); + + error.cause = function() { + return innerError; + }; + + var client = new Raygun.Client().init({ + apiKey: API_KEY + }); + client.send(error, {}, function(response) { + t.equals(response.statusCode, 202); + t.end(); + }); }); -test('send with verror', {}, function (t) { - t.plan(1); - - if (semver.satisfies(process.version, '=0.10')) { - t.pass('Ignored on node 0.10'); - t.end(); - return; - } - - var error = new VError(new VError(new VError('Deep Error'), 'Inner Error'), 'Outer Error'); - - var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); - client.send(error, {}, function (response) { - t.equals(response.statusCode, 202); - t.end(); - }); +test("send with verror", {}, function(t) { + t.plan(1); + + if (semver.satisfies(process.version, "=0.10")) { + t.pass("Ignored on node 0.10"); + t.end(); + return; + } + + var error = new VError( + new VError(new VError("Deep Error"), "Inner Error"), + "Outer Error" + ); + + var client = new Raygun.Client().init({ + apiKey: API_KEY + }); + client.send(error, {}, function(response) { + t.equals(response.statusCode, 202); + t.end(); + }); }); -test('send with OnBeforeSend', {}, function (t) { - t.plan(1); - - if (semver.satisfies(process.version, '=0.10')) { - t.pass('Ignored on node 0.10'); - t.end(); - return; - } - - var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); - - var onBeforeSendCalled = false; - client.onBeforeSend(function (payload) { - onBeforeSendCalled = true; - return payload; - }); - - client.send(new Error(), {}, function () { - t.equals(onBeforeSendCalled, true); - t.end(); - }); +test("send with OnBeforeSend", {}, function(t) { + t.plan(1); + + if (semver.satisfies(process.version, "=0.10")) { + t.pass("Ignored on node 0.10"); + t.end(); + return; + } + + var client = new Raygun.Client().init({ + apiKey: API_KEY + }); + + var onBeforeSendCalled = false; + client.onBeforeSend(function(payload) { + onBeforeSendCalled = true; + return payload; + }); + + client.send(new Error(), {}, function() { + t.equals(onBeforeSendCalled, true); + t.end(); + }); }); -test('send with expressHandler custom data', function (t) { - t.plan(1); - var client = new Raygun.Client().init({apiKey: process.env['RAYGUN_APIKEY']}); - - client.expressCustomData = function () { - return { 'test': 'data' }; - }; - client._send = client.send; - client.send = function (err, data) { - client.send = client._send; - t.equals(data.test, 'data'); - t.end(); - }; - client.expressHandler(new Error(), {}, {}, function () {}); +test("send with expressHandler custom data", function(t) { + t.plan(1); + var client = new Raygun.Client().init({ + apiKey: API_KEY + }); + + client.expressCustomData = function() { + return { test: "data" }; + }; + client._send = client.send; + client.send = function(err, data) { + client.send = client._send; + t.equals(data.test, "data"); + t.end(); + }; + client.expressHandler(new Error(), {}, {}, function() {}); }); -test('check that tags get passed through', {}, function (t) { - var tag = ['Test']; - var client = new Raygun.Client().init({apiKey: 'TEST'}); +test("check that tags get passed through", {}, function(t) { + var tag = ["Test"]; + var client = new Raygun.Client().init({ apiKey: "TEST" }); - client.setTags(tag); + client.setTags(tag); - client.onBeforeSend(function (payload) { - t.same(payload.details.tags, tag); - t.end(); - }); + client.onBeforeSend(function(payload) { + t.same(payload.details.tags, tag); + t.end(); + }); - client.send(new Error(), {}, function () { - t.end(); - }); + client.send(new Error(), {}, function() { + t.end(); + }); }); -test('check that tags get merged', {}, function (t) { - var client = new Raygun.Client().init({apiKey: 'TEST'}); - client.setTags(['Tag1']); +test("check that tags get merged", {}, function(t) { + var client = new Raygun.Client().init({ apiKey: "TEST" }); + client.setTags(["Tag1"]); - client.onBeforeSend(function (payload) { - t.same(payload.details.tags, ['Tag1', 'Tag2']); - t.end(); - }); + client.onBeforeSend(function(payload) { + t.same(payload.details.tags, ["Tag1", "Tag2"]); + t.end(); + }); - client.send(new Error(), {}, function () { - t.end(); - }, null, ["Tag2"]); -}); \ No newline at end of file + client.send( + new Error(), + {}, + function() { + t.end(); + }, + null, + ["Tag2"] + ); +}); From cf35f8cc910ccb212d5d5c971a5bc52b5d0251d4 Mon Sep 17 00:00:00 2001 From: Taylor Lodge Date: Mon, 18 Jun 2018 14:45:44 +1200 Subject: [PATCH 10/10] Drop node 4.1 from travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b06f6d..a4e49ff 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: node_js node_js: - "6.1.0" - - "4.1" - "0.12" - "0.11" - "0.10"