Comparing version 1.4.13 to 1.4.14
@@ -44,4 +44,70 @@ #!/usr/bin/env node | ||
var _RewiredData__ = Object.create(null); | ||
function _getGlobalObject() { | ||
try { | ||
if (!!global) { | ||
return global; | ||
} | ||
} catch (e) { | ||
try { | ||
if (!!window) { | ||
return window; | ||
} | ||
} catch (e) { | ||
return this; | ||
} | ||
} | ||
} | ||
; | ||
var _RewireModuleId__ = null; | ||
function _getRewireModuleId__() { | ||
if (_RewireModuleId__ === null) { | ||
var globalVariable = _getGlobalObject(); | ||
if (!globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__) { | ||
globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__ = 0; | ||
} | ||
_RewireModuleId__ = __$$GLOBAL_REWIRE_NEXT_MODULE_ID__++; | ||
} | ||
return _RewireModuleId__; | ||
} | ||
function _getRewireRegistry__() { | ||
var theGlobalVariable = _getGlobalObject(); | ||
if (!theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__) { | ||
theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); | ||
} | ||
return __$$GLOBAL_REWIRE_REGISTRY__; | ||
} | ||
function _getRewiredData__() { | ||
var moduleId = _getRewireModuleId__(); | ||
var registry = _getRewireRegistry__(); | ||
var rewireData = registry[moduleId]; | ||
if (!rewireData) { | ||
registry[moduleId] = Object.create(null); | ||
rewireData = registry[moduleId]; | ||
} | ||
return rewireData; | ||
} | ||
(function registerResetAll() { | ||
var theGlobalVariable = _getGlobalObject(); | ||
if (!theGlobalVariable['__rewire_reset_all__']) { | ||
theGlobalVariable['__rewire_reset_all__'] = function () { | ||
theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); | ||
}; | ||
} | ||
})(); | ||
var INTENTIONAL_UNDEFINED = '__INTENTIONAL_UNDEFINED__'; | ||
@@ -69,6 +135,8 @@ var _RewireAPI__ = {}; | ||
function _get__(variableName) { | ||
if (_RewiredData__ === undefined || _RewiredData__[variableName] === undefined) { | ||
var rewireData = _getRewiredData__(); | ||
if (rewireData[variableName] === undefined) { | ||
return _get_original__(variableName); | ||
} else { | ||
var value = _RewiredData__[variableName]; | ||
var value = rewireData[variableName]; | ||
@@ -111,6 +179,8 @@ if (value === INTENTIONAL_UNDEFINED) { | ||
function _assign__(variableName, value) { | ||
if (_RewiredData__ === undefined || _RewiredData__[variableName] === undefined) { | ||
var rewireData = _getRewiredData__(); | ||
if (rewireData[variableName] === undefined) { | ||
return _set_original__(variableName, value); | ||
} else { | ||
return _RewiredData__[variableName] = value; | ||
return rewireData[variableName] = value; | ||
} | ||
@@ -136,11 +206,13 @@ } | ||
function _set__(variableName, value) { | ||
var rewireData = _getRewiredData__(); | ||
if ((typeof variableName === 'undefined' ? 'undefined' : _typeof(variableName)) === 'object') { | ||
Object.keys(variableName).forEach(function (name) { | ||
_RewiredData__[name] = variableName[name]; | ||
rewireData[name] = variableName[name]; | ||
}); | ||
} else { | ||
if (value === undefined) { | ||
_RewiredData__[variableName] = INTENTIONAL_UNDEFINED; | ||
rewireData[variableName] = INTENTIONAL_UNDEFINED; | ||
} else { | ||
_RewiredData__[variableName] = value; | ||
rewireData[variableName] = value; | ||
} | ||
@@ -155,6 +227,16 @@ | ||
function _reset__(variableName) { | ||
delete _RewiredData__[variableName]; | ||
var rewireData = _getRewiredData__(); | ||
delete rewireData[variableName]; | ||
if (Object.keys(rewireData).length == 0) { | ||
delete _getRewireRegistry__()[_getRewireModuleId__]; | ||
} | ||
; | ||
} | ||
function _with__(object) { | ||
var rewireData = _getRewiredData__(); | ||
var rewiredVariableNames = Object.keys(object); | ||
@@ -165,3 +247,3 @@ var previousValues = {}; | ||
rewiredVariableNames.forEach(function (variableName) { | ||
_RewiredData__[variableName] = previousValues[variableName]; | ||
rewireData[variableName] = previousValues[variableName]; | ||
}); | ||
@@ -172,4 +254,4 @@ } | ||
rewiredVariableNames.forEach(function (variableName) { | ||
previousValues[variableName] = _RewiredData__[variableName]; | ||
_RewiredData__[variableName] = object[variableName]; | ||
previousValues[variableName] = rewireData[variableName]; | ||
rewireData[variableName] = object[variableName]; | ||
}); | ||
@@ -176,0 +258,0 @@ var result = callback(); |
@@ -141,4 +141,70 @@ 'use strict'; | ||
var _RewiredData__ = Object.create(null); | ||
function _getGlobalObject() { | ||
try { | ||
if (!!global) { | ||
return global; | ||
} | ||
} catch (e) { | ||
try { | ||
if (!!window) { | ||
return window; | ||
} | ||
} catch (e) { | ||
return this; | ||
} | ||
} | ||
} | ||
; | ||
var _RewireModuleId__ = null; | ||
function _getRewireModuleId__() { | ||
if (_RewireModuleId__ === null) { | ||
var globalVariable = _getGlobalObject(); | ||
if (!globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__) { | ||
globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__ = 0; | ||
} | ||
_RewireModuleId__ = __$$GLOBAL_REWIRE_NEXT_MODULE_ID__++; | ||
} | ||
return _RewireModuleId__; | ||
} | ||
function _getRewireRegistry__() { | ||
var theGlobalVariable = _getGlobalObject(); | ||
if (!theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__) { | ||
theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); | ||
} | ||
return __$$GLOBAL_REWIRE_REGISTRY__; | ||
} | ||
function _getRewiredData__() { | ||
var moduleId = _getRewireModuleId__(); | ||
var registry = _getRewireRegistry__(); | ||
var rewireData = registry[moduleId]; | ||
if (!rewireData) { | ||
registry[moduleId] = Object.create(null); | ||
rewireData = registry[moduleId]; | ||
} | ||
return rewireData; | ||
} | ||
(function registerResetAll() { | ||
var theGlobalVariable = _getGlobalObject(); | ||
if (!theGlobalVariable['__rewire_reset_all__']) { | ||
theGlobalVariable['__rewire_reset_all__'] = function () { | ||
theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); | ||
}; | ||
} | ||
})(); | ||
var INTENTIONAL_UNDEFINED = '__INTENTIONAL_UNDEFINED__'; | ||
@@ -166,6 +232,8 @@ var _RewireAPI__ = {}; | ||
function _get__(variableName) { | ||
if (_RewiredData__ === undefined || _RewiredData__[variableName] === undefined) { | ||
var rewireData = _getRewiredData__(); | ||
if (rewireData[variableName] === undefined) { | ||
return _get_original__(variableName); | ||
} else { | ||
var value = _RewiredData__[variableName]; | ||
var value = rewireData[variableName]; | ||
@@ -217,6 +285,8 @@ if (value === INTENTIONAL_UNDEFINED) { | ||
function _assign__(variableName, value) { | ||
if (_RewiredData__ === undefined || _RewiredData__[variableName] === undefined) { | ||
var rewireData = _getRewiredData__(); | ||
if (rewireData[variableName] === undefined) { | ||
return _set_original__(variableName, value); | ||
} else { | ||
return _RewiredData__[variableName] = value; | ||
return rewireData[variableName] = value; | ||
} | ||
@@ -242,11 +312,13 @@ } | ||
function _set__(variableName, value) { | ||
var rewireData = _getRewiredData__(); | ||
if ((typeof variableName === 'undefined' ? 'undefined' : _typeof(variableName)) === 'object') { | ||
Object.keys(variableName).forEach(function (name) { | ||
_RewiredData__[name] = variableName[name]; | ||
rewireData[name] = variableName[name]; | ||
}); | ||
} else { | ||
if (value === undefined) { | ||
_RewiredData__[variableName] = INTENTIONAL_UNDEFINED; | ||
rewireData[variableName] = INTENTIONAL_UNDEFINED; | ||
} else { | ||
_RewiredData__[variableName] = value; | ||
rewireData[variableName] = value; | ||
} | ||
@@ -261,6 +333,16 @@ | ||
function _reset__(variableName) { | ||
delete _RewiredData__[variableName]; | ||
var rewireData = _getRewiredData__(); | ||
delete rewireData[variableName]; | ||
if (Object.keys(rewireData).length == 0) { | ||
delete _getRewireRegistry__()[_getRewireModuleId__]; | ||
} | ||
; | ||
} | ||
function _with__(object) { | ||
var rewireData = _getRewiredData__(); | ||
var rewiredVariableNames = Object.keys(object); | ||
@@ -271,3 +353,3 @@ var previousValues = {}; | ||
rewiredVariableNames.forEach(function (variableName) { | ||
_RewiredData__[variableName] = previousValues[variableName]; | ||
rewireData[variableName] = previousValues[variableName]; | ||
}); | ||
@@ -278,4 +360,4 @@ } | ||
rewiredVariableNames.forEach(function (variableName) { | ||
previousValues[variableName] = _RewiredData__[variableName]; | ||
_RewiredData__[variableName] = object[variableName]; | ||
previousValues[variableName] = rewireData[variableName]; | ||
rewireData[variableName] = object[variableName]; | ||
}); | ||
@@ -282,0 +364,0 @@ var result = callback(); |
@@ -123,4 +123,70 @@ 'use strict'; | ||
var _RewiredData__ = Object.create(null); | ||
function _getGlobalObject() { | ||
try { | ||
if (!!global) { | ||
return global; | ||
} | ||
} catch (e) { | ||
try { | ||
if (!!window) { | ||
return window; | ||
} | ||
} catch (e) { | ||
return this; | ||
} | ||
} | ||
} | ||
; | ||
var _RewireModuleId__ = null; | ||
function _getRewireModuleId__() { | ||
if (_RewireModuleId__ === null) { | ||
var globalVariable = _getGlobalObject(); | ||
if (!globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__) { | ||
globalVariable.__$$GLOBAL_REWIRE_NEXT_MODULE_ID__ = 0; | ||
} | ||
_RewireModuleId__ = __$$GLOBAL_REWIRE_NEXT_MODULE_ID__++; | ||
} | ||
return _RewireModuleId__; | ||
} | ||
function _getRewireRegistry__() { | ||
var theGlobalVariable = _getGlobalObject(); | ||
if (!theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__) { | ||
theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); | ||
} | ||
return __$$GLOBAL_REWIRE_REGISTRY__; | ||
} | ||
function _getRewiredData__() { | ||
var moduleId = _getRewireModuleId__(); | ||
var registry = _getRewireRegistry__(); | ||
var rewireData = registry[moduleId]; | ||
if (!rewireData) { | ||
registry[moduleId] = Object.create(null); | ||
rewireData = registry[moduleId]; | ||
} | ||
return rewireData; | ||
} | ||
(function registerResetAll() { | ||
var theGlobalVariable = _getGlobalObject(); | ||
if (!theGlobalVariable['__rewire_reset_all__']) { | ||
theGlobalVariable['__rewire_reset_all__'] = function () { | ||
theGlobalVariable.__$$GLOBAL_REWIRE_REGISTRY__ = Object.create(null); | ||
}; | ||
} | ||
})(); | ||
var INTENTIONAL_UNDEFINED = '__INTENTIONAL_UNDEFINED__'; | ||
@@ -148,6 +214,8 @@ var _RewireAPI__ = {}; | ||
function _get__(variableName) { | ||
if (_RewiredData__ === undefined || _RewiredData__[variableName] === undefined) { | ||
var rewireData = _getRewiredData__(); | ||
if (rewireData[variableName] === undefined) { | ||
return _get_original__(variableName); | ||
} else { | ||
var value = _RewiredData__[variableName]; | ||
var value = rewireData[variableName]; | ||
@@ -184,6 +252,8 @@ if (value === INTENTIONAL_UNDEFINED) { | ||
function _assign__(variableName, value) { | ||
if (_RewiredData__ === undefined || _RewiredData__[variableName] === undefined) { | ||
var rewireData = _getRewiredData__(); | ||
if (rewireData[variableName] === undefined) { | ||
return _set_original__(variableName, value); | ||
} else { | ||
return _RewiredData__[variableName] = value; | ||
return rewireData[variableName] = value; | ||
} | ||
@@ -209,11 +279,13 @@ } | ||
function _set__(variableName, value) { | ||
var rewireData = _getRewiredData__(); | ||
if ((typeof variableName === 'undefined' ? 'undefined' : _typeof(variableName)) === 'object') { | ||
Object.keys(variableName).forEach(function (name) { | ||
_RewiredData__[name] = variableName[name]; | ||
rewireData[name] = variableName[name]; | ||
}); | ||
} else { | ||
if (value === undefined) { | ||
_RewiredData__[variableName] = INTENTIONAL_UNDEFINED; | ||
rewireData[variableName] = INTENTIONAL_UNDEFINED; | ||
} else { | ||
_RewiredData__[variableName] = value; | ||
rewireData[variableName] = value; | ||
} | ||
@@ -228,6 +300,16 @@ | ||
function _reset__(variableName) { | ||
delete _RewiredData__[variableName]; | ||
var rewireData = _getRewiredData__(); | ||
delete rewireData[variableName]; | ||
if (Object.keys(rewireData).length == 0) { | ||
delete _getRewireRegistry__()[_getRewireModuleId__]; | ||
} | ||
; | ||
} | ||
function _with__(object) { | ||
var rewireData = _getRewiredData__(); | ||
var rewiredVariableNames = Object.keys(object); | ||
@@ -238,3 +320,3 @@ var previousValues = {}; | ||
rewiredVariableNames.forEach(function (variableName) { | ||
_RewiredData__[variableName] = previousValues[variableName]; | ||
rewireData[variableName] = previousValues[variableName]; | ||
}); | ||
@@ -245,4 +327,4 @@ } | ||
rewiredVariableNames.forEach(function (variableName) { | ||
previousValues[variableName] = _RewiredData__[variableName]; | ||
_RewiredData__[variableName] = object[variableName]; | ||
previousValues[variableName] = rewireData[variableName]; | ||
rewireData[variableName] = object[variableName]; | ||
}); | ||
@@ -249,0 +331,0 @@ var result = callback(); |
{ | ||
"name": "deedee", | ||
"version": "1.4.13", | ||
"version": "1.4.14", | ||
"description": "A tool for detecting dependencies", | ||
@@ -61,4 +61,4 @@ "license": "MIT", | ||
"walk": "^2.3.9", | ||
"yargs": "^7.0.2" | ||
"yargs": "^7.1.0" | ||
} | ||
} |
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
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
156904
1055
Updatedyargs@^7.1.0