Skip to content

Commit

Permalink
fix: fixed codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Sep 18, 2019
1 parent 8903cdd commit 9a3f9db
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 171 deletions.
3 changes: 2 additions & 1 deletion .lib.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"browsers": [ "> 1%", "last 2 versions" ]
}
}]
]
],
"sourceMaps": "both"
}
56 changes: 0 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,41 +44,6 @@ const StackFrame = require('stackframe');
const ErrorStackParser = require('error-stack-parser');
const prepareStackTrace = require('prepare-stack-trace');

//
// The following override is required until this PR is merged
// <https://github.com/stacktracejs/stackframe/pull/23>
//
StackFrame.prototype.toString = function() {
const fileName = this.getFileName() || '';
const lineNumber = this.getLineNumber() || '';
const columnNumber = this.getColumnNumber() || '';
const functionName = this.getFunctionName() || '';
if (this.getIsEval()) {
if (fileName) {
return (
'[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')'
);
}

return '[eval]:' + lineNumber + ':' + columnNumber;
}

if (functionName) {
return (
functionName +
' (' +
fileName +
':' +
lineNumber +
':' +
columnNumber +
')'
);
}

return fileName + ':' + lineNumber + ':' + columnNumber;
};

const err1 = new Error('Oops!');
const err2 = new Error('Error 1 will inherit this stack trace');
err1.stack = prepareStackTrace(err1, ErrorStackParser.parse(err2));
Expand All @@ -95,27 +60,6 @@ console.log('err2', err2);
<script src="https://unpkg.com/prepare-stack-trace"></script>
<script type="text/javascript">
(function() {
//
// The following override is required until this PR is merged
// <https://github.com/stacktracejs/stackframe/pull/23>
//
StackFrame.prototype.toString = function() {
var fileName = this.getFileName() || '';
var lineNumber = this.getLineNumber() || '';
var columnNumber = this.getColumnNumber() || '';
var functionName = this.getFunctionName() || '';
if (this.getIsEval()) {
if (fileName) {
return '[eval] (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
}
return '[eval]:' + lineNumber + ':' + columnNumber;
}
if (functionName) {
return functionName + ' (' + fileName + ':' + lineNumber + ':' + columnNumber + ')';
}
return fileName + ':' + lineNumber + ':' + columnNumber;
}
var err1 = new Error('Oops!');
var err2 = new Error('Error 1 will inherit this stack trace');
err1.stack = prepareStackTrace(err1, ErrorStackParser.parse(err2));
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"@babel/cli": "^7.6.0",
"@babel/core": "^7.6.0",
"@babel/preset-env": "^7.6.0",
"@commitlint/cli": "^8.1.0",
"@commitlint/config-conventional": "^8.1.0",
"ava": "^2.3.0",
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"ava": "^2.4.0",
"babelify": "^10.0.0",
"browserify": "^16.5.0",
"codecov": "^3.5.0",
"cross-env": "^5.2.1",
"eslint": "^6.3.0",
"cross-env": "^6.0.0",
"eslint": "^6.4.0",
"eslint-config-xo-lass": "^1.0.3",
"eslint-plugin-compat": "^3.3.0",
"eslint-plugin-node": "^10.0.0",
Expand Down
Loading

0 comments on commit 9a3f9db

Please sign in to comment.