Module changes

Source
Expand description

§Changes

This module is responsible for managing the changes in the monorepo. The changes are stored in a .changes.json file in the root of the project.

§Example

{
  "message": "chore(release): release new version",
  "gitUserName": "Git Bot",
  "gitUserEmail": "git.bot@domain.com",
  "changes": {
      "BRANCH-NAME": [{
          "package": "xxx",
          "releaseAs": "patch",
          "deploy": ["int"]
      }],
  }
}

Structs§

Change
Data structure to store a change
Changes
Data structure to store changes
ChangesFileData
Data structure to store changes file
ChangesOptions
Options to initialize the changes file

Functions§

add_change
Add a change to the changes file in the root of the project.
change_exist
Check if a change exists in the changes file in the root of the project.
changes_file_exist
Check if a changes file exists in the root of the project.
get_change
Get all changes for a specific branch from the changes file in the root of the project.
get_changes
Get all changes from the changes file in the root of the project.
get_package_change
Get a change for a specific package from the changes file in the root of the project.
init_changes
Initialize the changes file. If the file does not exist, it will create it with the default message. If the file exists, it will return the content of the file.
remove_change
Remove a change from the changes file in the root of the project.