Socket
Socket
Sign inDemoInstall

ky

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ky - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

3

distribution/core/constants.js

@@ -33,3 +33,3 @@ export const supportsRequestStreams = (() => {

// The maximum value of a 32bit int (see issue #117)
export const maxSafeTimeout = 2147483647;
export const maxSafeTimeout = 2_147_483_647;
export const stop = Symbol('stop');

@@ -64,3 +64,4 @@ export const kyOptionKeys = {

duplex: true,
priority: true,
};
//# sourceMappingURL=constants.js.map

@@ -107,5 +107,7 @@ import { HTTPError } from '../errors/HTTPError.js';

this._input = input;
const isCredentialsSupported = 'credentials' in Request.prototype;
const credentials = this._input instanceof Request && 'credentials' in Request.prototype
? this._input.credentials
: undefined;
this._options = {
credentials: isCredentialsSupported ? this._input.credentials : undefined,
...(credentials && { credentials }), // For exactOptionalPropertyTypes
...options,

@@ -124,3 +126,3 @@ headers: mergeHeaders(this._input.headers, options.headers),

throwHttpErrors: options.throwHttpErrors !== false,
timeout: options.timeout ?? 10000,
timeout: options.timeout ?? 10_000,
fetch: options.fetch ?? globalThis.fetch.bind(globalThis),

@@ -127,0 +129,0 @@ };

@@ -222,3 +222,2 @@ import type { LiteralUnion, Required } from './common.js';

prefixUrl: string;
credentials?: Options['credentials'];
};

@@ -230,3 +229,3 @@ /**

method: NonNullable<RequestInit['method']>;
credentials: RequestInit['credentials'];
credentials?: NonNullable<RequestInit['credentials']>;
retry: RetryOptions;

@@ -233,0 +232,0 @@ prefixUrl: string;

import type { KyHeadersInit, Options } from '../types/options.js';
export declare const validateAndMerge: (...sources: Array<Partial<Options> | undefined>) => Partial<Options>;
export declare const mergeHeaders: (source1?: KyHeadersInit, source2?: KyHeadersInit) => Headers;
export declare const deepMerge: <T>(...sources: (Partial<T> | undefined)[]) => T;
export declare const deepMerge: <T>(...sources: Array<Partial<T> | undefined>) => T;
{
"name": "ky",
"version": "1.2.2",
"version": "1.2.3",
"description": "Tiny and elegant HTTP client based on the browser Fetch API",

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

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