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
AgeCommit message (Collapse)Author
2022-03-24fix: 100% coverage in tests (#4607)Gar
* fix: 100% coverage in tests * Removed dead code in `lib/utils/usage.js`. * Removed dead code in `lib/base-command.js`. * Removed "load-all" test, we currently have 100% coverage and new PRs without tests will be rejected if they don't add coverage for new files. * Removed `check-coverage` script as a separate command. * Removed separate coverage test in ci.yml. * Removed `coverage` flag from tap config, the default is already to enforce 100% coverage. Removed a tiny bit of dead code resulting from this * fix: clean up usage output Removed usage lib, rolled logic into base-command.js Cleaned up usage output to be less redundant
2022-03-02fix: ignore implict workspace for some commands (#4479)Nathan Fritz
Closes #4404 Special thanks to @mshima for submitting a similar PR #4439
2022-01-20fix: resolve workspace paths from cwd when possible (#4265)nlf
2021-11-05chore: update to latest eslint and linting rulesGar
This brings us in line with the rest of the linting rules we are wanting to use on the npm cli repos. There were several hundred over-length lines and instead of editing them all by hand I piped the failing file through `prettier` and back through `eslint` just to save some time and energy. This means there may be some quirks in the linting those files have, but we can fix those if we see them and they bother us. Other than that there were about 50 lines that are legitimately over-length, all are now explicitly overridden. Many are tests that could be snapshots. PR-URL: https://github.com/npm/cli/pull/3995 Credit: @wraithgar Close: #3995 Reviewed-by: @lukekarrys
2021-11-04fix: make prefixed usage errors more consistentLuke Karrys
PR-URL: https://github.com/npm/cli/pull/3987 Credit: @lukekarrys Close: #3987 Reviewed-by: @wraithgar
2021-11-04fix(help|edit): use npm.exec, use file:///Gar
Windows no longer allows `file://`, but instead requires `file:///` for local file urls. Also after the command refactor things shifted and the tests didn't catch that the help pages didn't work at all anymore, and that the post-edit rebuild didn't work. This cleans up those two issues. PR-URL: https://github.com/npm/cli/pull/3994 Credit: @wraithgar Close: #3994 Reviewed-by: @lukekarrys
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-10-15feat(workspaces): add --include-workspace-root and explicit --no-workspacesfritzy/workspace-rootGar
Adds a new config item that includes the workspace root. This also changes --workspaces to a trinary, so that setting it to false will explicitly exclude workspaces altogether. PR-URL: https://github.com/npm/cli/pull/3890 Credit: @fritzy Close: #3890 Reviewed-by: @wraithgar
2021-09-30Revert "feat(workspaces): --include-workspace-root"Luke Karrys
This reverts commit f17dfa0ced7d8df9bb7baf378bb20d33175c8e8b.
2021-09-30feat(workspaces): --include-workspace-rootGar
Adds a new config item that includes the workspace root when running non-arborist commands (i.e. repo, version, publish). Arborist will need to be udpated to look for this flag to change its behavior to include the workspace root for its functions. This also changes --workspaces to a trinary, so that setting it to false will explicitly exclude workspaces altogether. This is also going to require an arborist change so that it ignores workspaces altogether. Co-author: @fritzy PR-URL: https://github.com/npm/cli/pull/3816 Credit: @isaacs Close: #3816 Reviewed-by: @wraithgar
2021-07-12chore(exit): log any un-ended timingsGar
It will be helpful to us when debugging the "exit handler never called" bugs to know which timings were started but not ended. Tests moved to use real npm. PR-URL: https://github.com/npm/cli/pull/3479 Credit: @wraithgar Close: #3479 Reviewed-by: @ruyadorno
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-27feat(link): add workspace supportisaacs
PR-URL: https://github.com/npm/cli/pull/3312 Credit: @isaacs Close: #3312 Reviewed-by: @wraithgar
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-04-15feat(version): add workspace supportGar
PR-URL: https://github.com/npm/cli/pull/3055 Credit: @wraithgar Close: #3055 Reviewed-by: @darcyclarke
2021-03-31feat(workspaces): add repo and docsGar
This adds workspaces support to `npm repo` and `npm docs`. It also updates the usage output to support the -w and -ws parameters output, and cleans up some unneccessary functions in `run-script` and `exec`. PR-URL: https://github.com/npm/cli/pull/2972 Credit: @wraithgar Close: #2972 Reviewed-by: @nlf
2021-03-22fix(usage): tie usage to configGar
This starts us down the path of tying the params our commands accept to their config items. For now it is optional, and not every current config item would cleanly render if we added them today. The ones that are added here DO render nicely, and we can iterate from here. We can also at a later date do the same kind of appraoch with our positional args. PR-URL: https://github.com/npm/cli/pull/2908 Credit: @wraithgar Close: #2908 Reviewed-by: @nlf, @isaacs
2021-03-19feat: add run-script workspacesRuy Adorno
- Add workspaces-related configs: - workspace: list of workspaces names/dir to filter for - workspaces: boolean value to enable/disable workspaces awareness - adds the proposed note in the docs of each of the commands that are not affected by these configs. - Add workspaces support to `npm run-script` - add ability to serially run lifecycle scripts in workspaces - add ability to list scripts for all workspaces - add colors to `npm run` (no args) output Relates to: https://github.com/npm/rfcs/pull/117 Fixes: https://github.com/npm/statusboard/issues/276 Fixes: https://github.com/npm/statusboard/issues/283 Fixes: https://github.com/npm/statusboard/issues/284 Fixes: https://github.com/npm/statusboard/issues/285 Fixes: https://github.com/npm/statusboard/issues/286 PR-URL: https://github.com/npm/cli/pull/2864 Credit: @ruyadorno Close: #2864 Reviewed-by: @wraithgar
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-12usage: Correct "npm COMMAND help" to "npm help COMMAND"Edward Grech
PR-URL: https://github.com/npm/cli/pull/2855 Credit: @dwardu Close: #2855 Reviewed-by: @ruyadorno, @darcyclarke
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