Skip to content

Commit

Permalink
update foxdriver patch
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbreiding committed Jul 23, 2020
1 parent 87c2513 commit 87029a7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 46 deletions.
46 changes: 0 additions & 46 deletions packages/server/patches/foxdriver+0.1.1.patch

This file was deleted.

49 changes: 49 additions & 0 deletions patches/@benmalka+foxdriver+0.4.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/node_modules/@benmalka/foxdriver/build/logger.js b/node_modules/@benmalka/foxdriver/build/logger.js
index c28401c..bfb5da4 100644
--- a/node_modules/@benmalka/foxdriver/build/logger.js
+++ b/node_modules/@benmalka/foxdriver/build/logger.js
@@ -5,9 +5,7 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = Logger;

-var _npmlog = require("npmlog");
-
-var _npmlog2 = _interopRequireDefault(_npmlog);
+const debug = require('debug')('@benmalka/foxdriver')

var _package = require("../package.json");

@@ -20,11 +18,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
*/
const NPM_LEVELS = ['silly', 'verbose', 'debug', 'info', 'http', 'warn', 'error', 'chrome', 'firefox'];

-_npmlog2.default.addLevel('debug', 1000, {
- fg: 'blue',
- bg: 'black'
-}, 'dbug');
-
function Logger(component) {
const wrappedLogger = {};
const prefix = _package2.default.name + (component ? `:${component}` : '');
@@ -34,10 +27,8 @@ function Logger(component) {

Object.defineProperty(wrappedLogger, 'level', {
get: () => {
- return _npmlog2.default.level;
},
set: newValue => {
- _npmlog2.default.level = newValue;
},
enumerable: true,
configurable: true
@@ -48,8 +39,8 @@ function Logger(component) {

for (let level of NPM_LEVELS) {
wrappedLogger[level] = (...args) => {
- if (!process.env.DEBUG) return;
- return _npmlog2.default[level](prefix, ...args);
+ // @see https://github.com/cypress-io/cypress/issues/7723
+ debug(prefix, ...args)
};
}

0 comments on commit 87029a7

Please sign in to comment.