From 05f473fe3b401522c435ce853daa5e01367ad148 Mon Sep 17 00:00:00 2001 From: SneakyFish5 <32284796+SneakyFish5@users.noreply.github.com> Date: Mon, 20 Aug 2018 17:31:45 -0500 Subject: [PATCH] config: fix no-proxy to noproxy (#46) PR-URL: https://github.com/npm/cli/pull/46 Credit: @SneakyFish5 Reviewed-By: @zkat --- doc/misc/npm-config.md | 2 +- lib/config/defaults.js | 4 ++-- lib/config/pacote.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/misc/npm-config.md b/doc/misc/npm-config.md index 0986934231146..8f04a76010c1a 100644 --- a/doc/misc/npm-config.md +++ b/doc/misc/npm-config.md @@ -692,7 +692,7 @@ impact how lifecycle scripts are called. The node version to use when checking a package's `engines` map. -### no-proxy +### noproxy * Default: null * Type: String or Array diff --git a/lib/config/defaults.js b/lib/config/defaults.js index 92091067706cc..991a2129f6894 100644 --- a/lib/config/defaults.js +++ b/lib/config/defaults.js @@ -196,7 +196,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { 'progress': !process.env.TRAVIS && !process.env.CI, proxy: null, 'https-proxy': null, - 'no-proxy': null, + 'noproxy': null, 'user-agent': 'npm/{npm-version} ' + 'node/{node-version} ' + '{platform} ' + @@ -318,7 +318,7 @@ exports.types = { 'metrics-registry': [null, String], 'node-options': [null, String], 'node-version': [null, semver], - 'no-proxy': [null, String, Array], + 'noproxy': [null, String, Array], offline: Boolean, 'onload-script': [null, String], only: [null, 'dev', 'development', 'prod', 'production'], diff --git a/lib/config/pacote.js b/lib/config/pacote.js index b9c651d883021..505b69da375a4 100644 --- a/lib/config/pacote.js +++ b/lib/config/pacote.js @@ -38,7 +38,7 @@ function pacoteOpts (moreOpts) { preferOnline: npm.config.get('prefer-online') || npm.config.get('cache-max') <= 0, projectScope: npm.projectScope, proxy: npm.config.get('https-proxy') || npm.config.get('proxy'), - noProxy: npm.config.get('no-proxy'), + noProxy: npm.config.get('noproxy'), refer: npm.registry.refer, registry: npm.config.get('registry'), retry: {