change
Changelog manipulation in Dart. For the command-line tool, see Cider.
Features
- Supports some basic Markdown syntax, such as bold, italic, links, etc.
- CRUD operations on releases and changes.
Limitations
- Works with changelogs following keepachangelog format only.
- Semantic versioning is implied.
- Dates must be in ISO 8601 (YYYY-MM-DD) format.
- Complex Markdown (e.g. tables, nested lists, HTML, etc) will not work. For better markdown support consider opening a PR to marker.
Example
import 'dart:io';
import 'package:change/change.dart';
/// This example shows how to parse a changelog.
/// Run it from the project root folder: `dart example/main.dart`
void main() {
final file = File('CHANGELOG.md');
final log = parseChangelog(file.readAsStringSync());
final latest = log.history().last;
print('Changelog contains ${log.history().length} releases.');
print('The latest version is ${latest.version}');
print('released on ${latest.date}');
print('and containing ${latest.changes().length} change(s).');
}
Changelog
This project follows Semantic Versioning 2.0.0.
0.4.2 - 2022-12-22
Changed
- Version bump from 0.4.1 to 0.4.2.
0.4.1 - 2022-12-22
Changed
- Version bump from 0.4.0 to 0.4.1 (Recompile due to installer optimizations).
0.4.0 - 2022-05-09
Changed
- Bumped the versions of dependencies: markdown to 5.0.0, marker to 0.3.0, pub_semver to 2.1.1
- Bumped the SDK version to 2.16.2
0.3.1 - 2021-12-28
Changed
- Updated dependencies
- Prevent adding an existing release
0.3.0 - 2021-04-11
Changed
- Release date is now required for each version.
- Change types are not limited by the ones listed by semver.
- Parsing and printing moved to standalone functions.
Removed
- Dependency on
maybe_just_nothing.
- Dependency on
dart:io.
- Markdown-related parts of the API.
- The
Changelog.release() method. This logic will be added directly to Cider.
0.2.0 - 2021-03-22
Changed
- Migrated to null safety
- The "Unreleased" section is hidden when empty
0.1.1 - 2020-10-18
Changed
- Bump dependencies versions
0.1.0 - 2020-07-26
Changed
- API has been reworked substantially
Removed
0.0.13 - 2020-07-24
Added
- Support for changelogs with missing dates
0.0.12 - 2020-07-23
Added
- Ability to parse changelog with missing change type
0.0.11 - 2020-07-20
Changed
0.0.10 - 2020-07-18
Fixed
- Missing diff link was breaking the app
0.0.9 - 2020-07-18
Added
Collection.addText()
MarkdownLine.parse()
0.0.8 - 2020-07-18
Added
- A static
fromLines() factory method
0.0.7 - 2020-07-12
Changed
0.0.6 - 2020-07-08
Added
- New command 'print' to output a released version
0.0.5 - 2020-07-05
Added
- Create CHANGELOG.md when missing
0.0.4 - 2020-06-24
Added
- Support for multiple major versions in a single file
0.0.3 - 2020-06-23
Added
- Console app
- Changelog model
Changed
- BREAKING Total rework of the package
0.0.2 - 2018-10-18
Added
0.0.1 - 2018-10-18
Added
- Parsing from markdown
- Writing to markdown