0.1.11 • Published 2 years ago
@fnet/npm-update v0.1.11
@fnet/npm-update
A simple utility to update npm packages based on specified patterns.
This tool allows you to easily update npm packages based on specified naming patterns, such as @flownet/ and @fnet/. It can also be used as a CLI to quickly check or update packages globally or locally based on the given patterns.
Installation
You can install it globally for CLI use or as a local dependency for programmatic use:
# Global installation for CLI:
npm install -g @fnet/npm-update
# Local installation:
npm install @fnet/npm-updateCLI Usage
Once installed globally, you can use the CLI as follows:
fnet-npm-update [options]CLI Options
-g, --global: Operate on globally installed npm packages.-u, --update: Actually update the packages instead of just listing them.-p, --patterns: Patterns to match package names against. This can be a string or an array of strings. For example:@flownet/or@fnet/.
Example:
fnet-npm-update -g -u -p "@flownet/"This command will update all globally installed npm packages that start with @flownet/.
Programmatic Usage
You can also use this tool programmatically in your JavaScript or TypeScript projects:
import npmUpdate from '@fnet/npm-update';
// Check outdated packages
npmUpdate();
// Update local packages
npmUpdate({ update: true });
// Update global packages with patterns
npmUpdate({ global: true, patterns: ['@flownet/', '@fnet/'] });