Socket
Socket
Sign inDemoInstall

npm-registry-client

Package Overview
Dependencies
98
Maintainers
4
Versions
156
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.5.0 to 8.0.1

3

lib/request.js

@@ -114,2 +114,5 @@ module.exports = regRequest

// metadata should be minified, if the registry supports it
headers['accept'] = 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'
var er = this.authify(params.authed, parsed, headers, params.auth)

@@ -116,0 +119,0 @@ if (er) return cb_(er)

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Client for the npm registry",
"version": "7.5.0",
"version": "8.0.1",
"repository": {

@@ -8,0 +8,0 @@ "url": "https://github.com/npm/npm-registry-client.git"

@@ -56,2 +56,15 @@ # npm-registry-client

## Requests
As of `npm-registry-client@8`, all requests are made with an `Accept` header
of `application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*`.
This enables filtered document responses to requests for package metadata.
You know that you got a filtered response if the mime type is set to
`application/vnd.npm.install-v1+json` and not `application/json`.
This filtering substantially reduces the over all data size. For example
for `https://registry.npmjs.org/npm`, the compressed metadata goes from
410kB to 21kB.
## API

@@ -58,0 +71,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