Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@oclif/plugin-update
Advanced tools
[![Version](https://img.shields.io/npm/v/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update) [![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update) [![License](htt
@oclif/plugin-update is a plugin for the Oclif CLI framework that provides functionality for updating CLI applications. It allows developers to easily integrate update commands into their CLI tools, ensuring that users can always have the latest version of the tool.
Check for Updates
This feature allows the CLI tool to check for updates. The `UpdateCommand` class from `@oclif/plugin-update` is extended to create a custom update command that can be run to check for updates.
const { Command } = require('@oclif/core');
const { UpdateCommand } = require('@oclif/plugin-update');
class MyUpdateCommand extends UpdateCommand {
async run() {
await super.run();
this.log('Checked for updates!');
}
}
module.exports = MyUpdateCommand;
Run Update
This feature allows the CLI tool to perform an update. The `UpdateCommand` class is used to run the update process, ensuring that the CLI tool is updated to the latest version.
const { Command } = require('@oclif/core');
const { UpdateCommand } = require('@oclif/plugin-update');
class MyUpdateCommand extends UpdateCommand {
async run() {
await super.run();
this.log('CLI tool updated to the latest version!');
}
}
module.exports = MyUpdateCommand;
The `update-notifier` package checks for updates of a CLI tool and notifies the user if a new version is available. Unlike `@oclif/plugin-update`, it does not perform the update itself but rather informs the user to update manually.
`npm-check-updates` is a package that allows you to find and update outdated npm dependencies. While it is not specifically for CLI tools, it provides similar functionality in terms of checking for and updating dependencies.
`yarn-upgrade-all` is a package that upgrades all dependencies for a project using Yarn. It is similar to `@oclif/plugin-update` in that it automates the update process, but it is focused on project dependencies rather than CLI tools.
See https://oclif.io/docs/releasing.html#autoupdater
oclif-example update [CHANNEL]
update the oclif-example CLI
USAGE
$ oclif-example update [CHANNEL] [--force | | [-a | -v <value> | -i]] [-b ]
FLAGS
-a, --available See available versions.
-b, --verbose Show more details about the available versions.
-i, --interactive Interactively select version to install. This is ignored if a channel is provided.
-v, --version=<value> Install a specific version.
--force Force a re-download of the requested version.
DESCRIPTION
update the oclif-example CLI
EXAMPLES
Update to the stable channel:
$ oclif-example update stable
Update to a specific version:
$ oclif-example update --version 1.0.0
Interactively select version:
$ oclif-example update --interactive
See available versions:
$ oclif-example update --available
See code: src/commands/update.ts
FAQs
[![Version](https://img.shields.io/npm/v/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update) [![Downloads/week](https://img.shields.io/npm/dw/@oclif/plugin-update.svg)](https://npmjs.org/package/@oclif/plugin-update) [![License](htt
The npm package @oclif/plugin-update receives a total of 174,857 weekly downloads. As such, @oclif/plugin-update popularity was classified as popular.
We found that @oclif/plugin-update demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.