-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pacote: get rid of legacy pacoteOpts
- Loading branch information
Showing
9 changed files
with
42 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,19 @@ | ||
'use strict' | ||
|
||
const Installer = require('libcipm') | ||
const lifecycleOpts = require('./config/lifecycle.js') | ||
const npm = require('./npm.js') | ||
const npmConfig = require('./config/figgy-config.js') | ||
const npmlog = require('npmlog') | ||
const pacoteOpts = require('./config/pacote.js') | ||
|
||
ci.usage = 'npm ci' | ||
|
||
ci.completion = (cb) => cb(null, []) | ||
|
||
Installer.CipmConfig.impl(npm.config, { | ||
get: npm.config.get, | ||
set: npm.config.set, | ||
toLifecycle (moreOpts) { | ||
return lifecycleOpts(moreOpts) | ||
}, | ||
toPacote (moreOpts) { | ||
return pacoteOpts(moreOpts) | ||
} | ||
}) | ||
|
||
module.exports = ci | ||
function ci (args, cb) { | ||
return new Installer({ | ||
config: npm.config, | ||
log: npmlog | ||
}) | ||
.run() | ||
.then( | ||
(details) => { | ||
npmlog.disableProgress() | ||
console.log(`added ${details.pkgCount} packages in ${ | ||
details.runTime / 1000 | ||
}s`) | ||
} | ||
) | ||
.then(() => cb(), cb) | ||
return new Installer(npmConfig({ log: npmlog })).run().then(details => { | ||
npmlog.disableProgress() | ||
console.log(`added ${details.pkgCount} packages in ${ | ||
details.runTime / 1000 | ||
}s`) | ||
}).then(() => cb(), cb) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.