Packetus
Packetus is a small, open-source program that shows the history of package changes in the project.
At the moment Packetus supports composer.json
and package.json
files.
Install
Install Packetus using go install
command:
go install github.com/romsar/packetus@latest
Usage
Run Packetus using next command:
packetus <path to the repo> <path to the package manager file> --some-option=some-value
Options
Option |
Description |
Type |
Default value |
--commits |
Processed commits count |
uint |
100 |
--strategy |
Strategy name: composer, npm. If no specified, strategy will be chosen by file name. |
string enum: composer, npm |
|
--change-events |
Change events, that will be captured. |
string enum array: added, updated, deleted |
added, updated, deleted |
--dev |
Capture dev packages. |
boolean |
true |
--json |
Path to the file where results will be saved in json format. |
string |
|
--csv |
Path to the file where results will be saved in csv format. |
string |
|
Examples
Get changes for last 500 commits:
packetus . "/Users/<some user>/project" "./composer.json" --commits=500
Get only added and deleted changes:
packetus . "/Users/<some user>/project" "./composer.json" --change-events="added,deleted"
With specified strategy:
packetus . "/Users/<some user>/project" "./foo.json" --strategy=npm
Do not capture dev packages:
packetus . "/Users/<some user>/project" "./package.json" --dev=false
Save results in json format:
packetus . "/Users/<some user>/project" "./package.json" --json="/Users/<some user>/result.json"
Save results in csv format:
packetus . "/Users/<some user>/project" "./package.json" --csv="/Users/<some user>/result.csv"