New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

testcafe-hammerhead

Package Overview
Dependencies
Maintainers
6
Versions
351
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

testcafe-hammerhead - npm Package Compare versions

Comparing version 31.7.4 to 31.7.5

8

lib/processing/resources/script.js

@@ -7,3 +7,3 @@ "use strict";

const resource_processor_base_1 = __importDefault(require("./resource-processor-base"));
const lru_cache_1 = __importDefault(require("lru-cache"));
const lru_cache_1 = require("lru-cache");
const script_1 = require("../script");

@@ -15,5 +15,5 @@ const url_1 = require("../../utils/url");

super();
this.jsCache = new lru_cache_1.default({
max: 50 * 1024 * 1024,
length: n => n.length, // NOTE: 1 char ~ 1 byte.
this.jsCache = new lru_cache_1.LRUCache({
maxSize: 50 * 1024 * 1024,
sizeCalculation: n => n.length, // NOTE: 1 char ~ 1 byte.
});

@@ -20,0 +20,0 @@ }

@@ -69,3 +69,3 @@ "use strict";

${instruction_1.default.setProperty} = function(o,p,v){return o[p] = v},
${instruction_1.default.getProperty} = function(o,p){return o[p]},
${instruction_1.default.getProperty} = function(o,p,opt=false){return opt&&(o===undefined||o===null)?undefined:o[p]},
${instruction_1.default.callMethod} = function(o,p,a){return o[p].apply(o,a)},

@@ -72,0 +72,0 @@ ${instruction_1.default.getEval} = function(e){return e},

@@ -57,2 +57,6 @@ "use strict";

return false;
// Skip: class X { location }
// @ts-ignore
if (parent.type === esotope_hammerhead_1.Syntax.PropertyDefinition)
return false;
// Skip: class location { x () {} }

@@ -59,0 +63,0 @@ if (parent.type === esotope_hammerhead_1.Syntax.ClassDeclaration)

@@ -256,3 +256,3 @@ "use strict";

var _a, _b;
script_1.default.jsCache.reset();
script_1.default.jsCache.clear();
(_a = this.server1) === null || _a === void 0 ? void 0 : _a.close(); // eslint-disable-line no-unused-expressions

@@ -259,0 +259,0 @@ (_b = this.server2) === null || _b === void 0 ? void 0 : _b.close(); // eslint-disable-line no-unused-expressions

@@ -7,8 +7,8 @@ "use strict";

exports.MAX_SIZE_FOR_NON_PROCESSED_RESOURCE = exports.getResponse = exports.add = exports.create = exports.shouldCache = void 0;
const lru_cache_1 = __importDefault(require("lru-cache"));
const lru_cache_1 = require("lru-cache");
const http_cache_semantics_1 = __importDefault(require("http-cache-semantics"));
const incoming_message_like_1 = __importDefault(require("./incoming-message-like"));
const requestsCache = new lru_cache_1.default({
max: 50 * 1024 * 1024,
length: responseCacheEntry => {
const requestsCache = new lru_cache_1.LRUCache({
maxSize: 50 * 1024 * 1024,
sizeCalculation: responseCacheEntry => {
var _a;

@@ -46,3 +46,3 @@ // NOTE: Length is resource content size.

const { key, value } = entry;
requestsCache.set(key, value, value.cachePolicy.timeToLive());
requestsCache.set(key, value, { ttl: value.cachePolicy.timeToLive() });
}

@@ -49,0 +49,0 @@ exports.add = add;

@@ -9,3 +9,3 @@ "use strict";

const https_1 = __importDefault(require("https"));
const lru_cache_1 = __importDefault(require("lru-cache"));
const lru_cache_1 = require("lru-cache");
const tunnel_agent_1 = __importDefault(require("tunnel-agent"));

@@ -21,3 +21,3 @@ const SSL3_HOST_CACHE_SIZE = 1000;

/* eslint-enable no-unused-vars */
const ssl3HostCache = new lru_cache_1.default({ max: SSL3_HOST_CACHE_SIZE });
const ssl3HostCache = new lru_cache_1.LRUCache({ max: SSL3_HOST_CACHE_SIZE });
const agents = {

@@ -24,0 +24,0 @@ [TYPE.SSL3]: {

@@ -8,3 +8,3 @@ "use strict";

const http2_1 = __importDefault(require("http2"));
const lru_cache_1 = __importDefault(require("lru-cache"));
const lru_cache_1 = require("lru-cache");
const lodash_1 = require("lodash");

@@ -24,5 +24,5 @@ const connection_reset_guard_1 = require("../connection-reset-guard");

const pendingSessions = new Map();
const sessionsCache = new lru_cache_1.default({
const sessionsCache = new lru_cache_1.LRUCache({
max: HTTP2_SESSIONS_CACHE_SIZE,
dispose: (_, session) => {
dispose: (session) => {
if (!session.closed)

@@ -60,6 +60,6 @@ session.close();

sessionsCache.set(origin, session);
logger_1.default.destination.onHttp2SessionCreated(requestId, origin, sessionsCache.length, HTTP2_SESSIONS_CACHE_SIZE);
logger_1.default.destination.onHttp2SessionCreated(requestId, origin, sessionsCache.size, HTTP2_SESSIONS_CACHE_SIZE);
session.once('close', () => {
sessionsCache.del(origin);
logger_1.default.destination.onHttp2SessionClosed(requestId, origin, sessionsCache.length, HTTP2_SESSIONS_CACHE_SIZE);
sessionsCache.delete(origin);
logger_1.default.destination.onHttp2SessionClosed(requestId, origin, sessionsCache.size, HTTP2_SESSIONS_CACHE_SIZE);
});

@@ -75,3 +75,3 @@ session.off('error', errorHandler);

logger_1.default.destination.onHttp2SessionTimeout(origin, HTTP2_SESSION_TIMEOUT);
sessionsCache.del(origin);
sessionsCache.delete(origin);
});

@@ -106,4 +106,4 @@ resolve(session);

function clearSessionsCache() {
sessionsCache.reset();
sessionsCache.clear();
}
exports.clearSessionsCache = clearSessionsCache;
{
"name": "testcafe-hammerhead",
"description": "A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).",
"version": "31.7.4",
"version": "31.7.5",
"homepage": "https://github.com/DevExpress/testcafe-hammerhead",

@@ -24,3 +24,3 @@ "bugs": {

"debug": "4.3.1",
"esotope-hammerhead": "0.6.8",
"esotope-hammerhead": "0.6.9",
"http-cache-semantics": "^4.1.0",

@@ -30,3 +30,3 @@ "httpntlm": "^1.8.10",

"lodash": "^4.17.21",
"lru-cache": "2.6.3",
"lru-cache": "11.0.2",
"match-url-wildcard": "0.0.4",

@@ -52,3 +52,3 @@ "merge-stream": "^1.0.1",

"@types/lodash": "^4.14.129",
"@types/lru-cache": "5.1.0",
"@types/lru-cache": "7.10.10",
"@types/mustache": "0.8.32",

@@ -55,0 +55,0 @@ "@types/node": "^14.0.27",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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