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 1.1.0 to 1.1.1

30

npmconf.js

@@ -110,8 +110,30 @@

if (!conf.get('global')) {
var projectConf = path.resolve(conf.localPrefix, '.npmrc')
// If you're doing `npm --userconfig=~/foo.npmrc` then you'd expect
// that ~/.npmrc won't override the stuff in ~/foo.npmrc (or, indeed
// be used at all).
//
// However, if the cwd is ~, then ~/.npmrc is the home for the project
// config, and will override the userconfig.
//
// If you're not setting the userconfig explicitly, then it will be loaded
// twice, which is harmless but excessive. If you *are* setting the
// userconfig explicitly then it will override your explicit intent, and
// that IS harmful and unexpected.
//
// Solution: Do not load project config file that is the same as either
// the default or resolved userconfig value. npm will log a "verbose"
// message about this when it happens, but it is a rare enough edge case
// that we don't have to be super concerned about it.
var projectConf = path.resolve(conf.localPrefix, '.npmrc')
var defaultUserConfig = rc.get('userconfig')
var resolvedUserConfig = conf.get('userconfig')
if (!conf.get('global') &&
projectConf !== defaultUserConfig &&
projectConf !== resolvedUserConfig) {
conf.addFile(projectConf, 'project')
conf.once('load', afterPrefix)
} else {
conf.add({}, 'project')
afterPrefix()
}
else return afterPrefix()
})

@@ -156,3 +178,3 @@

if(cafile) {
if (cafile) {
return conf.loadCAFile(cafile, finalize)

@@ -159,0 +181,0 @@ }

2

package.json
{
"name": "npmconf",
"version": "1.1.0",
"version": "1.1.1",
"description": "The config thing npm uses",

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

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