Age | Commit message (Collapse) | Author |
|
Adds a minimalistic reify step that updates the installed tree after
initializing a new workspace.
Moved the shared update logic from `lib/commands/version.js` to a
`lib/workspaces/update-workspaces.js` module that is reused between
both `npm version` and `npm init`.
Relates to: https://github.com/npm/rfcs/issues/556
Relates to: https://github.com/npm/cli/pull/4588
|
|
|
|
|
|
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
|
|
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
|
|
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
|
|
This reverts commit f17dfa0ced7d8df9bb7baf378bb20d33175c8e8b.
|
|
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
|
|
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
|
|
PR-URL: https://github.com/npm/cli/pull/3312
Credit: @isaacs
Close: #3312
Reviewed-by: @wraithgar
|
|
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
|
|
Add workspaces support to `npm fund`
- Add lib/workspaces/arborist-cmd.js base class
- Add ability to filter fund results to a specific set of workspaces
- Added tests and docs
Fixes: https://github.com/npm/statusboard/issues/301
PR-URL: https://github.com/npm/cli/pull/3241
Credit: @ruyadorno
Close: #3241
Reviewed-by: @isaacs
|
|
PR-URL: https://github.com/npm/cli/pull/3055
Credit: @wraithgar
Close: #3055
Reviewed-by: @darcyclarke
|
|
Add workspaces support to `npm exec`
- Refactored logic to read and filter workspaces into
`lib/workspaces/get-workspaces.js`
- Added location context message when entering interactive
shell using `npm exec` (with no args)
- Add ability to execute a package in the context of each
configured workspace
Fixes: https://github.com/npm/statusboard/issues/288
PR-URL: https://github.com/npm/cli/pull/2886
Credit: @ruyadorno
Close: #2886
Reviewed-by: @wraithgar
|