Make Changelog class eagerly load and parse file. (#120)

* Make Changelog class eagerly load and parse file.

Rather than reading and parsing the file on each access,
the class now eagerly reads the file in the constructor,
and immediately parses it into sections.

Since the section parsing is incredibly simple, the overhead
of splitting into sections should be minimal compared to loading
the file from disk.
Also, the existing code read the entire file, even if it only
needs the newest entry of the changelog, so parsing the entire
file once and for all should not be significantly slower,
and should be much faster on repeated access.

There should be no reason to create a Changelog and not query
it at all.
3 files changed
tree: cd9820ffaef71489f8d4a1a1b76a3ad6e133ef2c
  1. .github/
  2. pkgs/
  3. tool/
  4. .gitattributes
  5. .gitignore
  8. mono_repo.yaml

Dart CI


This repository is home to general Dart Ecosystem tools and packages.


blast_repoA tool to bulk validate and fix GitHub repos.
corpusA tool to calculate the API usage for a package.
dart_flutter_team_lintsAn analysis rule set used by the Dart and Flutter package
firehoseA tool to automate publishing of Pub packages from GitHub package
repo_manageMiscellaneous issue, repo, and PR query tools.

Publishing automation

For information about our publishing automation and release process, see

For additional information about contributing, see our contributing page.