Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@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] [-a] [--force] [-i | -v <value>]
FLAGS
-a, --available See 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 128,589 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.