npm-registry-fetch
Advanced tools
Comparing version 3.5.0 to 3.6.0
@@ -5,2 +5,17 @@ # Change Log | ||
<a name="3.6.0"></a> | ||
# [3.6.0](https://github.com/npm/registry-fetch/compare/v3.5.0...v3.6.0) (2018-08-22) | ||
### Bug Fixes | ||
* **docs:** document opts.forceAuth ([40bcd65](https://github.com/npm/registry-fetch/commit/40bcd65)) | ||
### Features | ||
* **opts.ignoreBody:** add a boolean to throw away response bodies ([6923702](https://github.com/npm/registry-fetch/commit/6923702)) | ||
<a name="3.5.0"></a> | ||
@@ -7,0 +22,0 @@ # [3.5.0](https://github.com/npm/registry-fetch/compare/v3.4.0...v3.5.0) (2018-08-22) |
@@ -19,2 +19,6 @@ 'use strict' | ||
res.body.on('end', () => logRequest(method, res, startTime, opts)) | ||
if (opts.ignoreBody) { | ||
res.body.resume() | ||
res.body = null | ||
} | ||
return res | ||
@@ -21,0 +25,0 @@ } |
@@ -26,2 +26,4 @@ 'use strict' | ||
'https-proxy': {}, | ||
'ignore-body': {}, | ||
ignoreBody: 'ignore-body', | ||
'integrity': {}, | ||
@@ -28,0 +30,0 @@ 'is-from-ci': 'isFromCI', |
{ | ||
"name": "npm-registry-fetch", | ||
"version": "3.5.0", | ||
"version": "3.6.0", | ||
"description": "Fetch-based http client for use with npm registry APIs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -217,2 +217,12 @@ # npm-registry-fetch [![npm version](https://img.shields.io/npm/v/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![license](https://img.shields.io/npm/l/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![Travis](https://img.shields.io/travis/npm/npm-registry-fetch/latest.svg)](https://travis-ci.org/npm/npm-registry-fetch) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/npm-registry-fetch/latest.svg)](https://ci.appveyor.com/project/npm/npm-registry-fetch) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-registry-fetch/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-registry-fetch?branch=latest) | ||
##### <a name="opts-force-auth"></a> `opts.force-auth` | ||
* Alias: `opts.forceAuth` | ||
* Type: Object | ||
* Default: null | ||
If present, other auth-related values in `opts` will be completely ignored, | ||
including `alwaysAuth`, `email`, and `otp`, when calculating auth for a request, | ||
and the auth details in `opts.forceAuth` will be used instead. | ||
##### <a name="opts-gzip"></a> `opts.gzip` | ||
@@ -236,2 +246,12 @@ | ||
##### <a name="opts-ignore-body"></a> `opts.ignore-body` | ||
* Alias: `opts.ignoreBody` | ||
* Type: Boolean | ||
* Default: false | ||
If true, the **response body** will be thrown away and `res.body` set to `null`. | ||
This will prevent dangling response sockets for requests where you don't usually | ||
care what the response body is. | ||
##### <a name="opts-integrity"></a> `opts.integrity` | ||
@@ -238,0 +258,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39387
495
579