@equinor/echo-update
v1.3.2
Published
Echo dependency updater
Downloads
3,588
Maintainers
Keywords
Readme
EchoUpdate
This is a simple tool for updating echo npm packages, or optionally all npm packages.
Major.Minor.Patch
- Auto update if new stable Minor or Patch. Stable = Major.Minor.Patch without any other text
- New Major - Show selection dialogue: New Major and Current Major on top, and then the rest listed sorted.
- New Minor & Fixed-version - Show selection dialogue if current package is fixed
- New Minor - Show selection dialogue if new unstable version (a few packages have release candidates tagged as latest)
- Don't upgrade if it contains several versions or > <. Like "<1.0.0" "2.3.1 || 2.4.5"
- Keep any prefixes in version name, like: ~ ^ etc.
Log/Output
- Green if updated
- Red if manually update is needed
- Yellow if fixed and not updating
- White/grey if no updates
OPTIONS
-a, --all Will update all packages, not just echo-packages
-d, --dev Will skip update for devDependencies
-e, --peer Will skip update for peerDependencies
-f, --filter=filter Will only update packages matching the filter, example: --filter=*react*
-i, --skipFixed Will skip dialogue and update for new fixed-version
-m, --skipMajor Will skip dialogue and update for new major-version
-o, --optional Will skip update for optionalDependencies
-p, --path=path The path (directory) containing package.json
EXAMPLES
echo-update | update echo packages
echo-update --all | update all packages
echo-update --filter=*jest* | update all packages that includes jest
echo-update -f=jest | only update the jest package
echo-update -a --path="./folder" | only update the jest package
echo-update -a --skipFixed --skipMajor | update all minor- & patch-versions, skip dialogue for major- & fixed-versions
Global
For global
use install package globally and use echo-update in your command line.
Npm Install
$ npm install @equinor/echo-update -g
Usage
For global use, navigate to the folder with the package.json and use the following commands.
To update all echo packages
, run:
$ echo-update
For any special cases where one need a specific version one can use one of the following commands. For version select use.
$ echo-update -v
For selecting 'beta' and 'next' version.
$ echo-update -c
For updating all packages
(not just echo), run:
$ echo-update -a
For running it on a different path/directory, run:
$ echo-update --path="../EchoCli/"
Local
For local
use in a specific project.
Npm Install
$ npm install @equinor/echo-update -D
Add scripts
to your package.json
.
{
"scripts": {
// Other scripts...
"echo-update": "echo-update",
"echo-update-version": "echo-update -v",
"echo-update-next": "echo-update -c",
"echo-update-all": "echo-update -a"
}
}
Usage
If you install package as dependency then add commands the following to your script section in the package.json
To update the echo packages
, run:
$ npm run echo-update
To update all packages
, run:
$ npm run echo-update-all
Development
First time usage, run following command first:
$ npm install
NPM build
$ npm run build
$ yalc publish
Run it locally with Node
You can run the script locally with node after a build. Example where it updates all packages for EchoCli using the specified path:
npm run build
node .\lib\index.js --path="../EchoCli/" -a
Yalc: For testing echo-update as you develop
Remember to add scripts to package.json as described earlier in local
section.
In echo-update:
$ npm run build
$ yalc publish
In your other repository where you want to test this (run both these each time you want to test a different echo-update option):
$ yalc add @equinor/echo-update
$ npm run echo-update-all
You need to run all these commands if you do a change and want to test again.