Closed rishson closed 6 years ago
dojo update
should update all out of date commands
dojo update someCommand
should update only the specified command.
Implementation plan for --outdated:
Using david,
parse package.json
remove all non dojo-cli
prefixed dev-deps.
pass to david
display dojo cli command modules that can be updated and show latest stable release no, e.g.
build (dojo-cli-build-webpack) 1.0.0 can be updated to 1.2.3
where 1.2.3
is the latest stable release.
The removal of non dojo-cli
prefixed dev-deps is to speed up the check, and because to get david
to ignore deps, you have to name the deps to ignore rather than passing a regex.
After discussion with @agubler - deciding to put the version check under a flag - version -outdated
.
Moving the version --outdated
work to a separate issue. Refs #68
So david
does not expose its update
functionality in the lib, only via its cli.
The implementation will have to do this itself:
npm.load(...);
npm.commands.install(..)
@rishon wouldn't we just suggest that people use npm update --dev --save
?
For now, I think just some text that says that is fine (but isn't it npm update --save
- cus they may have installed commands as globals?)
it would be -g
for global
, --dev
is so that it does devDepdencies
as well.
Yeah - its not worth listing the permutations of flags to the user (global, dev-dep). Probably best to just say These commands can be updated with 'npm update'
or similar.
Sidenote: npm update
will downgrade deps that are passed latest - good to know 😕
Extends #11
We should display which commands can be updated (where a more recent version is available):
We will need to provide
dojo update
alongside this feature.