package_context 2.1.0
package_context: ^2.1.0 copied to clipboard
Initialize a package's config and dependencies as one graph, and read them from a typed package context.
Changelog #
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased #
2.1.0 - 2026-09-13 #
Added #
- Shared initialization results for concurrent calls with identical config and dependencies objects.
PackageContextInitializationInProgressfor conflicting graphs, reentrant binding, and graph changes during binding.- Regression tests for initialization, failure recovery, isolate boundaries, and the test bootstrap example.
- CI checks on Dart 3.13.2 and stable.
Changed #
bindaccepts synchronous and asynchronous callbacks throughFutureOr<void>.- Binding failures retain the graph, preserve the original error and stack trace, and allow explicit retry after host cleanup.
- Lifecycle documentation specifies all four initialized/bound combinations and isolate-local ownership.
- README diagrams use a consistent layout and explain graph ownership, wiring, and binding readiness.
make checkchecks formatting without rewriting source files and runs the main example.
2.0.0 - 2026-08-30 #
Added #
PackageGraphas the only valid initialized state.initializeto assign the graph once.ensureInitializedfor the no-op / refresh / initialize bootstrap.PackageContextNotInitializedandPackageContextAlreadyInitialized.
Removed #
- One-time setters for
configanddependencies. EquatableonPackageConfigandPackageDependencies.
Changed #
refreshnow takes aPackageGraph.- Reading an empty context throws
PackageContextNotInitialized.
1.0.0 - 2026-08-30 #
Added #
PackageConfigandPackageDependenciesas the host-facing boundary types.PackageContextwith one-time setters and typed getters forconfiganddependencies.isInitialized,trueonly when both values are set.refreshto replace an initialized graph in the same process.resetto clear the graph in tests.