Socket
Socket
Sign inDemoInstall

got

Package Overview
Dependencies
20
Maintainers
2
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 14.0.0 to 14.1.0

8

dist/source/core/errors.d.ts

@@ -12,3 +12,3 @@ /// <reference types="node" resolution-mode="require"/>

*/
export declare class RequestError extends Error {
export declare class RequestError<T = unknown> extends Error {
input?: string;

@@ -18,3 +18,3 @@ code: string;

readonly options: Options;
readonly response?: Response;
readonly response?: Response<T>;
readonly request?: Request;

@@ -40,4 +40,4 @@ readonly timings?: Timings;

*/
export declare class HTTPError extends RequestError {
readonly response: Response;
export declare class HTTPError<T = any> extends RequestError<T> {
readonly response: Response<T>;
readonly request: Request;

@@ -44,0 +44,0 @@ readonly timings: Timings;

@@ -66,2 +66,3 @@ import is from '@sindresorhus/is';

*/
// TODO: Change `HTTPError<T = any>` to `HTTPError<T = unknown>` in the next major version to enforce type usage.
// eslint-disable-next-line @typescript-eslint/naming-convention

@@ -68,0 +69,0 @@ export class HTTPError extends RequestError {

@@ -6,3 +6,2 @@ /// <reference types="node" resolution-mode="require"/>

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { Duplex } from 'node:stream';

@@ -9,0 +8,0 @@ import { type ClientRequest } from 'node:http';

@@ -488,2 +488,3 @@ import process from 'node:process';

if (options.ignoreInvalidCookies) {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
promises = promises.map(async (promise) => {

@@ -490,0 +491,0 @@ try {

@@ -9,3 +9,2 @@ /// <reference types="node" resolution-mode="require"/>

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import type { Buffer } from 'node:buffer';

@@ -1150,3 +1149,3 @@ import { checkServerIdentity, type SecureContextOptions, type DetailedPeerCertificate } from 'node:tls';

ignoreInvalidCookies: boolean;
searchParams: string | SearchParameters | URLSearchParams | undefined;
searchParams: string | URLSearchParams | SearchParameters | undefined;
dnsLookup: {

@@ -1153,0 +1152,0 @@ (hostname: string, family: import("cacheable-lookup").IPFamily, callback: (error: NodeJS.ErrnoException | null, address: string, family: import("cacheable-lookup").IPFamily) => void): void;

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import type { Buffer } from 'node:buffer';

@@ -4,0 +3,0 @@ import type { IncomingMessageWithTimings, Timings } from '@szmarczak/http-timer';

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

/// <reference types="node" resolution-mode="require"/>
export default function isUnixSocketURL(url: URL): boolean;

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

/// <reference types="node" resolution-mode="require"/>
export type URLOptions = {

@@ -3,0 +2,0 @@ href?: string;

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import type { Buffer } from 'node:buffer';

@@ -4,0 +3,0 @@ import type { CancelableRequest } from './as-promise/types.js';

{
"name": "got",
"version": "14.0.0",
"version": "14.1.0",
"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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc