Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-registry-client

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-registry-client - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

22

index.js

@@ -23,9 +23,15 @@

function RegClient (options) {
// a registry url must be provided.
var registry = url.parse(options.registry)
if (!registry.protocol) throw new Error(
'Invalid registry: ' + registry.url)
this.registry = registry.href
if (this.registry.slice(-1) !== '/') {
this.registry += '/'
// if provided, then the registry needs to be a url.
// if it's not provided, then we're just using the cache only.
var registry = options.registry
if (registry) {
registry = url.parse(registry)
if (!registry.protocol) throw new Error(
'Invalid registry: ' + registry.url)
this.registry = registry.href
if (this.registry.slice(-1) !== '/') {
this.registry += '/'
}
} else {
this.registry = null
}

@@ -60,3 +66,3 @@

if (this.auth && !this.alwaysAuth) {
if (this.auth && !this.alwaysAuth && this.registry) {
// if we're always authing, then we just send the

@@ -63,0 +69,0 @@ // user/pass on every thing. otherwise, create a

@@ -18,2 +18,4 @@

if (!this.registry) timeout = Infinity
if ( process.env.COMP_CWORD !== undefined

@@ -20,0 +22,0 @@ && process.env.COMP_LINE !== undefined

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

if (!this.registry) return cb(new Error(
"No registry url provided: " + method + " " + where))
// Since there are multiple places where an error could occur,

@@ -18,0 +21,0 @@ // don't let the cb be called more than once.

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

"description": "Client for the npm registry",
"version": "0.0.9",
"version": "0.0.10",
"repository": {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc