npm-registry-fetch
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -13,2 +13,3 @@ 'use strict' | ||
const doKey = (key, alias) => addKey(opts, AUTH, regKey, key, alias) | ||
doKey('token') | ||
doKey('_authToken', 'token') | ||
@@ -15,0 +16,0 @@ doKey('username') |
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.1.0"></a> | ||
# [2.1.0](https://github.com/npm/registry-fetch/compare/v2.0.0...v2.1.0) (2018-04-08) | ||
### Features | ||
* **token:** accept opts.token for opts._authToken ([108c9f0](https://github.com/npm/registry-fetch/commit/108c9f0)) | ||
<a name="2.0.0"></a> | ||
@@ -7,0 +17,0 @@ # [2.0.0](https://github.com/npm/registry-fetch/compare/v1.1.1...v2.0.0) (2018-04-08) |
@@ -7,3 +7,3 @@ 'use strict' | ||
const AUTH_REGEX = /^(?:.*:)?(_authToken|username|_password|password|email|always-auth|_auth|otp)$/ | ||
const AUTH_REGEX = /^(?:.*:)?(token|_authToken|username|_password|password|email|always-auth|_auth|otp)$/ | ||
const SCOPE_REGISTRY_REGEX = /@.*:registry$/gi | ||
@@ -10,0 +10,0 @@ const RegFetchConfig = pudding({ |
{ | ||
"name": "npm-registry-fetch", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Fetch-based http client for use with npm registry APIs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -91,17 +91,2 @@ # 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-auth-token"></a> `opts._authToken` | ||
* Type: String | ||
* Default: null | ||
Authentication token string. | ||
Can be scoped to a registry by using a "nerf dart" for that registry. That is: | ||
``` | ||
{ | ||
'//registry.npmjs.org/:_authToken': 't0k3nH34r' | ||
} | ||
``` | ||
##### <a name="opts-agent"></a> `opts.agent` | ||
@@ -366,3 +351,3 @@ | ||
Password used for basic authentication. For the more modern authentication | ||
method, please use the (more secure) [`opts._authToken`](#opts-auth-token) | ||
method, please use the (more secure) [`opts.token`](#opts-token) | ||
@@ -518,2 +503,18 @@ Can optionally be scoped to a registry by using a "nerf dart" for that registry. | ||
##### <a name="opts-token"></a> `opts.token` | ||
* Alias: `opts._authToken` | ||
* Type: String | ||
* Default: null | ||
Authentication token string. | ||
Can be scoped to a registry by using a "nerf dart" for that registry. That is: | ||
``` | ||
{ | ||
'//registry.npmjs.org/:token': 't0k3nH34r' | ||
} | ||
``` | ||
##### <a name="opts-user-agent"></a> `opts.user-agent` | ||
@@ -532,3 +533,3 @@ | ||
Username used for basic authentication. For the more modern authentication | ||
method, please use the (more secure) [`opts._authToken`](#opts-auth-token) | ||
method, please use the (more secure) [`opts.token`](#opts-token) | ||
@@ -552,2 +553,2 @@ Can optionally be scoped to a registry by using a "nerf dart" for that registry. | ||
** DEPRECATED ** This is a legacy authentication token supported only for | ||
*compatibility. Please us [`opts._authToken`](#opts-auth-token) instead. | ||
*compatibility. Please use [`opts.token`](#opts-token) instead. |
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
34705
449
550