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

http-cookie-agent

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-cookie-agent - npm Package Compare versions

Comparing version 6.0.5 to 6.0.6

dist/types/phin.d.js

8

dist/http/create_cookie_agent.js

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

var _validate_cookie_options = require("../utils/validate_cookie_options");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const kCookieOptions = Symbol('cookieOptions');

@@ -18,3 +18,3 @@ const kReimplicitHeader = Symbol('reimplicitHeader');

function createCookieAgent(BaseAgentClass) {
// @ts-expect-error ...
// @ts-expect-error -- BaseAgentClass is type definition.
class CookieAgent extends BaseAgentClass {

@@ -71,3 +71,3 @@ constructor(...params) {

}
return _implicitHeader();
_implicitHeader();
};

@@ -113,3 +113,3 @@ const emit = req.emit.bind(req);

}
return super.addRequest(req, options);
super.addRequest(req, options);
}

@@ -116,0 +116,0 @@ }

@@ -9,3 +9,3 @@ "use strict";

var _create_cookie_agent = require("./create_cookie_agent");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const HttpCookieAgent = exports.HttpCookieAgent = (0, _create_cookie_agent.createCookieAgent)(_nodeHttp.default.Agent);

@@ -9,3 +9,3 @@ "use strict";

var _create_cookie_agent = require("./create_cookie_agent");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const HttpsCookieAgent = exports.HttpsCookieAgent = (0, _create_cookie_agent.createCookieAgent)(_nodeHttps.default.Agent);

@@ -14,6 +14,6 @@ "use strict";

var _convert_to_headers_object = require("./utils/convert_to_headers_object");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const kCookieOptions = Symbol('cookieOptions');
function createCookieClient(BaseClientClass) {
// @ts-expect-error ...
// @ts-expect-error -- BaseClientClass is type definition.
class CookieClient extends BaseClientClass {

@@ -20,0 +20,0 @@ constructor(url, {

@@ -10,2 +10,4 @@ "use strict";

var _convert_to_headers_object = require("./utils/convert_to_headers_object");
/* global Buffer */
const kRequestUrl = Symbol('requestUrl');

@@ -42,4 +44,2 @@ const kCookieOptions = Symbol('cookieOptions');

});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this[kHandlers].onHeaders(statusCode, _headers, resume, statusText);

@@ -51,3 +51,2 @@ };

}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this[kHandlers].onData(chunk);

@@ -54,0 +53,0 @@ };

@@ -8,2 +8,7 @@ "use strict";

var _undici = require("undici");
/* global Buffer */
function isIterable(value) {
return typeof value === 'object' && value != null && Symbol.iterator in value;
}
function convertToHeadersObject(_headers) {

@@ -28,2 +33,6 @@ const headers = {};

}
} else if (isIterable(_headers)) {
for (const [key, value] of _headers) {
headers[key.toLowerCase()] = value;
}
} else if (_headers != null) {

@@ -30,0 +39,0 @@ for (const [key, value] of Object.entries(_headers)) {

@@ -7,5 +7,3 @@ "use strict";

exports.validateCookieOptions = validateCookieOptions;
function validateCookieOptions(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
opts) {
function validateCookieOptions(opts) {
if (!('jar' in opts)) {

@@ -12,0 +10,0 @@ throw new TypeError('invalid cookies.jar');

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

import type http from 'node:http';
import type https from 'node:https';
import type * as http from 'node:http';
import type * as https from 'node:https';

@@ -17,5 +17,5 @@ import type { CookieJar } from 'tough-cookie';

type WithCookieAgentOptions<T> = T extends http.AgentOptions ? T & CookieAgentOptions : T;
type ConstructorParams<Params> = {
type ConstructorParams<Params extends unknown[]> = {
[Index in keyof Params]: WithCookieAgentOptions<Params[Index]>;
} & { length: Params['length'] };
};

@@ -22,0 +22,0 @@ export function createCookieAgent<BaseAgent extends http.Agent = http.Agent, Params extends unknown[] = unknown[]>(

{
"name": "http-cookie-agent",
"version": "6.0.5",
"version": "6.0.6",
"description": "Allows cookies with every Node.js HTTP clients.",

@@ -49,6 +49,7 @@ "keywords": [

"format": "pnpm run --sequential \"/^format:.*/\"",
"format:eslint": "eslint --fix --ext .js,.ts,.mjs,.mts .",
"format:eslint": "eslint --fix .",
"format:prettier": "prettier --write .",
"lint": "pnpm run \"/^lint:.*/\"",
"lint:eslint": "eslint --ext .js,.ts,.mjs,.mts .",
"lint:dts": "tsc --noEmit http/*.d.ts undici/*.d.ts",
"lint:eslint": "eslint --max-warnings 0 .",
"lint:prettier": "prettier --check .",

@@ -63,23 +64,23 @@ "lint:tsc": "tsc --noEmit",

"devDependencies": {
"@3846masa/configs": "github:3846masa/configs#7159f073ff1b579d4d34f2e279fef03bcf633bea",
"@babel/cli": "7.24.1",
"@babel/core": "7.24.4",
"@babel/plugin-proposal-explicit-resource-management": "7.24.1",
"@babel/preset-env": "7.24.4",
"@babel/preset-typescript": "7.24.1",
"@3846masa/configs": "github:3846masa/configs#1680811faae257796efe99b055aee5072cac6577",
"@babel/cli": "7.25.6",
"@babel/core": "7.25.2",
"@babel/plugin-proposal-explicit-resource-management": "7.24.7",
"@babel/preset-env": "7.25.4",
"@babel/preset-typescript": "7.24.7",
"@hapi/wreck": "18.1.0",
"@jest/globals": "29.7.0",
"@reactioncommerce/babel-remove-es-create-require": "1.0.0",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@types/babel__core": "7.20.5",
"@types/eslint": "9.6.1",
"@types/needle": "3.3.0",
"@types/node": "18.19.31",
"@types/node": "18.19.50",
"@types/request": "2.48.12",
"@types/semver": "7.5.8",
"@types/superagent": "8.1.6",
"@types/tough-cookie": "4.0.5",
"@types/superagent": "8.1.9",
"agentkeepalive": "4.5.0",
"axios": "1.6.8",
"axios": "1.7.7",
"babel-jest": "29.7.0",
"disposablestack": "1.1.4",
"disposablestack": "1.1.6",
"got": "12.6.1",

@@ -91,15 +92,15 @@ "http-proxy-agent": "7.0.2",

"phin": "3.7.1",
"proxy": "2.1.1",
"proxy": "2.2.0",
"request": "2.88.2",
"rimraf": "5.0.5",
"rimraf": "5.0.10",
"semantic-release": "22.0.12",
"semver": "7.6.0",
"superagent": "8.1.2",
"tough-cookie": "4.1.3",
"typescript": "5.4.5",
"undici": "6.6.2",
"urllib": "3.23.0"
"semver": "7.6.3",
"superagent": "10.1.0",
"tough-cookie": "5.0.0",
"typescript": "5.6.2",
"undici": "6.19.8",
"urllib": "4.3.1"
},
"peerDependencies": {
"tough-cookie": "^4.0.0",
"tough-cookie": "^4.0.0 || ^5.0.0",
"undici": "^5.11.0 || ^6.0.0"

@@ -112,3 +113,3 @@ },

},
"packageManager": "pnpm@8.15.7",
"packageManager": "pnpm@9.10.0",
"engines": {

@@ -115,0 +116,0 @@ "node": ">=18.0.0"

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

/* eslint-disable no-redeclare */
import type { CookieJar } from 'tough-cookie';

@@ -2,0 +3,0 @@ import { Agent, Client } from 'undici';

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