Skip to content

Commit

Permalink
Add a warning for available CLI updates (#1749)
Browse files Browse the repository at this point in the history
* Add warning for CLI updates

Use `@oclif/plugin-warn-if-update-available` to display a message to the
user in case the CLI can be updated.

* Update lock file

* Add changeset
  • Loading branch information
0237h authored Oct 31, 2024
1 parent 0ba99dc commit bf43cbf
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-weeks-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphprotocol/graph-cli': minor
---

Add warning for available CLI updates
10 changes: 8 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@oclif/core": "2.8.6",
"@oclif/plugin-autocomplete": "^2.3.6",
"@oclif/plugin-not-found": "^2.4.0",
"@oclif/plugin-warn-if-update-available": "^3.1.20",
"@whatwg-node/fetch": "^0.8.4",
"assemblyscript": "0.19.23",
"binary-install-raw": "0.0.13",
Expand Down Expand Up @@ -85,7 +86,12 @@
],
"plugins": [
"@oclif/plugin-not-found",
"@oclif/plugin-autocomplete"
]
"@oclif/plugin-autocomplete",
"@oclif/plugin-warn-if-update-available"
],
"warn-if-update-available": {
"timeoutInDays": 1,
"message": "<%= config.name %> update available from <%= chalk.yellowBright(config.version) %> to <%= chalk.greenBright(latest) %>."
}
}
}
Loading

0 comments on commit bf43cbf

Please sign in to comment.