Socket
Socket
Sign inDemoInstall

npmconf

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npmconf - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

lib/get-credentials-by-uri.js

5

config-defs.js

@@ -140,3 +140,2 @@ // defaults, types, and shorthands.

, editor : osenv.editor()
, email: ""
, "engine-strict": false

@@ -215,3 +214,2 @@ , force : false

, user : process.platform === "win32" ? 0 : "nobody"
, username : ""
, userconfig : path.resolve(home, ".npmrc")

@@ -245,3 +243,2 @@ , umask: process.umask ? process.umask() : parseInt("022", 8)

, editor : String
, email: [null, String]
, "engine-strict": Boolean

@@ -314,3 +311,2 @@ , force : Boolean

, user : [Number, String]
, username : String
, userconfig : path

@@ -322,3 +318,2 @@ , umask: Octal

, _exit : Boolean
, _password: String
}

@@ -325,0 +320,0 @@

39

npmconf.js

@@ -13,3 +13,2 @@

var mkdirp = require('mkdirp')
var path = require('path')

@@ -185,3 +184,3 @@ exports.load = load

function finalize(er, cadata) {
function finalize(er) {
if (er) {

@@ -222,2 +221,4 @@ return cb(er)

Conf.prototype.findPrefix = require('./lib/find-prefix.js')
Conf.prototype.getCredentialsByURI = require('./lib/get-credentials-by-uri.js')
Conf.prototype.setCredentialsByURI = require('./lib/set-credentials-by-uri.js')

@@ -241,3 +242,3 @@ Conf.prototype.loadExtras = function(cb) {

if (where !== 'builtin')
var er = new Error('bad save target: '+where)
var er = new Error('bad save target: ' + where)
if (cb) {

@@ -259,19 +260,4 @@ process.nextTick(cb.bind(null, er))

var data = target.data
var data = ini.stringify(target.data)
if (typeof data._password === 'string' &&
typeof data.username === 'string') {
var auth = data.username + ':' + data._password
data = Object.keys(data).reduce(function (c, k) {
if (k === 'username' || k === '_password')
return c
c[k] = data[k]
return c
}, { _auth: new Buffer(auth, 'utf8').toString('base64') })
delete data.username
delete data._password
}
data = ini.stringify(data)
then = then.bind(this)

@@ -281,3 +267,3 @@ done = done.bind(this)

var mode = where === 'user' ? 0600 : 0666
var mode = where === 'user' ? "0600" : "0666"
if (!data.trim()) {

@@ -347,9 +333,2 @@ fs.unlink(target.path, function (er) {

})
if (Object.prototype.hasOwnProperty.call(data, '_auth')) {
var auth = new Buffer(data._auth, 'base64').toString('utf8').split(':')
var username = auth.shift()
var password = auth.join(':')
data.username = username
data._password = password
}
return CC.prototype.add.call(this, data, marker)

@@ -376,3 +355,3 @@ }

function parseField (f, k, emptyIsFalse) {
function parseField (f, k) {
if (typeof f !== 'string' && !(f instanceof String))

@@ -425,3 +404,3 @@ return f

var envExpr = /(\\*)\$\{([^}]+)\}/g
return f.replace(envExpr, function (orig, esc, name, i, s) {
return f.replace(envExpr, function (orig, esc, name) {
esc = esc.length && esc.length % 2

@@ -438,3 +417,3 @@ if (esc)

// warn about invalid configs at every level.
cl.list.forEach(function (conf, level) {
cl.list.forEach(function (conf) {
nopt.clean(conf, configDefs.types)

@@ -441,0 +420,0 @@ })

{
"name": "npmconf",
"version": "2.0.0",
"version": "2.0.1",
"description": "The config thing npm uses",

@@ -5,0 +5,0 @@ "main": "npmconf.js",

@@ -18,3 +18,2 @@ var test = require('tap').test

'_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
_auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
'npm-www:nocache': '1',

@@ -26,4 +25,2 @@ nodedir: '/Users/isaacs/dev/js/node-v0.8',

'tmp': process.env.HOME + '/.tmp',
username : "username",
_password : "password",
_token:

@@ -30,0 +27,0 @@ { AuthSession: 'yabba-dabba-doodle',

@@ -16,3 +16,2 @@ var test = require('tap').test

'_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
_auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
'npm-www:nocache': '1',

@@ -24,4 +23,2 @@ nodedir: '/Users/isaacs/dev/js/node-v0.8',

'tmp': process.env.HOME + '/.tmp',
username : "username",
_password : "password",
_token:

@@ -28,0 +25,0 @@ { AuthSession: 'yabba-dabba-doodle',

@@ -20,3 +20,2 @@ var test = require('tap').test

'_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
_auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
'npm-www:nocache': '1',

@@ -28,4 +27,2 @@ nodedir: '/Users/isaacs/dev/js/node-v0.8',

'tmp': process.env.HOME + '/.tmp',
username : "username",
_password : "password",
_token:

@@ -32,0 +29,0 @@ { AuthSession: 'yabba-dabba-doodle',

@@ -16,3 +16,2 @@ var test = require('tap').test

'_npmjs.org:couch = https://admin:password@localhost:5984/registry',
'_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
'npm-www:nocache = 1',

@@ -22,4 +21,2 @@ 'sign-git-tag = false',

'strict-ssl = false',
'username = username',
'_password = password',
'',

@@ -43,3 +40,2 @@ '[_token]',

'_npmjs.org:couch = https://admin:password@localhost:5984/registry',
'_auth = dXNlcm5hbWU6cGFzc3dvcmQ=',
'npm-www:nocache = 1',

@@ -46,0 +42,0 @@ 'sign-git-tag = false',

Sorry, the diff of this file is not supported yet

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