This tool checks for updates of globally installed packages across multiple package managers (npm, yarn, pnpm, bun).
- Deno 1.31.0 or later
-
Clone this repository:
git clone https://github.com/TUCCHI1/global-package-updater.git cd global-package-updater
-
Run the script:
deno task start
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.
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.
To set up a cron job to run this script daily:
- Open the crontab file:
crontab -e
- 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.
To run tests:
deno task test
To compile the project:
deno task compile
To lint the code (using Deno's standard command):
deno lint
To format the code (using Deno's standard command):
deno fmt
- Fork this repository
- Create a feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Create a Pull Request
Distributed under the MIT License. See LICENSE file for more information.