@wdio/logger
Advanced tools
Comparing version 5.4.1 to 5.4.6
@@ -11,4 +11,19 @@ "use strict"; | ||
*/ | ||
var _default = typeof process !== 'undefined' && typeof process.release !== 'undefined' && process.release.name === 'node' ? require('./node').default : require('./web').default; | ||
// By default, import the web code using a literal require, so that in webpack | ||
// contexts, it will always be bundled | ||
let mode = require('./web').default; // Then, if we're in a Node.js context, require the node version of this module | ||
// using a variable, so that it will _not_ be included in a bundle, either | ||
// during compilation or execution | ||
if (typeof process !== 'undefined' && typeof process.release !== 'undefined' && process.release.name === 'node') { | ||
const nodeMode = './node'; | ||
mode = require(nodeMode).default; | ||
} // The net result will be that in a Node context, we'll have required both | ||
// files but will use the correct one, and in the web context, we'll have only | ||
// required the web file, thus ensuring that the Node file and related | ||
// dependencies will not be bundled inadvertently. | ||
var _default = mode; | ||
exports.default = _default; |
{ | ||
"name": "@wdio/logger", | ||
"version": "5.4.1", | ||
"version": "5.4.6", | ||
"description": "A helper utility for logging of WebdriverIO packages", | ||
@@ -41,3 +41,3 @@ "author": "Christian Bromann <christian@saucelabs.com>", | ||
}, | ||
"gitHead": "7e099b188e163f06dfa4c7be21f0468477e2fe94" | ||
"gitHead": "c5286005408d3516b6d2ab920e4c39df8f9c2915" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6517
136
5