-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Avoid output when `--output=none` - Ensure large negative grace values doesn't cause overflow
- Loading branch information
Showing
5 changed files
with
108 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,9 @@ subsequent commands to run. | |
## Features | ||
|
||
- [x] Supports private NPM registries (if `npm` can access it, so should this package) | ||
- [x] `--exec 'npm update %s'` to inject and run commands on release | ||
- [ ] `--install` flag to automatically run `npm install $package` on release | ||
- [ ] `--update` flag to automatically run `npm update $package` on release | ||
- [ ] `--exec 'echo %p@%v'` to inject and run commands on release | ||
- [ ] `--daemon` to keep listening for new releases (works with `--exec`) | ||
|
||
## Installation | ||
|
@@ -32,22 +32,33 @@ Package identifiers may optionally include: | |
### Options | ||
|
||
``` | ||
-e, --exec <command> execute shell command on release (interpolates %p, %s, %t, %v) | ||
-o, --output <format> output format (default/verbose/none/json) | ||
-g, --grace <seconds> accept versions released up to X before invocation (default: 10) | ||
-g, --grace <seconds> accept versions released up to X seconds before invocation (default: 10) | ||
-t, --timeout <seconds> exit if no release matches after X seconds (default: 0) | ||
-d, --delay <seconds> time between polling requests (default: 2) | ||
``` | ||
|
||
### In combination with other tools | ||
### Using `--exec` | ||
|
||
Other processes can be invoked when a release is discovered using the `--exec` | ||
option. The provided string will be executed within a basic shell environment | ||
after interpolation of the following placeholders: | ||
|
||
- `%p`: package name (`my-package`, `@scope/package`, etc.) | ||
- `%s`: package name and version (`[email protected]`, `@scope/[email protected]`, etc.) | ||
- `%t`: time of release in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) | ||
format (`2020-05-26T22:01:02Z`) | ||
- `%v`: released version (`1.0.1`) | ||
|
||
#### Install new version of a dependency when it becomes available | ||
|
||
```sh | ||
await-release my-dependency && npm update my-dependency | ||
await-release my-dependency --exec 'npm update %s' | ||
``` | ||
|
||
#### Notify when a new package version is released | ||
|
||
```sh | ||
await-release package-name && npx -p node-notifier-cli notify -t 'package-name released' | ||
await-release package-name --exec "npx -p node-notifier-cli notify -t '%p released %v'" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters