Skip to content

Commit bf43cbf

Browse files
authored
Add a warning for available CLI updates (#1749)
* 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
1 parent 0ba99dc commit bf43cbf

File tree

3 files changed

+158
-16
lines changed

3 files changed

+158
-16
lines changed

.changeset/wild-weeks-protect.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphprotocol/graph-cli': minor
3+
---
4+
5+
Add warning for available CLI updates

packages/cli/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"@oclif/core": "2.8.6",
3333
"@oclif/plugin-autocomplete": "^2.3.6",
3434
"@oclif/plugin-not-found": "^2.4.0",
35+
"@oclif/plugin-warn-if-update-available": "^3.1.20",
3536
"@whatwg-node/fetch": "^0.8.4",
3637
"assemblyscript": "0.19.23",
3738
"binary-install-raw": "0.0.13",
@@ -85,7 +86,12 @@
8586
],
8687
"plugins": [
8788
"@oclif/plugin-not-found",
88-
"@oclif/plugin-autocomplete"
89-
]
89+
"@oclif/plugin-autocomplete",
90+
"@oclif/plugin-warn-if-update-available"
91+
],
92+
"warn-if-update-available": {
93+
"timeoutInDays": 1,
94+
"message": "<%= config.name %> update available from <%= chalk.yellowBright(config.version) %> to <%= chalk.greenBright(latest) %>."
95+
}
9096
}
9197
}

0 commit comments

Comments
 (0)