appium-logger
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -101,2 +101,9 @@ 'use strict'; | ||
wrappedLogger.errorAndThrow = function (err) { | ||
if (!(err instanceof Error)) { | ||
err = new Error(err); | ||
} | ||
this.error(err); | ||
throw err; | ||
}; | ||
return wrappedLogger; | ||
@@ -108,2 +115,2 @@ } | ||
exports['default'] = log; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9sb2dnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O1FBUWdCLFdBQVcsR0FBWCxXQUFXO1FBZVgsU0FBUyxHQUFULFNBQVM7O3NCQXZCTixRQUFROzs7O0FBRTNCLElBQU0sU0FBUyxHQUFHLENBQUMsT0FBTyxFQUFFLFNBQVMsRUFBRSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsT0FBTyxDQUFDLENBQUM7QUFDakYsSUFBSSxPQUFPLEdBQUcsRUFBRSxDQUFDOzs7Ozs7QUFDakIsb0NBQWMsU0FBUyw0R0FBRTtRQUFoQixDQUFDOztBQUNSLFdBQU8sQ0FBQyxDQUFDLENBQUMsR0FBRyxZQUFNLEVBQUUsQ0FBQztHQUN2Qjs7Ozs7Ozs7Ozs7Ozs7OztBQUVNLFNBQVMsV0FBVyxDQUFDLE1BQU0sRUFBRTtBQUNsQyxNQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssRUFBRTtBQUNqQixVQUFNLENBQUMsUUFBUSxDQUFDLE9BQU8sRUFBRSxJQUFJLEVBQUUsRUFBRSxFQUFFLEVBQUUsTUFBTSxFQUFFLEVBQUUsRUFBRSxPQUFPLEVBQUUsRUFBRSxLQUFLLENBQUMsQ0FBQztHQUNwRTtDQUNGOztBQUVELFNBQVMsVUFBVSxHQUFJO0FBQ3JCLE1BQU0sV0FBVyxHQUFHLFFBQVEsQ0FBQyxPQUFPLEN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xldCBrIG9mIG5wbUxldmVscykge1xuICAgIHdyYXBwZWRMb2dnZXJba10gPSBsb2dnZXJba10uYmluZChsb2dnZXIsIHByZWZpeCk7XG4gIH1cbiAgd3JhcHBlZExvZ2dlci5lcnJvckFuZFRocm93ID0gZnVuY3Rpb24gKGVycikge1xuICAgIGlmICghKGVyciBpbnN0YW5jZW9mIEVycm9yKSkge1xuICAgICAgZXJyID0gbmV3IEVycm9yKGVycik7XG4gICAgfVxuICAgIHRoaXMuZXJyb3IoZXJyKTtcbiAgICB0aHJvdyBlcnI7XG4gIH07XG4gIHJldHVybiB3cmFwcGVkTG9nZ2VyO1xufVxuXG5jb25zdCBsb2cgPSBnZXRMb2dnZXIoKTtcblxuZXhwb3J0IGRlZmF1bHQgbG9nO1xuIl19 |
@@ -35,4 +35,9 @@ 'use strict'; | ||
(0, _helpers.assertOutputContains)(writers, 'error'); | ||
(function () { | ||
log.errorAndThrow('msg'); | ||
}).should['throw']('msg'); | ||
(0, _helpers.assertOutputContains)(writers, 'error'); | ||
(0, _helpers.assertOutputContains)(writers, 'msg'); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvbG9nZ2VyLWZvcmNlLXNwZWNzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O3VCQUdxQyxXQUFXOztBQUhoRCxPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQyxPQUFPLEVBQUUsQ0FBQzs7QUFLeEMsUUFBUSxDQUFDLHVCQUF1QixFQUFFLFlBQU07QUFDdEMsTUFBSSxPQUFPLFlBQUE7TUFBRSxHQUFHLFlBQUEsQ0FBQztBQUNqQixRQUFNLENBQUMsWUFBTTtBQUNYLFdBQU8sR0FBRyxhQU42QixZQUFZLEdBTTNCLENBQUM7QUFDekIsT0FBRyxHQUFHLGFBUEQsZ0JBQWdCLEVBT0UsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFD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GVidWcnKTtcbiAgICBsb2cuaW5mbygnaW5mbycpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICdpbmZvJyk7XG4gICAgbG9nLmh0dHAoJ2h0dHAnKTtcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnaHR0cCcpO1xuICAgIGxvZy53YXJuKCd3YXJuJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ3dhcm4nKTtcbiAgICBsb2cuZXJyb3IoJ2Vycm9yJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ2Vycm9yJyk7XG4gICAgKCgpID0+IHsgbG9nLmVycm9yQW5kVGhyb3coJ21zZycpOyB9KS5zaG91bGQudGhyb3coJ21zZycpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICdlcnJvcicpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICdtc2cnKTtcbiAgfSk7XG59KTtcbiJdfQ== |
@@ -36,2 +36,12 @@ 'use strict'; | ||
}); | ||
it('throw should not rewrite log levels outside of testing and throw error', function () { | ||
(function () { | ||
log.errorAndThrow('msg1'); | ||
}).should['throw']('msg1'); | ||
(function () { | ||
log.errorAndThrow(new Error('msg2')); | ||
}).should['throw']('msg2'); | ||
(0, _helpers.assertOutputContains)(writers, 'msg1'); | ||
(0, _helpers.assertOutputContains)(writers, 'msg2'); | ||
}); | ||
}); | ||
@@ -75,3 +85,10 @@ | ||
}); | ||
it('throw should not rewrite log levels outside of testing and throw error', function () { | ||
(function () { | ||
log.errorAndThrow('msg'); | ||
}).should['throw']('msg'); | ||
(0, _helpers.assertOutputContains)(writers, 'error'); | ||
(0, _helpers.assertOutputContains)(writers, 'myprefix'); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvbG9nZ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maXgnKTtcbiAgICBsb2cudmVyYm9zZSgndmVyYm9zZScpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICd2ZXJib3NlJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ215cHJlZml4Jyk7XG4gICAgbG9nLnZlcmJvc2UoJ2RlYnVnJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ2RlYnVnJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ215cHJlZml4Jyk7XG4gICAgbG9nLmluZm8oJ2luZm8nKTtcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnaW5mbycpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICdteXByZWZpeCcpO1xuICAgIGxvZy5odHRwKCdodHRwJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ2h0dHAnKTtcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnbXlwcmVmaXgnKTtcbiAgICBsb2cud2Fybignd2FybicpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICd3YXJuJyk7XG4gICAgYXNzZXJ0T3V0cHV0Q29udGFpbnMod3JpdGVycywgJ215cHJlZml4Jyk7XG4gICAgbG9nLmVycm9yKCdlcnJvcicpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICdlcnJvcicpO1xuICAgIGFzc2VydE91dHB1dENvbnRhaW5zKHdyaXRlcnMsICdteXByZWZpeCcpO1xuICB9KTtcbn0pO1xuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvbG9nZ2VyLW5vcm1hbC1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOz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gIGl0KCd0aHJvdyBzaG91bGQgbm90IHJld3JpdGUgbG9nIGxldmVscyBvdXRzaWRlIG9mIHRlc3RpbmcgYW5kIHRocm93IGVycm9yJywgKCkgPT4ge1xuICAgICgoKSA9PiB7IGxvZy5lcnJvckFuZFRocm93KCdtc2cnKTsgfSkuc2hvdWxkLnRocm93KCdtc2cnKTtcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnZXJyb3InKTtcbiAgICBhc3NlcnRPdXRwdXRDb250YWlucyh3cml0ZXJzLCAnbXlwcmVmaXgnKTtcbiAgfSk7XG59KTtcbiJdfQ== |
@@ -27,5 +27,8 @@ 'use strict'; | ||
log.error(text); | ||
(function () { | ||
log.errorAndThrow(text); | ||
}).should['throw'](text); | ||
(0, _helpers.assertOutputDoesntContain)(writers, text); | ||
}); | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvbG9nZ2VyLXRlc3Qtc3BlY3MuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7dUJBRzBDLFdBQVc7O0FBSHJELE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDOztBQUt4QyxRQUFRLENBQUMsYUFBYSxFQUFFLFlBQU07QUFDNUIsTUFBSSxPQUFPLFlBQUE7TUFBRSxHQUFHLFlBQUEsQ0FBQztBQUNqQixRQUFNLENBQUMsWUFBTTtBQUNYLFdBQU8sR0FBRyxhQU42QixZQUFZLEdBTTNCLENBQUM7QUFDekIsT0FBRyxHQUFHLGFBUEQsZ0JBQWdCLEVBT0UsSUFBSSxDQUFDLENBQUM7R0FDOUIsQ0FBQyxDQUFDOztBQUVILE9BQUssQ0FBQyxZQUFNO0FBQ1YsaUJBWHVCLGNBQWMsRUFXdEIsT0FBTyxDQUFDLENBQUM7R0FDekIsQ0FBQyxDQUFDOztBQUVILElBQUUsQ0FBQyw2Q0FB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TtcblxuICBpdCgnc2hvdWxkIHJld3JpdGUgbnBtbG9nIGxldmVscyBkdXJpbmcgdGVzdGluZycsICgpID0+IHtcbiAgICBjb25zdCB0ZXh0ID0gJ2hpJztcbiAgICBsb2cuc2lsbHkodGV4dCk7XG4gICAgbG9nLnZlcmJvc2UodGV4dCk7XG4gICAgbG9nLmluZm8odGV4dCk7XG4gICAgbG9nLmh0dHAodGV4dCk7XG4gICAgbG9nLndhcm4odGV4dCk7XG4gICAgbG9nLmVycm9yKHRleHQpO1xuICAgICgoKSA9PiB7IGxvZy5lcnJvckFuZFRocm93KHRleHQpOyB9KS5zaG91bGQudGhyb3codGV4dCk7XG4gICAgYXNzZXJ0T3V0cHV0RG9lc250Q29udGFpbih3cml0ZXJzLCB0ZXh0KTtcbiAgfSk7XG59KTtcbiJdfQ== |
@@ -36,2 +36,9 @@ import npmlog from 'npmlog'; | ||
} | ||
wrappedLogger.errorAndThrow = function (err) { | ||
if (!(err instanceof Error)) { | ||
err = new Error(err); | ||
} | ||
this.error(err); | ||
throw err; | ||
}; | ||
return wrappedLogger; | ||
@@ -38,0 +45,0 @@ } |
@@ -7,5 +7,5 @@ { | ||
], | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "appium", | ||
"license": "Apache License 2.0", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
@@ -30,13 +30,12 @@ "type": "git", | ||
"q": "^1.4.1", | ||
"source-map-support": "^0.2.10" | ||
"source-map-support": "^0.3.1" | ||
}, | ||
"scripts": { | ||
"prepublish": "./node_modules/.bin/gulp prepublish", | ||
"test": "./node_modules/.bin/gulp once", | ||
"watch": "./node_modules/.bin/gulp" | ||
"prepublish": "gulp prepublish", | ||
"test": "gulp once", | ||
"watch": "gulp" | ||
}, | ||
"devDependencies": { | ||
"appium-gulp-plugins": "^1.0.3", | ||
"chai": "^2.3.0", | ||
"chai-as-promised": "^5.0.0", | ||
"chai": "^3.0.0", | ||
"gulp": "^3.8.11", | ||
@@ -43,0 +42,0 @@ "lodash": "^3.9.1", |
@@ -5,2 +5,3 @@ appium-logger | ||
[![Build Status](https://travis-ci.org/appium/logger.svg?branch=master)](https://travis-ci.org/appium/logger) | ||
[![Coverage Status](https://coveralls.io/repos/appium/logger/badge.svg?branch=master)](https://coveralls.io/r/appium/logger?branch=master) | ||
@@ -7,0 +8,0 @@ Basic logger defaulting to `npmlog` with special consideration for running |
@@ -33,3 +33,6 @@ // transpile:mocha | ||
assertOutputContains(writers, 'error'); | ||
(() => { log.errorAndThrow('msg'); }).should.throw('msg'); | ||
assertOutputContains(writers, 'error'); | ||
assertOutputContains(writers, 'msg'); | ||
}); | ||
}); |
@@ -34,2 +34,8 @@ // transpile:mocha | ||
}); | ||
it('throw should not rewrite log levels outside of testing and throw error', () => { | ||
(() => { log.errorAndThrow('msg1'); }).should.throw('msg1'); | ||
(() => { log.errorAndThrow(new Error('msg2')); }).should.throw('msg2'); | ||
assertOutputContains(writers, 'msg1'); | ||
assertOutputContains(writers, 'msg2'); | ||
}); | ||
}); | ||
@@ -72,2 +78,7 @@ | ||
}); | ||
it('throw should not rewrite log levels outside of testing and throw error', () => { | ||
(() => { log.errorAndThrow('msg'); }).should.throw('msg'); | ||
assertOutputContains(writers, 'error'); | ||
assertOutputContains(writers, 'myprefix'); | ||
}); | ||
}); |
@@ -25,5 +25,5 @@ // transpile:mocha | ||
log.error(text); | ||
(() => { log.errorAndThrow(text); }).should.throw(text); | ||
assertOutputDoesntContain(writers, text); | ||
}); | ||
}); | ||
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
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
43996
6
575
15
0
+ Addedsource-map-support@0.3.3(transitive)
- Removedsource-map-support@0.2.10(transitive)
Updatedsource-map-support@^0.3.1