module-keys
Advanced tools
Comparing version 2.0.0 to 2.0.1
101
cjs/index.js
@@ -72,61 +72,66 @@ /** | ||
delete module.exports; | ||
delete module.loaded; | ||
defineProperties( | ||
module, { | ||
exports: { | ||
enumerable: true, | ||
configurable: true, | ||
get() { | ||
return exports; | ||
}, | ||
set(newExports) { | ||
exports = newExports; | ||
if (newExports && | ||
(typeof newExports === 'object' || | ||
typeof newExports === 'function')) { | ||
if (!apply(hasOwnProperty, exports, [ 'publicKey' ])) { | ||
try { | ||
module.exports.publicKey = publicKey; | ||
} catch (exc) { | ||
// Oh well. We tried our best. | ||
} | ||
} | ||
if (!apply(hasOwnProperty, exports, [ publicKeySymbol ])) { | ||
try { | ||
module.exports[publicKeySymbol] = publicKey; | ||
} catch (exc) { | ||
// Oh well. We tried our best. | ||
} | ||
} | ||
} | ||
}, | ||
const properties = { | ||
exports: { | ||
enumerable: true, | ||
configurable: true, | ||
get() { | ||
return exports; | ||
}, | ||
loaded: { | ||
enumerable: true, | ||
configurable: true, | ||
get() { | ||
return loaded; | ||
}, | ||
set(newLoaded) { | ||
loaded = newLoaded; | ||
if (loaded === true) { | ||
// Stop virtualizing | ||
set(newExports) { | ||
exports = newExports; | ||
if (newExports && | ||
(typeof newExports === 'object' || | ||
typeof newExports === 'function')) { | ||
if (!apply(hasOwnProperty, exports, [ 'publicKey' ])) { | ||
try { | ||
delete module.exports; | ||
module.exports = exports; | ||
module.exports.publicKey = publicKey; | ||
} catch (exc) { | ||
// Best effort. | ||
// Oh well. We tried our best. | ||
} | ||
} | ||
if (!apply(hasOwnProperty, exports, [ publicKeySymbol ])) { | ||
try { | ||
delete module.loaded; | ||
module.loaded = loaded; | ||
module.exports[publicKeySymbol] = publicKey; | ||
} catch (exc) { | ||
// Best effort. | ||
// Oh well. We tried our best. | ||
} | ||
} | ||
}, | ||
} | ||
}, | ||
}); | ||
}, | ||
}; | ||
try { | ||
delete module.loaded; | ||
properties.loaded = { | ||
enumerable: true, | ||
configurable: true, | ||
get() { | ||
return loaded; | ||
}, | ||
set(newLoaded) { | ||
loaded = newLoaded; | ||
if (loaded === true) { | ||
// Stop virtualizing | ||
try { | ||
delete module.exports; | ||
module.exports = exports; | ||
} catch (exc) { | ||
// Best effort. | ||
} | ||
try { | ||
delete module.loaded; | ||
module.loaded = loaded; | ||
} catch (exc) { | ||
// Best effort. | ||
} | ||
} | ||
}, | ||
}; | ||
} catch (exc) { | ||
// Webpack locks this down. Good job, webpack! | ||
} | ||
defineProperties(module, properties); | ||
} | ||
module.exports.polyfill = polyfill; |
{ | ||
"name": "module-keys", | ||
"description": "Module identity as a basis for privilege separation for ESM & CommonJS modules", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "design-patterns", |
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
55516
986