diff options
author | isaacs <i@izs.me> | 2019-08-13 01:07:36 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2019-08-13 01:16:30 +0300 |
commit | 8b43c962498c8e2707527e4fca442d7a4fa51595 (patch) | |
tree | 9eac228cfed9ef597eab4b1c0b8a9b1a009e5747 /lib/ci.js | |
parent | ab66c9aa8c52eefc722b901c4ba2aa5ac1822e9d (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.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |