diff options
author | Gar <gar+gh@danger.computer> | 2021-10-08 04:40:03 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-11-04 00:04:22 +0300 |
commit | 8ffeb71dfb248b4a76744bd06cd4d6100f17c8ae (patch) | |
tree | b44d12a79dff3afe0c92df6f6c0219f6d91ad471 /lib/install-ci-test.js | |
parent | 85d59191cf681eabd8827ca58f925c1063776f61 (diff) |
chore: refactor commands
This is the first phase of refactoring the internal structure of the npm
commands to set us up for future changes. This iteration changes the
function signature of `exec` for all the commands to be a async (no more
callbacks), and also groups all the commands into their own
subdirectory.
It also removes the Proxy `npm.commands` object, in favor of an
`npm.cmd` and `npm.exec` function that breaks up the two things that
proxy was doing. Namely, getting to the attributes of a given command
(`npm.cmd` now does this), and actually running the command `npm.exec`
does this.
PR-URL: https://github.com/npm/cli/pull/3959
Credit: @wraithgar
Close: #3959
Reviewed-by: @lukekarrys
Diffstat (limited to 'lib/install-ci-test.js')
-rw-r--r-- | lib/install-ci-test.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/install-ci-test.js b/lib/install-ci-test.js deleted file mode 100644 index 871f24b2f..000000000 --- a/lib/install-ci-test.js +++ /dev/null @@ -1,24 +0,0 @@ -// npm install-ci-test -// Runs `npm ci` and then runs `npm test` - -const CI = require('./ci.js') - -class InstallCITest extends CI { - static get description () { - return 'Install a project with a clean slate and run tests' - } - - /* istanbul ignore next - see test/lib/load-all-commands.js */ - static get name () { - return 'install-ci-test' - } - - exec (args, cb) { - this.npm.commands.ci(args, (er) => { - if (er) - return cb(er) - this.npm.commands.test([], cb) - }) - } -} -module.exports = InstallCITest |