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
  6. CONTRIBUTING.md
  7. LICENSE
  8. mono_repo.yaml
  9. README.md
README.md

Dart CI

Overview

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

Packages

PackageDescriptionVersion
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 teams.pub package
firehoseA tool to automate publishing of Pub packages from GitHub actions.pub package
repo_manageMiscellaneous issue, repo, and PR query tools.

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

For additional information about contributing, see our contributing page.