Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-leak-detector

Package Overview
Dependencies
Maintainers
2
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-leak-detector - npm Package Compare versions

Comparing version 23.0.0-alpha.2 to 23.0.0-alpha.4

43

build/index.js

@@ -7,3 +7,3 @@ /**

*
*
*
*/

@@ -13,3 +13,3 @@

Object.defineProperty(exports, "__esModule", {
Object.defineProperty(exports, '__esModule', {
value: true

@@ -21,3 +21,3 @@ });

function _load_prettyFormat() {
return _prettyFormat = _interopRequireDefault(require('pretty-format'));
return (_prettyFormat = _interopRequireDefault(require('pretty-format')));
}

@@ -28,3 +28,3 @@

function _load_v() {
return _v = _interopRequireDefault(require('v8'));
return (_v = _interopRequireDefault(require('v8')));
}

@@ -35,14 +35,30 @@

function _load_vm() {
return _vm = _interopRequireDefault(require('vm'));
return (_vm = _interopRequireDefault(require('vm')));
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
const PRIMITIVE_TYPES = new Set(['undefined', 'boolean', 'number', 'string', 'symbol']);
const PRIMITIVE_TYPES = new Set([
'undefined',
'boolean',
'number',
'string',
'symbol'
]);
exports.default = class {
constructor(value) {
if (this._isPrimitive(value)) {
throw new TypeError(['Primitives cannot leak memory.', 'You passed a ' + typeof value + ': <' + (0, (_prettyFormat || _load_prettyFormat()).default)(value) + '>'].join(' '));
throw new TypeError(
[
'Primitives cannot leak memory.',
'You passed a ' +
typeof value +
': <' +
(0, (_prettyFormat || _load_prettyFormat()).default)(value) +
'>'
].join(' ')
);
}

@@ -60,6 +76,9 @@

throw new Error('The leaking detection mechanism requires the "weak" package to be installed and work. ' + 'Please install it as a dependency on your main project');
throw new Error(
'The leaking detection mechanism requires the "weak" package to be installed and work. ' +
'Please install it as a dependency on your main project'
);
}
weak(value, () => this._isReferenceBeingHeld = false);
weak(value, () => (this._isReferenceBeingHeld = false));
this._isReferenceBeingHeld = true;

@@ -93,2 +112,2 @@

}
};
};
{
"name": "jest-leak-detector",
"version": "23.0.0-alpha.2",
"version": "23.0.0-alpha.4",
"repository": {

@@ -11,3 +11,3 @@ "type": "git",

"dependencies": {
"pretty-format": "^23.0.0-alpha.2"
"pretty-format": "^23.0.0-alpha.4"
},

@@ -14,0 +14,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc