Socket
Socket
Sign inDemoInstall

package-json

Package Overview
Dependencies
35
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.1 to 2.3.2

6

index.js
'use strict';
var url = require('url');
var got = require('got');

@@ -9,4 +10,3 @@ var registryUrl = require('registry-url');

var scope = name.split('/')[0];
var url = registryUrl(scope) +
encodeURIComponent(name).replace(/^%40/, '@');
var pkgUrl = url.resolve(registryUrl(scope), encodeURIComponent(name).replace(/^%40/, '@'));
var npmrc = rc('npm');

@@ -24,3 +24,3 @@ var token = npmrc[scope + ':_authToken'] || npmrc['//registry.npmjs.org/:_authToken'];

return got(url, {
return got(pkgUrl, {
json: true,

@@ -27,0 +27,0 @@ headers: headers

{
"name": "package-json",
"version": "2.3.1",
"version": "2.3.2",
"description": "Get the package.json of a package from the npm registry",

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

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