Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/ci.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2019-08-13 01:07:36 +0300
committerisaacs <i@izs.me>2019-08-13 01:16:30 +0300
commit8b43c962498c8e2707527e4fca442d7a4fa51595 (patch)
tree9eac228cfed9ef597eab4b1c0b8a9b1a009e5747 /lib/ci.js
parentab66c9aa8c52eefc722b901c4ba2aa5ac1822e9d (diff)
ci: pass all configs to cipm installer
Fixes the regression where random config values in a .npmrc file are not passed to lifecycle scripts, breaking build processes which rely on them. Fix: https://github.com/nodejs/node/issues/28987 Fix: https://npm.community/t/npm-ci-doesnt-respect-npmrc-variables/6032 Fix: https://npm.community/t/npm-ci-doesnt-fill-anymore-the-process-env-npm-config-cache-variable-on-post-install-scripts/6658 Fix: https://npm.community/t/npm-ci-does-not-compile-native-dependencies-according-to-npmrc-configuration/6069 Fix: https://npm.community/t/npm-6-9-x-not-passing-environment-to-node-gyp-regression-from-6-4-x/9323/2
Diffstat (limited to 'lib/ci.js')
-rw-r--r--lib/ci.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ci.js b/lib/ci.js
index 1fbb28b57..375c1448a 100644
--- a/lib/ci.js
+++ b/lib/ci.js
@@ -1,7 +1,7 @@
'use strict'
+const npm = require('./npm.js')
const Installer = require('libcipm')
-const npmConfig = require('./config/figgy-config.js')
const npmlog = require('npmlog')
ci.usage = 'npm ci'
@@ -10,7 +10,13 @@ ci.completion = (cb) => cb(null, [])
module.exports = ci
function ci (args, cb) {
- return new Installer(npmConfig({ log: npmlog })).run().then(details => {
+ const opts = Object.create({ log: npmlog })
+ for (const key in npm.config.list[0]) {
+ if (key !== 'log') {
+ opts[key] = npm.config.list[0][key]
+ }
+ }
+ return new Installer(opts).run().then(details => {
npmlog.disableProgress()
console.log(`added ${details.pkgCount} packages in ${
details.runTime / 1000