Skip to content

TUCCHI1/global-package-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Global Package Updater

This tool checks for updates of globally installed packages across multiple package managers (npm, yarn, pnpm, bun).

Prerequisites

  • Deno 1.31.0 or later

Installation

  1. Clone this repository:

    git clone https://github.com/TUCCHI1/global-package-updater.git
    cd global-package-updater
  2. Run the script:

    deno task start

Usage

Check for Updates

Run the following command to check for updates of global packages:

deno task start

This command will check global packages for all installed package managers (npm, yarn, pnpm, bun) and display available updates if any.

Run in Cron Mode

To run in cron mode, which writes results to a file:

deno task start --cron

In this mode, update information will be written to the update_log.txt file.

Setting up a Cron Job

To set up a cron job to run this script daily:

  1. Open the crontab file:
crontab -e
  1. Add the following line (adjust the paths as necessary):
0 9 * * * /path/to/deno run --allow-run --allow-write /path/to/global-package-updater/src/main.ts --cron

This will run the script every day at 9 AM.

Development

Run Tests

To run tests:

deno task test

Compiling

To compile the project:

deno task compile

Linting

To lint the code (using Deno's standard command):

deno lint

Formatting

To format the code (using Deno's standard command):

deno fmt

Contributing

  1. Fork this repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Create a Pull Request

License

Distributed under the MIT License. See LICENSE file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published