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

got

Package Overview
Dependencies
Maintainers
2
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

got - npm Package Compare versions

Comparing version 10.5.0 to 10.5.1

15

dist/source/request-as-event-emitter.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = require("fs");
const CacheableRequest = require("cacheable-request");

@@ -19,2 +20,3 @@ const EventEmitter = require("events");

const url_to_options_1 = require("./utils/url-to-options");
const pEvent = require("p-event");
const setImmediateAsync = async () => new Promise(resolve => setImmediate(resolve));

@@ -249,8 +251,11 @@ const pipeline = util_1.promisify(stream.pipeline);

(async () => {
// Promises are executed immediately.
// If there were no `setImmediate` here,
// `promise.json()` would have no effect
// as the request would be sent already.
await setImmediateAsync();
try {
if (options.body instanceof fs_1.ReadStream) {
await pEvent(options.body, 'open');
}
// Promises are executed immediately.
// If there were no `setImmediate` here,
// `promise.json()` would have no effect
// as the request would be sent already.
await setImmediateAsync();
for (const hook of options.hooks.beforeRequest) {

@@ -257,0 +262,0 @@ // eslint-disable-next-line no-await-in-loop

{
"name": "got",
"version": "10.5.0",
"version": "10.5.1",
"description": "Human-friendly and powerful HTTP request library for Node.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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