Socket
Socket
Sign inDemoInstall

@web/test-runner-core

Package Overview
Dependencies
Maintainers
7
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web/test-runner-core - npm Package Compare versions

Comparing version 0.10.24 to 0.10.25

8

dist/utils/request.js

@@ -5,5 +5,11 @@ "use strict";

const http_1 = require("http");
const https_1 = require("https");
function request(options) {
const isHttps = options.protocol === 'https:';
const requestFn = isHttps ? https_1.request : http_1.request;
if (isHttps) {
options.rejectUnauthorized = false;
}
return new Promise((resolve, reject) => {
const req = http_1.request(options, response => {
const req = requestFn(options, response => {
let body = '';

@@ -10,0 +16,0 @@ response.on('data', chunk => {

2

package.json
{
"name": "@web/test-runner-core",
"version": "0.10.24",
"version": "0.10.25",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -1,2 +0,3 @@

import { request as originalRequest, RequestOptions, IncomingMessage } from 'http';
import { request as httpRequest, RequestOptions, IncomingMessage } from 'http';
import { request as httpsRequest, RequestOptions as HttpsRequestOptions } from 'https';

@@ -9,4 +10,12 @@ export interface Response {

export function request(options: RequestOptions): Promise<Response> {
const isHttps = options.protocol === 'https:';
const requestFn = isHttps ? httpsRequest : httpRequest;
if (isHttps) {
(options as HttpsRequestOptions).rejectUnauthorized = false;
}
return new Promise((resolve, reject) => {
const req = originalRequest(options, response => {
const req = requestFn(options, response => {
let body = '';

@@ -13,0 +22,0 @@ response.on('data', chunk => {

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