package-json
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -12,3 +12,8 @@ 'use strict'; | ||
var npmrc = rc('npm'); | ||
var token = npmrc[scope + ':_authToken'] || npmrc['//registry.npmjs.org/:_authToken']; | ||
var token; | ||
if (!npmrc.registry || url.parse(npmrc.registry).hostname === 'registry.npmjs.org') { | ||
token = npmrc[scope + ':_authToken'] || npmrc['//registry.npmjs.org/:_authToken']; | ||
} | ||
var headers = {}; | ||
@@ -15,0 +20,0 @@ |
{ | ||
"name": "package-json", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "Get the package.json of a package from the npm registry", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -49,2 +49,3 @@ # package-json [![Build Status](https://travis-ci.org/sindresorhus/package-json.svg?branch=master)](https://travis-ci.org/sindresorhus/package-json) | ||
- [latest-version](https://github.com/sindresorhus/latest-version) - Get the latest version of an npm package | ||
- [pkg-versions](https://github.com/sindresorhus/pkg-versions) - Get the version numbers of a package from the npm registry | ||
- [npm-keyword](https://github.com/sindresorhus/npm-keyword) - Get a list of npm packages with a certain keyword | ||
@@ -51,0 +52,0 @@ - [npm-user](https://github.com/sindresorhus/npm-user) - Get user info of an npm user |
5132
51
58