package:build_test v3.0.0
·
21 commits
to master
since this release
Breaking changes:
- Breaking change: removed
tearDown
parameter toresolveSources
for
keeping resolvers across multiple tests. - Breaking change: tests must use new
TestReaderWriter
instead of
InMemoryAssetReader
andInMemoryAssetWriter
. - Breaking change:
testBuilder
no longer accepts areader
and awriter
.
Instead it returns aTestBuilderResult
with theTestReaderWriter
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 innonInputsToReadFromFilesystem
. - 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
. UseTestReaderWriter
instead.
Other user-visible changes:
resolveSources
andtestBuilder
now do a fullbuild_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
totestBuilders
to have some builders be optional. - Add
visibleOutputBuilders
totestBuilders
to have some builders write
their output next to their inputs. - Add
testingBuilderConfig
totestBuilders
to control builder config
override. - Add
resolvers
parameter totestBuild
andtestBuilders
. - Add
readerWriter
andenableLowResourceMode
parameters totestBuild
andtestBuilders
. TestReaderWriter
writes and deletes are notified toFakeWatcher
.TestReaderWriter
tracksassetsWritten
.- 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
toBuildCacheAssetPathProvider
. - Refactor
FileBasedAssetReader
andFileBasedAssetWriter
toReaderWriter
.