If you are a developer on the MobX project, here are few guidelines that will
help in your journey. These apply to all the packages:
1. Format your code
To format your files following Dart guidelines. This will format your code accordingly regardless of your IDE settings.
dartfmt -w .
- Use the semantic versioning policy to
update the version in
- Say you are updating from
0.2.0, then update the
3. Expose version
- Expose the updated version of
pubspec.yamlto the library by running the following command in each package. This will run this command in each of the package folders.
melos run set_version
This requires you to have the
melos package installed globally. Install it
dart pub global activate melos
- Update the
CHANGELOG.mdfile to include the changes introduced in the new version. Normally, you would do this by adding a new bullet point for the version and follow the template from earlier versions.
- If the changes are minimal, you can also append the change to an earlier
bullet point but include the new version as a range. For example, the changes
0.3.2+3were minimal, so we added it as a range from the earlier version.
## 0.3.0 - 0.3.2+3
5. Git Push
And that's it! The rest of the work will be automatically done by
Github Actions. The Build and
Publish workflow will inspect the local and remote versions of the package and
pub.dev if newer. It will also tag the commit with the right tags
following the format of: