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
AgeCommit message (Collapse)Author
2021-11-04chore: refactor commandsGar
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
2021-07-12fix(usage): better audit/boolean flag usage outputGar
This adds the `audit` config item to the usage output of `npm ci`, and also tweaks how usage flags are shown for boolean options that do not default to false. Their usage is shown as the `--no-x` form of the flag to better communicate that the flag is needed to turn that normally true option OFF. The description of `audit` was also updated to reflect that it runs on many different npm commands, not just install. Because this flag is included in the usage of those commands it's best to let the assocation happen there instead of trying to be comprehensive in the description itself. A small fix to make `install-ci-test` not try to redefine its own usage, but to inherit from `ci` was also included. PR-URL: https://github.com/npm/cli/pull/3497 Credit: @wraithgar Close: #3497 Reviewed-by: @nlf
2021-06-16fix(workspaces): explicitly error in global modeGar
Also includes a preliminary refactor to consolidate workspace logic now that every command that supports workspaces has it implemented. PR-URL: https://github.com/npm/cli/pull/3417 Credit: @wraithgar Close: #3417 Reviewed-by: @ruyadorno
2021-05-20Add workspaces support to reify/rebuild commandsisaacs
This adds `--workspace` support to: - audit (including audit fix) - ci - dedupe - find-dupes - install - install-ci-test - install-test - prune - rebuild - uninstall - update Also addresses missing error handling case, identified by @timoxley. https://github.com/npm/cli/pull/3227#discussion_r631024491 PR-URL: https://github.com/npm/cli/pull/3227 Credit: @isaacs Close: #3227 Reviewed-by: @ruyadorno
2021-05-14fix(docs): autogenerate config docs for commandsisaacs
Add a script and Makefile rule to build the "Configuration" section for all command documentation based on the command classes' `params` list. Also correct several minor problems in the documentation, and add `params` listings for commands that were lacking them, to match the existing documentation and/or behavior within the code. PR-URL: https://github.com/npm/cli/pull/3243 Credit: @isaacs Close: #3243 Reviewed-by: @wraithgar
2021-03-24fix(progress): re-add progress bar to reifyGar
The logger was no longer in flatOptions, we pass it in explicitly now PR-URL: https://github.com/npm/cli/pull/2944 Credit: @wraithgar Close: #2944 Reviewed-by: @nlf
2021-03-18feat(help): refactor npm help/help-searchGar
Lots of dead code removed thanks to streamlining of logic. `npm help` `npm <command>` and `npm help-search` are all now separated concerns, handling their own use cases. `help` calls `help-search` as a last resort, but `npm <command>` no longer tries to wind its way through to `help-search` just to get the basic npm usage displayed. The `did you mean` output has been expanded. It now always suggests top level commands, scripts, and bins, and suggests them in the way they should be called. PR-URL: https://github.com/npm/cli/pull/2859 Credit: @wraithgar Close: #2859 Reviewed-by: @ruyadorno
2021-03-18chore(config): remove flatOptions referencesGar
Iterative change moving us towards a more unified config. No longer pulling config from flatOptions where we don't have to. PR-URL: https://github.com/npm/cli/pull/2892 Credit: @wraithgar Close: #2892 Reviewed-by: @ruyadorno
2021-03-09fix(usage): clean up usage declarationsGar
Small refactor of commands to allow usage to be more programmatically generated, leading us in the direction of more tighly coupling each command to the params it accepts. PR-URL: https://github.com/npm/cli/pull/2821 Credit: @wraithgar Close: #2821 Reviewed-by: @isaacs
2021-03-05fix(npm) pass npm context everywhereGar
Instead of files randomly requiring the npm singleton, we pass it where it needs to go so that tests don't need to do so much require mocking everywhere PR-URL: https://github.com/npm/cli/pull/2772 Credit: @wraithgar Close: #2772 Reviewed-by: @ruyadorno
2021-02-25chore(refactor): promisify completion scriptsGar
We also removed the "none" script because we handle a missing script just fine. There is no need to put an empty one in PR-URL: https://github.com/npm/cli/pull/2759 Credit: @wraithgar Close: #2759 Reviewed-by: @nlf
2021-02-22fix(runScript): obey silent loglevelGar
If the user has specified a silent loglevel, we should pass that intention on when we call runScript Also a small cleanup in lib/run-script.js so that the reference to @npmcli/run-script is named the same as other files. PR-URL: https://github.com/npm/cli/pull/2719 Credit: @wraithgar Close: #2719 Reviewed-by: @nlf
2021-02-01wrap a timer around the rimraf call in npm-ciisaacs/ci-rm-timerisaacs
Fix: https://github.com/npm/arborist/issues/207 PR-URL: https://github.com/npm/cli/pull/2573 Credit: @isaacs Close: #2573 Reviewed-by: @nlf
2021-01-07fix(ci): pay attention to --ignore-scriptsMichael Garvin
Added a test for install too for this specific condition PR-URL: https://github.com/npm/cli/pull/2455 Credit: @wraithgar Close: #2455 Reviewed-by: @isaacs
2020-12-11ci: run install scripts for root projectisaacs/ci-scriptsisaacs
`npm ci` should run all the same preinstall/install/postinstall/prepare scripts for the root project just like `npm install`. Fixes: #1905 PR-URL: https://github.com/npm/cli/pull/2316 Credit: @isaacs Close: #2316 Reviewed-by: @ruyadorno
2020-11-17Preserve builtin conf when installing npm globallyisaacs
When a file named 'npmrc' is in the root of the npm module that is currently running, it adds config values that override the defaults (but not the global or user configs). This is a way for a system package installer to tell the npm that it installs to put its globals somewhere other than the default. In order to keep these configs around when users self-update npm with `npm i -g npm`, these config values must be "sticky", and ride along into the newly globally installed npm. This commit restores this behavior, fixing self-updating npm for Windows users, and any other systems that may make use of this functionality. Fixes: #2002 PR-URL: https://github.com/npm/cli/pull/2184 Credit: @isaacs Close: #2184 Reviewed-by: @ruyadorno
2020-11-13fix: pass flatOptions through to Arborist.reify in npm ciDarcy Clarke
Fixes: #2017 Credit: @darcyclarke Close: #2159 Reviewed-by: @ruyadorno
2020-10-30delete the contents of node_modules onlynlf
PR-URL: https://github.com/npm/cli/pull/2083 Credit: @nlf Close: #2083 Reviewed-by: @darcyclarke
2020-10-23update lint rules to match @npmcli/arboristisaacs
2020-09-17npm ci should never save package.json or lockfileisaacs
Via: https://github.com/targos/npm7-cra#issue-1-npm-ci-changes-packagejson
2020-07-15test: refactor ci testsclaudiahdz
PR-URL: https://github.com/npm/cli/pull/1523 Credit: @claudiahdz Close: #1523 Reviewed-by: @ruyadorno
2020-07-08add completion module for 'no completion possible'isaacs
2020-07-08fix completion call signature in several commandsisaacs
2020-05-08Consistent output for most reify() commandsisaacs
This adds a 'reify-output.js' util, which can be passed any Arborist object after it reifies a tree. Consistent output is printed in all cases, showing the number of packages added/removed/changed, packages needing funding, and a minimal (but always actionable and relevant) audit summary. The only code using the Installer class now is in lib/outdated.js, which is has a pending update coming soon. Prune and dedupe commands are awaiting top-level Arborist methods, so that they can be similarly tightened up. (For now, this commit just has them fail with a 'coming soon' message.) The last piece holding the 'install/*.js' code in this repo is that it is used in 'ls', 'fund', 'shrinkwrap', and the error-message util.
2020-05-08ci: add error on ci for global packagesclaudiahdz
2020-05-08ci: use loadVirtual to verify existance of package-lockclaudiahdz
2020-05-08feat: updated 'npm ci' to use arboristMichael Perrotte
2020-01-07Fix cache location for `npm ci`Zhenya Vinogradov
When you set `<cache>` directory in npm config, `npm ci` has been using `<cache>` for storing the cache instead of `<cache>/_cacache` PR-URL: https://github.com/npm/cli/pull/550 Credit: @zhenyavinogradov Close: #550 Reviewed-by: @ruyadorno
2019-09-24chore(ci): add dirPacker to optionsclaudiahdz
PR-URL: https://github.com/npm/cli/pull/252 Credit: @claudiahdz Close: #252 Reviewed-by: @mikemimik
2019-08-31ci: pass appropriate configs for file/dir modesisaacs
Re: https://npm.community/t/6-11-2-npm-ci-installs-package-with-wrong-permissions/9720 Still passing a plain old (non-Figgy Pudding) object into libcipm, duplicating the extra keys added in figgy-config.js. This is not a clean or nice or elegant solution, but it works, without regressing the config env var issue. Pairing with @claudiahdz PR-URL: https://github.com/npm/cli/pull/243 Credit: @isaacs Close: #243 Reviewed-by: @claudiahdz
2019-08-13ci: pass all configs to cipm installerisaacs
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
2018-12-11pacote: get rid of legacy pacoteOptsKat Marchán
2018-11-26ci: change `console.error` for `console.log` (#79)Alejandro López
Fixes: https://npm.community/t/npm-ci-logs-success-to-stderr/2303 PR-URL: https://github.com/npm/cli/pull/79 Credit: @alopezsanchez Reviewed-By: @zkat
2018-05-24ci: pause log before logging summary (#20715)Joshua Bennett
Fixes: https://npm.community/t/61 PR-URL: https://github.com/npm/npm/pull/20715 Credit: @legodude17 Reviewed-By: @zkat
2018-03-23standardizeRebecca Turner
2018-02-20ci: add new npm ci installerKat Marchán