Skip to content

package:build_test v3.0.0

Compare
Choose a tag to compare
@davidmorgan davidmorgan released this 16 Jun 07:26
· 21 commits to master since this release
db6c413

Breaking changes:

  • Breaking change: removed tearDown parameter to resolveSources for
    keeping resolvers across multiple tests.
  • Breaking change: tests must use new TestReaderWriter instead of
    InMemoryAssetReader and InMemoryAssetWriter.
  • Breaking change: testBuilder no longer accepts a reader and a writer.
    Instead it returns a TestBuilderResult with the TestReaderWriter
    that was used.
  • Breaking change: resolveSources no longer automatically reads non-input
    files from the filesystem; specify explicitly which non-input files the
    test should read in nonInputsToReadFromFilesystem.
  • Breaking change: remove MultiAssetReader. Load the source into one
    TestReaderWriter instead.
  • Breaking change: TestReaderWriter.assetsRead does not take into account
    details of the build, it's just what was actually read. Use
    TestReaderWriter.inputsTracked for what was recorded as an input. Note that
    resolver entrypoints are now tracked separately from inputs, see
    TestReaderWriter.resolverEntrypointsTracked.
  • Breaking change: Remove StubAssetReader. Use TestReaderWriter instead.

Other user-visible changes:

  • resolveSources and testBuilder now do a full build_runner build, with
    configuration as much as possible based on the some parameters.
  • Add testBuilders to run a test build with multiple builders.
  • Add optionalBuilders to testBuilders to have some builders be optional.
  • Add visibleOutputBuilders to testBuilders to have some builders write
    their output next to their inputs.
  • Add testingBuilderConfig to testBuilders to control builder config
    override.
  • Add resolvers parameter to testBuild and testBuilders.
  • Add readerWriter and enableLowResourceMode parameters to testBuild
    and testBuilders.
  • TestReaderWriter writes and deletes are notified to FakeWatcher.
  • TestReaderWriter tracks assetsWritten.
  • Support checks on reader state after a build action in resolveSources.

Versions:

  • Bump the min SDK to 3.7.0.
  • Use build_runner_core 9.0.0.

Internal changes:

  • Start using package:build/src/internal.dart.
  • Refactor BuildCacheReader to BuildCacheAssetPathProvider.
  • Refactor FileBasedAssetReader and FileBasedAssetWriter to ReaderWriter.