Skip to content

Commit b31db13

Browse files
committed
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.
1 parent e37ce8d commit b31db13

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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)