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.2.1 to 0.2.5

10

lib/adduser.js

@@ -1,10 +0,5 @@

module.exports = adduser
var uuid = require("node-uuid")
, crypto
var crypto = require('crypto')
try {
} catch (ex) {}
function sha (s) {

@@ -15,3 +10,2 @@ return crypto.createHash("sha1").update(s).digest("hex")

function adduser (username, password, email, cb) {
if (!crypto) crypto = require("crypto")

@@ -31,3 +25,3 @@ password = ("" + (password || "")).trim()

var salt = uuid()
var salt = crypto.randomBytes(30).toString('hex')
, userobj =

@@ -34,0 +28,0 @@ { name : username

4

lib/publish.js

@@ -14,3 +14,5 @@

if (!email || !auth || !username) {
return cb(new Error("auth and email required for publishing"))
var er = new Error("auth and email required for publishing")
er.code = 'ENEEDAUTH'
return cb(er)
}

@@ -17,0 +19,0 @@

@@ -76,3 +76,4 @@ module.exports = regRequest

// login to get a valid token
var a = { name: this.username, password: this.password }
var a = { name: this.conf.get('username'),
password: this.conf.get('_password') }
var args = arguments

@@ -79,0 +80,0 @@ return this.couchLogin.login(a, function (er, cr, data) {

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

function star (package, starred, cb) {
if (!this.username) return cb(new Error(
if (!this.conf.get('username')) return cb(new Error(
"Must be logged in to star/unstar packages"))

@@ -20,6 +20,6 @@

this.log.info("starring", fullData._id)
fullData.users[this.username] = true
fullData.users[this.conf.get('username')] = true
this.log.verbose("starring", fullData)
} else {
delete fullData.users[this.username]
delete fullData.users[this.conf.get('username')]
this.log.info("unstarring", fullData._id)

@@ -26,0 +26,0 @@ this.log.verbose("unstarring", fullData)

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

"description": "Client for the npm registry",
"version": "0.2.1",
"version": "0.2.5",
"repository": {

@@ -15,3 +15,2 @@ "url": "git://github.com/isaacs/npm-registry-client"

"dependencies": {
"node-uuid": "~1.3.3",
"request": "~2.9.202",

@@ -18,0 +17,0 @@ "graceful-fs": "~1.1.8",

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