spur-errors
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -1,2 +0,2 @@ | ||
'use strict';exports.__esModule = true;var _extends = Object.assign || function (target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i];for (var key in source) {if (Object.prototype.hasOwnProperty.call(source, key)) {target[key] = source[key];}}}return target;};var BaseError = { | ||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _extends = Object.assign || function (target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i];for (var key in source) {if (Object.prototype.hasOwnProperty.call(source, key)) {target[key] = source[key];}}}return target;};var BaseError = { | ||
create: function create(message, internalError) { | ||
@@ -3,0 +3,0 @@ Error.captureStackTrace(this); |
@@ -1,2 +0,2 @@ | ||
'use strict';exports.__esModule = true;var _BaseError = require('./BaseError');var _BaseError2 = _interopRequireDefault(_BaseError);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} | ||
'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _BaseError = require('./BaseError');var _BaseError2 = _interopRequireDefault(_BaseError);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} | ||
@@ -3,0 +3,0 @@ var SpurErrors = { |
{ | ||
"name": "spur-errors", | ||
"description": "Common error builder utility for Node.js. Contains common error types, and stack trace tracking to support more detailed error messages.", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"main": "lib/SpurErrors.js", | ||
@@ -22,4 +22,5 @@ "jsnext:main": "./src/SpurErrors", | ||
"scripts": { | ||
"build": "babel src -d lib --source-maps", | ||
"dev": "babel --watch src -d lib", | ||
"clean": "rm -rf lib/", | ||
"build": "npm run clean && babel src -d lib --source-maps", | ||
"dev": "npm run clean && babel --watch src -d lib", | ||
"lint": "eslint .", | ||
@@ -30,3 +31,6 @@ "pretest": "npm run lint", | ||
"test": "npm run test-unit && npm run test-integration", | ||
"build-and-test": "npm run build && npm test" | ||
"build-and-test": "npm run build && npm test", | ||
"preversion": "npm run build-and-test", | ||
"prepublish": "npm run test", | ||
"postinstall": "npm run build" | ||
}, | ||
@@ -43,14 +47,15 @@ "bugs": { | ||
"devDependencies": { | ||
"babel-cli": "^6.5.1", | ||
"babel-cli": "^6.18.0", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-plugin-transform-object-assign": "^6.8.0", | ||
"babel-preset-es2015": "^6.5.0", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-plugin-transform-regenerator": "6.16.1", | ||
"babel-preset-es2015": "^6.18.0", | ||
"babel-preset-es2015-loose": "^8.0.0", | ||
"chai": "^3.5.0", | ||
"eslint": "^2.4.0", | ||
"eslint-config-opentable": "^4.0.0", | ||
"eslint-plugin-import": "^1.8.1", | ||
"mocha": "^2.4.5", | ||
"eslint": "^3.13.1", | ||
"eslint-config-opentable": "^6.0.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"mocha": "^3.2.0", | ||
"sinon": "^1.17.3" | ||
} | ||
} |
@@ -5,5 +5,6 @@ <img src="https://opentable.github.io/spur/logos/Spur-Errors.png?rand=1" width="100%" alt="Spur: Errors" /> | ||
[](http://badge.fury.io/js/spur-errors) | ||
[](https://travis-ci.org/opentable/spur-errors) | ||
[](https://coveralls.io/github/opentable/spur-errors?branch=master) | ||
[](http://badge.fury.io/js/spur-errors) | ||
[](https://travis-ci.org/opentable/spur-errors) | ||
[](https://david-dm.org/opentable/spur-errors) | ||
[](https://david-dm.org/opentable/spur-errors?type=dev) | ||
@@ -18,2 +19,4 @@ # About the Spur Framework | ||
Supports active Node versions in the [LTS Schedule](https://github.com/nodejs/LTS#lts-schedule). ([view current versions](.travis.yml)) | ||
## Install from NPM | ||
@@ -153,4 +156,6 @@ | ||
> Requires Node 4+ for dev tools, but we recommend using Node 6. | ||
# License | ||
[MIT](LICENSE) |
const BaseError = { | ||
create(message, internalError) { | ||
Error.captureStackTrace(this); | ||
const error = Object.assign(new Error, BaseError); | ||
const error = Object.assign(new Error(), BaseError); | ||
if (message) { | ||
@@ -6,0 +6,0 @@ error.message = message; |
const path = require('path'); | ||
const chai = require('chai'); | ||
global.chai = chai; | ||
@@ -4,0 +5,0 @@ global.expect = chai.expect; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
21668
159
12
1