Skip to content

alex-way/universal-changesets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Changeset

This is honestly just a fun side project I'm working on with no intentions of using it in any production-like setting.

It's based on the existing changesets tool, but I wanted to make it more generic and not tied to a specific project.

Usage

Adding a changeset

changeset add --bump-type major --message "Added a new feature" # or simply `changeset add`

Consuming changesets

changeset version

Getting the current version

changeset get-version

A dry run can be performed by passing the --dry-run flag.

This will output the highest version type found in the .changeset directory and the changesets that were found.

TODO

  • Add support for creating a new changeset
  • Plugin support for reading/writing the version to/from a file
    • Maybe allow the cli itself to install & manage plugins?
  • Add support for publishing a changeset
  • Add support for parsing the current version from one of the supported project files
  • Documentation site
  • Add support for creating and amending a CHANGELOG.md file
  • Add a command to preview the CHANGELOG.md file prefix before publishing. changeset preview
  • Add support for consuming changesets and updating the version in supported project files:
    • Unsupported project files (.changeset/version file)
    • pyproject.toml
    • package.json
    • Cargo.toml
    • Go.mod
  • Add support for auto-committing changesets (via --autocommit flag for changeset add)
  • Add support for tagging releases in git (via --tag flag for changeset add)
  • Add support for an additional number in the version (e.g. 1.2.3.4). This is for projects which are an add-on to existing projects.
  • Side-car repo for bot to manage releases via a pull request, and to detect when a changeset is missing in a PR, or when a changeset is included to detail the version that it will bump to.
  • Reduce the FS permissions to just the versioned file within the configuration
  • Blog write-up for how I built it and how it works

Plugins

VersionedFile

This plugin is used to read/write the version to/from a plain file.

The file must be a plain text file with the following format:

1.2.3

Example config file:

{
  "plugin": {
    "name": "versionfile",
    "sha256": "beef1de60035053ad01eff83875999dc9918a65e1cffc006fca95c3bfbe55d70",
    "url": "https://github.com/alex-way/changesets-go-versionfile-plugin/releases/download/0.0.2/versionfile.wasm",
    "versionedFile": ".changeset/version"
  }
}

Implementing your own plugin

About

A re-implementation of https://github.com/changesets/changesets which works for any language/project!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published