Socket
Socket
Sign inDemoInstall

got

Package Overview
Dependencies
30
Maintainers
2
Versions
175
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 12.0.1 to 12.0.2

3

dist/source/core/index.js

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

while ((data = response.read()) !== null) {
this._downloadedSize += data.length;
this._downloadedSize += data.length; // eslint-disable-line @typescript-eslint/restrict-plus-operands
const progress = this.downloadProgress;

@@ -1121,5 +1121,4 @@ if (progress.percent < 1) {

get reusedSocket() {
// @ts-expect-error `@types/node` has incomplete types
return this._request?.reusedSocket;
}
}

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

pagination: {
transform: (response) => {
transform(response) {
if (response.request.options.responseType === 'json') {

@@ -161,3 +161,3 @@ return response.body;

},
paginate: ({ response }) => {
paginate({ response }) {
const rawLinkHeader = response.headers.link;

@@ -164,0 +164,0 @@ if (typeof rawLinkHeader !== 'string' || rawLinkHeader.trim() === '') {

@@ -26,3 +26,3 @@ import { RequestError } from './errors.js';

if (responseType === 'json') {
return rawBody.length === 0 ? '' : parseJson(rawBody.toString());
return rawBody.length === 0 ? '' : parseJson(rawBody.toString(encoding));
}

@@ -29,0 +29,0 @@ if (responseType === 'buffer') {

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

@@ -47,3 +47,3 @@ "license": "MIT",

"dependencies": {
"@sindresorhus/is": "^4.2.0",
"@sindresorhus/is": "^4.6.0",
"@szmarczak/http-timer": "^5.0.1",

@@ -57,3 +57,3 @@ "@types/cacheable-request": "^6.0.2",

"get-stream": "^6.0.1",
"http2-wrapper": "^2.1.9",
"http2-wrapper": "^2.1.10",
"lowercase-keys": "^3.0.0",

@@ -66,18 +66,18 @@ "p-cancelable": "^3.0.0",

"@sindresorhus/tsconfig": "^2.0.0",
"@sinonjs/fake-timers": "^8.1.0",
"@sinonjs/fake-timers": "^9.1.1",
"@types/benchmark": "^2.1.1",
"@types/express": "^4.17.13",
"@types/node": "^16.11.12",
"@types/node": "^17.0.21",
"@types/pem": "^1.9.6",
"@types/pify": "^5.0.1",
"@types/readable-stream": "^2.3.12",
"@types/request": "^2.48.7",
"@types/sinon": "^10.0.6",
"@types/readable-stream": "^2.3.13",
"@types/request": "^2.48.8",
"@types/sinon": "^10.0.11",
"@types/sinonjs__fake-timers": "^8.1.1",
"@types/tough-cookie": "^4.0.1",
"ava": "^3.15.0",
"axios": "^0.24.0",
"axios": "^0.26.1",
"benchmark": "^2.1.4",
"bluebird": "^3.7.2",
"body-parser": "^1.19.0",
"body-parser": "^1.19.2",
"create-cert": "^1.0.6",

@@ -87,15 +87,15 @@ "create-test-server": "^3.0.1",

"delay": "^5.0.0",
"express": "^4.17.1",
"express": "^4.17.3",
"form-data": "^4.0.0",
"formdata-node": "^4.3.1",
"nock": "^13.2.1",
"node-fetch": "^3.1.0",
"formdata-node": "^4.3.2",
"nock": "^13.2.4",
"node-fetch": "^3.2.3",
"np": "^7.6.0",
"nyc": "^15.1.0",
"p-event": "^5.0.1",
"pem": "^1.14.4",
"pem": "^1.14.6",
"pify": "^5.0.0",
"readable-stream": "^3.6.0",
"request": "^2.88.2",
"sinon": "^12.0.1",
"sinon": "^13.0.1",
"slow-stream": "0.0.4",

@@ -106,5 +106,5 @@ "tempy": "^2.0.0",

"tough-cookie": "^4.0.0",
"ts-node": "^10.4.0",
"typescript": "4.5.3",
"xo": "^0.47.0"
"ts-node": "^10.7.0",
"typescript": "4.6.2",
"xo": "^0.48.0"
},

@@ -111,0 +111,0 @@ "types": "dist/source",

@@ -73,6 +73,8 @@ <div align="center">

```sh
npm install got
```
$ npm install got
```
**Warning:** This package is native [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and no longer provides a CommonJS export. If your project uses CommonJS, you'll have to [convert to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) or use the [dynamic `import()`](https://v8.dev/features/dynamic-import) function. Please don't open issues for questions regarding CommonJS / ESM. You can also use [Got v11](https://github.com/sindresorhus/got/tree/v11.8.3) instead which is pretty stable.
## Take a peek

@@ -79,0 +81,0 @@

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