Socket
Socket
Sign inDemoInstall

@puppeteer/browsers

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@puppeteer/browsers - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

24

lib/cjs/httpUtil.js

@@ -40,5 +40,2 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -50,5 +47,3 @@ exports.getText = exports.getJSON = exports.downloadFile = exports.httpRequest = exports.headHttpRequest = void 0;

const url_1 = require("url");
const http_proxy_agent_1 = __importDefault(require("http-proxy-agent"));
const https_proxy_agent_1 = __importDefault(require("https-proxy-agent"));
const proxy_from_env_1 = require("proxy-from-env");
const proxy_agent_1 = require("proxy-agent");
function headHttpRequest(url) {

@@ -73,19 +68,4 @@ return new Promise(resolve => {

headers: keepAlive ? { Connection: 'keep-alive' } : undefined,
agent: new proxy_agent_1.ProxyAgent(),
};
const proxyURL = (0, proxy_from_env_1.getProxyForUrl)(url.toString());
if (proxyURL) {
const proxy = new url_1.URL(proxyURL);
if (proxy.protocol === 'http:') {
options.agent = (0, http_proxy_agent_1.default)(proxyURL);
}
else {
options.agent = (0, https_proxy_agent_1.default)({
host: proxy.host,
path: proxy.pathname,
port: proxy.port,
secureProxy: proxy.protocol === 'https:',
headers: options.headers,
});
}
}
const requestCallback = (res) => {

@@ -92,0 +72,0 @@ if (res.statusCode &&

@@ -20,5 +20,3 @@ /**

import { URL } from 'url';
import createHttpProxyAgent from 'http-proxy-agent';
import createHttpsProxyAgent from 'https-proxy-agent';
import { getProxyForUrl } from 'proxy-from-env';
import { ProxyAgent } from 'proxy-agent';
export function headHttpRequest(url) {

@@ -42,19 +40,4 @@ return new Promise(resolve => {

headers: keepAlive ? { Connection: 'keep-alive' } : undefined,
agent: new ProxyAgent(),
};
const proxyURL = getProxyForUrl(url.toString());
if (proxyURL) {
const proxy = new URL(proxyURL);
if (proxy.protocol === 'http:') {
options.agent = createHttpProxyAgent(proxyURL);
}
else {
options.agent = createHttpsProxyAgent({
host: proxy.host,
path: proxy.pathname,
port: proxy.port,
secureProxy: proxy.protocol === 'https:',
headers: options.headers,
});
}
}
const requestCallback = (res) => {

@@ -61,0 +44,0 @@ if (res.statusCode &&

6

package.json
{
"name": "@puppeteer/browsers",
"version": "1.3.0",
"version": "1.4.0",
"description": "Download and launch browsers",

@@ -102,6 +102,4 @@ "scripts": {

"extract-zip": "2.0.1",
"http-proxy-agent": "5.0.0",
"https-proxy-agent": "5.0.1",
"progress": "2.0.3",
"proxy-from-env": "1.1.0",
"proxy-agent": "6.2.0",
"tar-fs": "2.1.1",

@@ -108,0 +106,0 @@ "unbzip2-stream": "1.4.3",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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