From a11696a170ae4ca533effb31b9d8d99ed92c5865 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Fri, 9 Jun 2017 15:30:50 +0200 Subject: [PATCH] update smarterror --- dist/smarterror.plugins.d.ts | 1 + dist/smarterror.plugins.js | 4 +++- package.json | 2 ++ test/test.ts | 8 ++++++++ ts/smarterror.plugins.ts | 8 ++++++++ yarn.lock | 14 ++++++++++++++ 6 files changed, 36 insertions(+), 1 deletion(-) diff --git a/dist/smarterror.plugins.d.ts b/dist/smarterror.plugins.d.ts index 317822d..f811ef9 100644 --- a/dist/smarterror.plugins.d.ts +++ b/dist/smarterror.plugins.d.ts @@ -1 +1,2 @@ import 'typings-global'; +export { }; diff --git a/dist/smarterror.plugins.js b/dist/smarterror.plugins.js index fb52068..332154e 100644 --- a/dist/smarterror.plugins.js +++ b/dist/smarterror.plugins.js @@ -1,4 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("typings-global"); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlcnJvci5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRlcnJvci5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMEJBQXVCIn0= \ No newline at end of file +const sourceMapSupport = require("source-map-support"); +sourceMapSupport.install(); +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRlcnJvci5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRlcnJvci5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMEJBQXVCO0FBRXZCLHVEQUFzRDtBQUN0RCxnQkFBZ0IsQ0FBQyxPQUFPLEVBQUUsQ0FBQSJ9 \ No newline at end of file diff --git a/package.json b/package.json index da212a3..ea32608 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,8 @@ "tapbundle": "^1.0.13" }, "dependencies": { + "clean-stack": "^1.3.0", + "source-map-support": "^0.4.15", "typings-global": "^1.0.16" } } diff --git a/test/test.ts b/test/test.ts index cbee42f..d2aeef8 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1,3 +1,11 @@ import * as smarterror from '../dist/index' import { expect, tap } from 'tapbundle' + +tap.test('should create a valid error', async () => { + let myError = new smarterror.SmartError('wow') + expect(myError).to.be.instanceof(Error) + console.log(myError.stack) +}) + +tap.start() diff --git a/ts/smarterror.plugins.ts b/ts/smarterror.plugins.ts index 97b63a3..5245c54 100644 --- a/ts/smarterror.plugins.ts +++ b/ts/smarterror.plugins.ts @@ -1 +1,9 @@ import 'typings-global' + +import * as cleanStack from 'clean-stack' +import * as sourceMapSupport from 'source-map-support' +sourceMapSupport.install() + +export { + cleanStack +} diff --git a/yarn.lock b/yarn.lock index aba5f8c..ce71662 100644 --- a/yarn.lock +++ b/yarn.lock @@ -75,6 +75,10 @@ check-error@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" +clean-stack@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31" + concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" @@ -229,6 +233,16 @@ smartq@^1.1.1: typed-promisify "^0.3.0" typings-global "^1.0.14" +source-map-support@^0.4.15: + version "0.4.15" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.15.tgz#03202df65c06d2bd8c7ec2362a193056fef8d3b1" + dependencies: + source-map "^0.5.6" + +source-map@^0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + tapbundle@^1.0.13: version "1.0.14" resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.0.14.tgz#75827e335fcb02216f0267a26a26d702ddc02e3c"