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

jest-leak-detector

Package Overview
Dependencies
Maintainers
4
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 24.0.0-alpha.8 to 24.0.0-alpha.9

54

build/index.js

@@ -9,3 +9,2 @@ /**

*/
'use strict';

@@ -16,19 +15,32 @@

});
exports.default = void 0;
var _prettyFormat;
function _prettyFormat() {
const data = _interopRequireDefault(require('pretty-format'));
function _load_prettyFormat() {
return (_prettyFormat = _interopRequireDefault(require('pretty-format')));
_prettyFormat = function _prettyFormat() {
return data;
};
return data;
}
var _v;
function _v() {
const data = _interopRequireDefault(require('v8'));
function _load_v() {
return (_v = _interopRequireDefault(require('v8')));
_v = function _v() {
return data;
};
return data;
}
var _vm;
function _vm() {
const data = _interopRequireDefault(require('vm'));
function _load_vm() {
return (_vm = _interopRequireDefault(require('vm')));
_vm = function _vm() {
return data;
};
return data;
}

@@ -40,3 +52,3 @@

exports.default = class {
class _default {
constructor(value) {

@@ -50,3 +62,3 @@ if (this._isPrimitive(value)) {

': <' +
(0, (_prettyFormat || _load_prettyFormat()).default)(value) +
(0, _prettyFormat().default)(value) +
'>'

@@ -74,5 +86,4 @@ ].join(' ')

weak(value, () => (this._isReferenceBeingHeld = false));
this._isReferenceBeingHeld = true;
this._isReferenceBeingHeld = true; // Ensure value is not leaked by the closure created by the "weak" callback.
// Ensure value is not leaked by the closure created by the "weak" callback.
value = null;

@@ -88,11 +99,10 @@ }

_runGarbageCollector() {
const isGarbageCollectorHidden = !global.gc;
const isGarbageCollectorHidden = !global.gc; // GC is usually hidden, so we have to expose it before running.
// GC is usually hidden, so we have to expose it before running.
(_v || _load_v()).default.setFlagsFromString('--expose-gc');
(_vm || _load_vm()).default.runInNewContext('gc')();
_v().default.setFlagsFromString('--expose-gc');
// The GC was not initially exposed, so let's hide it again.
_vm().default.runInNewContext('gc')(); // The GC was not initially exposed, so let's hide it again.
if (isGarbageCollectorHidden) {
(_v || _load_v()).default.setFlagsFromString('--no-expose-gc');
_v().default.setFlagsFromString('--no-expose-gc');
}

@@ -104,2 +114,4 @@ }

}
};
}
exports.default = _default;
{
"name": "jest-leak-detector",
"version": "24.0.0-alpha.8",
"version": "24.0.0-alpha.9",
"repository": {

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

"dependencies": {
"pretty-format": "^24.0.0-alpha.8"
"pretty-format": "^24.0.0-alpha.9"
},

@@ -20,3 +20,3 @@ "devDependencies": {

},
"gitHead": "700e0dadb85f5dc8ff5dac6c7e98956690049734"
"gitHead": "c7caa7ba5904d0c61e586694cde5f536639e4afc"
}
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