Gathering detailed insights and metrics for @cp-utils/gitversion
Gathering detailed insights and metrics for @cp-utils/gitversion
Complete customizable git-based release management system
npm install @cp-utils/gitversion
Typescript
Module System
Min. Node Version
53.4
Supply Chain
59.2
Quality
81.6
Maintenance
100
Vulnerability
97.9
License
TypeScript (98.76%)
JavaScript (1.24%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
3,844
Last Day
1
Last Week
7
Last Month
162
Last Year
3,844
Apache-2.0 License
3 Stars
246 Commits
1 Forks
2 Watchers
12 Branches
1 Contributors
Updated on Feb 06, 2025
Latest Version
0.0.50
Package Id
@cp-utils/gitversion@0.0.50
Unpacked Size
307.11 kB
Size
71.07 kB
File Count
91
Published on
Jun 27, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-93.9%
7
Compared to previous week
Last Month
39.7%
162
Compared to previous month
Last Year
0%
3,844
Compared to previous year
Gitversion is a complete customizable git-based release management system. Primarily focused on package releases.
The core concept of gitversion evolves around branch detection and branch types.
Gitversion defines the following types:
The names and detections can be customized to your own need.
Depending on the detected branch types the system will make different choices:
Branch | Branch type | Version namings | (NPM) Release tag | Changelog | Notes |
---|---|---|---|---|---|
main | main | 1.0.0 | latest | yes | Official releases |
release/next | release | 1.0.0‑next.0 | next | yes | (Pre) releases |
feature/gh‑1234 | feature | 1.0.0‑gh‑1234.0 | gh‑1234 (*) | no | Feature release. I.e. to let the customer test the requested feature |
You can chose if and how feature releases are released. This can differ from release branches.
Like most release systems gitversion will add a tag for each release. This will follow the tag naming with a prefix (default 'v'). I.e.
The difference of gitversion is that the tags are the only source of truth. It does not care about versions inside files and will keep them even on the default "0.0.0".
There are two main advantages of this strategy:
Gitversion has 2 commands to work with this git-only version strategy:
1yarn gitversion restore
The output will be something like:
As you see with this you wil get all versions back in package.json files.
1yarn gitversion reset
The output will be something like:
As you see with this you wil reset all versions back to '0.0.0'.
Gitversion works with the concept of a "bump". This is one of the key commands:
1yarn gitversion bump
Bump will do the following steps:
Gitversion is build for monorepos with multiple workspaces. It will detect all (public) workspaces and use them during bump.
There are 2 main operation modes:
This is the default mode. This will keep all versions of all workspaces the same. This is useful for monorepos with series of packages (i.e. '@aws-sdk/'*)
This will use unique versions per workspace in the mono repo. Based on the path of the committed files it will decide if the specific workspace needs a bump and which bump type.
Gitversion is buld for usage within CI/CD pipelines. When building packages gitversion can be used in a pipeline like this:
This will allow you to run your time consuming steps in parallel with your build step. Only when all checks pass you have a (quick) publish stage.
No vulnerabilities found.
No security vulnerabilities found.