@truffle/error
Advanced tools
| declare class ExtendableError extends Error { | ||
| constructor(message: string); | ||
| } | ||
| export = ExtendableError; |
| "use strict"; | ||
| //Note: This class only exists for compatibility with some old Javascript | ||
| //stuff that avoided using Error directly for whatever reason. Eventually | ||
| //it should be eliminated. | ||
| class ExtendableError extends Error { | ||
| constructor(message) { | ||
| super(message); | ||
| this.name = this.constructor.name; | ||
| } | ||
| } | ||
| module.exports = ExtendableError; | ||
| //# sourceMappingURL=index.js.map |
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,0BAA0B;AAC1B,MAAM,eAAgB,SAAQ,KAAK;IACjC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACpC,CAAC;CACF;AAED,iBAAS,eAAe,CAAC"} |
+19
-5
| { | ||
| "name": "@truffle/error", | ||
| "version": "0.0.14-alphaTez.0", | ||
| "version": "0.0.14", | ||
| "description": "Simple module that allows native Error objects to be extended", | ||
| "main": "index.js", | ||
| "scripts": {}, | ||
| "repository": "https://github.com/trufflesuite/truffle/tree/master/packages/error", | ||
| "main": "./dist/src/index.js", | ||
| "types": "./dist/src/index.d.ts", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc", | ||
| "prepare": "yarn build" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/trufflesuite/truffle.git", | ||
| "directory": "packages/error" | ||
| }, | ||
| "keywords": [ | ||
@@ -23,3 +34,6 @@ "ethereum", | ||
| }, | ||
| "gitHead": "8feaf6fb72539e93f1ae51407fbeaa6f66c73317" | ||
| "devDependencies": { | ||
| "typescript": "^4.1.4" | ||
| }, | ||
| "gitHead": "d7dc01aed1995edf19db2c621df7ed03bf05521f" | ||
| } |
-25
| sudo: required | ||
| language: generic | ||
| services: | ||
| - docker | ||
| before_install: | ||
| - docker pull truffle/ci | ||
| env: | ||
| - TEST=repo | ||
| - TEST=upstream | ||
| - TEST=scenario | ||
| script: | ||
| - > | ||
| docker run -it --rm --name ${TEST} \ | ||
| -e TRAVIS_REPO_SLUG \ | ||
| -e TRAVIS_PULL_REQUEST \ | ||
| -e TRAVIS_PULL_REQUEST_SLUG \ | ||
| -e TRAVIS_PULL_REQUEST_BRANCH \ | ||
| -e TRAVIS_BRANCH \ | ||
| -e TEST \ | ||
| truffle/ci:latest run_tests |
| // From here: | ||
| // https://phabricator.babeljs.io/T3083 | ||
| // | ||
| // Turns out I was doing some bad things, but for now I'm going to | ||
| // keep on doing them. TODO: Stop it. | ||
| function ExtendableBuiltin(cls) { | ||
| function ExtendableBuiltin() { | ||
| cls.apply(this, arguments); | ||
| } | ||
| ExtendableBuiltin.prototype = Object.create(cls.prototype); | ||
| Object.setPrototypeOf(ExtendableBuiltin, cls); | ||
| return ExtendableBuiltin; | ||
| } | ||
| module.exports = ExtendableBuiltin; |
-21
| var ExtendableBuiltin = require("./extendablebuiltin"); | ||
| var inherits = require("util").inherits; | ||
| inherits(ExtendableError, ExtendableBuiltin(Error)); | ||
| // From: http://stackoverflow.com/questions/31089801/extending-error-in-javascript-with-es6-syntax | ||
| function ExtendableError(message) { | ||
| ExtendableError.super_.call(this); | ||
| this.message = message; | ||
| this.stack = new Error(message).stack; | ||
| this.name = this.constructor.name; | ||
| } | ||
| // Hack. Likely won't be formatted correctly when there are | ||
| // 10 or more errors. But if there's 10 or more errors, I'm guessing | ||
| // formatting won't matter so much. | ||
| ExtendableError.prototype.formatForMocha = function() { | ||
| this.message = this.message.replace(/\n/g, "\n "); | ||
| }; | ||
| module.exports = ExtendableError; |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
0
-100%2882
-17.02%1
Infinity%15
-51.61%1
Infinity%