registry-url
Advanced tools
Comparing version 4.0.0 to 5.0.0
13
index.js
'use strict'; | ||
module.exports = scope => { | ||
const rc = require('rc')('npm', {registry: 'https://registry.npmjs.org/'}); | ||
const url = rc[scope + ':registry'] || rc.config_registry || rc.registry; | ||
return url.slice(-1) === '/' ? url : url + '/'; | ||
const rc = require('rc'); | ||
const registryUrl = scope => { | ||
const result = rc('npm', {registry: 'https://registry.npmjs.org/'}); | ||
const url = result[`${scope}:registry`] || result.config_registry || result.registry; | ||
return url.slice(-1) === '/' ? url : `${url}/`; | ||
}; | ||
module.exports = registryUrl; | ||
module.exports.default = registryUrl; |
{ | ||
"name": "registry-url", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Get the set npm registry URL", | ||
@@ -13,9 +13,10 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=8" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
"test": "xo && ava && tsd-check" | ||
}, | ||
"files": [ | ||
"index.js" | ||
"index.js", | ||
"index.d.ts" | ||
], | ||
@@ -33,9 +34,9 @@ "keywords": [ | ||
"dependencies": { | ||
"rc": "^1.2.7" | ||
"rc": "^1.2.8" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"import-fresh": "^2.0.0", | ||
"pify": "^3.0.0", | ||
"xo": "*" | ||
"ava": "^1.3.1", | ||
"import-fresh": "^3.0.0", | ||
"tsd-check": "^0.3.0", | ||
"xo": "^0.24.0" | ||
}, | ||
@@ -42,0 +43,0 @@ "ava": { |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3741
5
15
0
Updatedrc@^1.2.8