catalyst_builder 3.6.0 copy "catalyst_builder: ^3.6.0" to clipboard
catalyst_builder: ^3.6.0 copied to clipboard

A lightweight and easy to use dependency injection provider builder for dart.

3.6.0 #

Fixed updating the generated provider file #

In this release we hopefully fixed the old problem with outdated *.catalyst_builder.g.dart files.

Cause

The ServiceProviderBuilder did not emit an updated version since the @GenerateServiceProvider annotation doesn't exist in the most files.

Solution

We added a new generatedProviderFile option to the preflightBuilder configuration. You need to put the relative path to the generated provider file (*.catalyst_builder.g.dart) in this option. The PreflightBuilder will automatically delete the file if it exists. This lead to a full regeneration of the service provider file. 🙌

3.5.2 #

Fix downgrade error #

In version 5.0.0 of the analyzer Package was DartType.element removed. It was added again in 5.2.0 so we updated the version constraint to >=5.2.0 <7.0.0 to fix that downgrade error.

3.5.1 #

Singleton instances on enhanced providers #

Previously each ServiceProvider had a map of service instances. If a singleton was created, the provider stored the instance in the map and returned the instance the next time it is requested.

If you're working with enhanced providers (ServiceProvider.enhance), the singletons created in the EnhancedProvider wasn't stored in the root provider which causes that a singleton will be created again if it's resolved in the root provider.

To solve this problem, the instances of the map is now a reference to the original instances map of the parent provider.

Dependency updates #

Moved the lints to dev_dependencies and set the version constraint to any

3.5.0 #

Updated the version constraint of the analyzer package.

3.4.0 #

Features:

  • Added an example for working with relative dependencies. PR#19

Changes:

  • The preflight builder will no more emit empty files. This should increase the build performance. PR#18

3.3.1 #

Fixes:

  • Fixed the enhance method. PR#16

3.3.0 #

Features:

  • Added stricter rules to analysis_options.yaml
    • Added type castings to the generated service provider.

3.2.3 #

Fixes:

  • Fixed the enhance method and overtake the expose map and the known services map.

3.2.2 #

Fixes:

  • Fixed the type inference when enhancing the ServiceProvider.

3.2.1 #

Fixes:

  • Fixed the generation for libraries (working with part and part of).
  • Fixed the extraction of services for packages without the GenerateServiceProvider annotation.

3.2.0 #

Features:

  • Introducing the new @Inject annotation. This annotation works like the @Parameter Annotation but is more flexible. You can use it to inject a list of tagged services and also to inject parameters. The example code contains a example for this feature.

Deprecations:

  • The @Parameter annotation was marked as deprecated and will be removed in the next major release.
    See UPGRADE.md for upgrade instructions.

Changes:

  • Updated the minimum analyzer version to ^5.0.0

Internal:

  • Updated the usages of deprecated properties. Using
    • element instead of element2
    • enclosingElement instead of enclosingElement3
  • Preflight logic refactored

3.1.0 #

Maintenance Release

  • Replaced a deprecated function call (assignVar)

3.0.0 #

Features:

  • Added the GenerateServiceProvider annotation

Changes:

  • Updated the minimum Dart SDK version to 2.17.0

Breaking Changes:

  • build.yaml
    • Removed the option outputName This change was necessary since the build_runner does not recognize changes correctly with runtime file names.
    • Removed the option preflightExtension.

2.3.1 #

Changes:

  • Dependencies updated
    • analyzer: >=3.2.0 <5.0.0 -> >=4.3.0 <5.0.0
    • build_runner: ^2.0.4 -> ^2.2.0
  • Using enclosingElement2 instead of enclosingElement (pub.dev score)
  • Added ignore rules for generated files
    • implementation_imports
    • no_leading_underscores_for_library_prefixes

2.3.0 #

Features:

  • Added tags to the Service annotation
  • Added ServiceProvider.resolveByTag(#tag) to resolve a list of services by a tag.

Take a look in the README.md for example usage.

Changes:

  • Dependencies updated
    • glob: ^2.0.1 -> ^2.1.0
  • Dev Dependencies updated
    • lints: ^1.0.1 -> ^2.0.0

Internal:

  • TryCatchBuilder removed.

2.2.3 #

Changes:

  • Added shields to the README.md
  • Added more unit tests and increased the code coverage. PR#8

Bugfixes:

  • Add the parameters of the parent service provider to the enhanced service provider. PR#7

2.2.2 #

Changes:

  • README.md updated

2.2.1 #

Changes:

  • Dependencies updated
    • analyzer: ^3.2.0 -> >=3.2.0 <5.0.0
    • test: ^1.20.1 -> any
    • source_gen -> removed

2.2.0 #

Features

  • Added the EnhanceableProvider class and implemented it in the generated ServiceProvider. This class allows you to create sub-providers. PR#5

2.1.0 #

Features

  • Added the ServiceRegistry class and implemented it in the generated ServiceProvider. This class allows you to register services at runtime. PR#4

Changes:

  • Optimized the code generation PR#3

2.0.0 #

Upgraded the analyzer and the test package to support Flutter 2.10.

1.3.3 #

Downgraded the analyzer package to ensure compatibility to the test package.

1.3.2 #

Fixed pub.dev score issues.

  • upgraded the analyzer package
  • removed the pedantic dev-package
  • removed an unused import in the extracted_service.dart

1.3.1 #

Project code moved to GitHub. Updated the pubspec.yaml

1.3.0 #

Features:

  • Added ServiceProvider.has<T>([Type? t]) to check if a service is known.

Changes

  • Updated the dependencies
    • code_builder ^4.0.0 -> ^4.1.0
    • build ^2.0.1 -> ^2.1.0
    • analyzer ^1.7.1 -> ^2.2.0
    • build_runner_core ^7.0.0 -> ^7.1.0

1.2.0 #

Added a @ServiceMap annotation.

1.1.1 #

Changed the preflight output extension to avoid conflicting outputs.

1.1.0 #

Added a includePackageDependencies option to the build.yaml.

1.0.2 #

Dependencies downgraded

1.0.1 #

Publisher fixed

1.0.0 #

First stable release 🎉

  • Code generator organized

0.0.6 #

  • Added unit and integration tests
  • Formatting fixed

0.0.5 #

  • ServiceProvider.boot() added
  • @Preload annotation added

0.0.4 #

  • Formatting fixed

0.0.3 #

  • Packages updated to ensure null-safety

0.0.2 #

  • Added better exceptions
  • Added a Parameter annotation which can be used to override the name that is used for resolving a parameter.

0.0.1 #

  • Initial version.
8
likes
160
pub points
66%
popularity

Publisher

verified publishermintware.de

A lightweight and easy to use dependency injection provider builder for dart.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, build, build_runner_core, code_builder, dart_style, glob, path

More

Packages that depend on catalyst_builder