Skip to content

Releases: gmpassos/reflection_factory

v2.0.2

19 Feb 23:18
f62472c
Compare
Choose a tag to compare
Merge v2.0.2



- `ClassReflection`:
  - `getBestConstructorsFor`, `createInstanceWithBestConstructor`, `getBestConstructorForMap`, `getBestConstructorsForMap`:
    - Added parameter `allowOptionalOnlyConstructors`.
  - `createInstanceFromMap`:
    - Improved constructor resolution. 
- `EnableReflection`, `ReflectionBridge`:
  - Added parameter `optimizeReflectionInstances = true`:
    - If `true` all generated `ClassReflection` and `EnumReflection` will have a `factory` constructor and
      an `Expando` to cache reflection instances.
- `FunctionReflection`:
  - `methodInvocationFromMap`: optimize and clean code.
- Added annotation `JsonConstructor`.

v2.0.1

14 Feb 23:56
ea0554f
Compare
Choose a tag to compare
Merge v2.0.1

- `ClassReflection.createInstanceWithBestConstructor`:
  - Now throws `UnresolvedParameterError` instead of `StateError` for unresolved parameters.
- analyzer: ^5.5.0
- test: ^1.23.1
- coverage: ^1.6.3

v2.0.0

06 Feb 19:06
f60a6a2
Compare
Choose a tag to compare
Merge v2.0.0


- `ClassReflection`:
  - `constructor`:
    - removed `<R>` type.
  - `field`:
    - Ggenerated implementation declares `T` of `FieldReflection<$class,T>` statically.
  - Optimized:
    - `allFields`, `allMethods`: object instances derived from cached `no-object` instances.
    - `construtor`, `staticField`, `field`, `method`:
      - Caching instances.
      - Object instances derived from cached `no-object` instances.
- `FieldReflection`:
  - Added `setNullable`.
- benchmark: ^0.3.0
  - `benchmark/reflection_factory_benchmark.dart`
- meta: ^1.9.0

v1.2.23

23 Jan 08:21
152beec
Compare
Choose a tag to compare
Merge v1.2.23

- `ReflectionBuilder`
  - New `sequencial` and `buildStepTimeout`.
  - Build now is sequencial by default:
    - Only one `BuildStep` is processed at a time.
    - Avoid `InconsistentAnalysisException` (`build` issue #2689).
- Added `build.yaml` options (`verbose`,`sequential`, `timeout`).
- Improved logging.
- Added `ClassProxy` test using `libraryPath`.
- `reflection_factory/build.yaml`:
  - `generate_for`:
    - Added `bin/*`

v1.2.21

05 Jan 05:52
5434937
Compare
Choose a tag to compare
Merge v1.2.21

- `ClassReflection`:
  - Fix generated `supperTypes`.

v1.2.20

05 Jan 04:51
eea93b4
Compare
Choose a tag to compare
Merge v1.2.20

- Migrate to `analyzer: ^5.4.0`.
- analyzer: ^5.4.0

v1.2.19

05 Jan 02:47
a3f41d7
Compare
Choose a tag to compare
Merge v1.2.19

- `TypeInfo`:
  - Added `isPrimitiveOrDynamicOrObjectType` and `isEntityType`.
- Fix `castMapType` for `Map<String,dynamic>`.

v1.2.18

04 Jan 21:22
3c14474
Compare
Choose a tag to compare
Merge v1.2.18

- `Reflection`:
  - Fix `castMap`:
  - Added `castMapKeys` and `castMapValues`.
  - Added getters: `asTypeReflection`, `typeInfo`, `listType`, `mapKeyType` and `mapValueType`.
- `JsonCodec`:
  - Added field `mapCaster`.
- `_JsonDecoder`:
  - Now supports `Map` casting when decoding an entity field.
- Added `castMapType`.
- `ReflectionBuilder`:
  - Optimize and reduce generated code.
- build: ^2.3.1
- analyzer: ^4.7.0
- dart_style: ^2.2.4
- mime: ^1.0.3
- pub_semver: ^2.1.3
- path: ^1.8.3
- build_runner: ^2.3.3
- lints: ^2.0.1
- test: ^1.22.1
- coverage: ^1.6.1

v1.2.17

01 Oct 22:36
Compare
Choose a tag to compare
- `FunctionReflection.parametersNamesWhere`:
  - Added parameter `nameResolver`.
- `ClassReflection.getBestConstructorsFor`:
  - Improve parameter/field JSON name alias (`JsonFieldAlias`) resolution.

v1.2.16

01 Oct 06:24
Compare
Choose a tag to compare
- `ClassReflection`:
  - Added `fieldsWithJsonFieldHidden`, `fieldsWithJsonFieldVisible`, `hasJsonFieldHidden` and `hasJsonFieldVisible`.
  - Added `entityFields` and `entityFieldsNamesWhere`.
  - Added `getBestConstructorsFor`.
  - `getBestConstructorFor`: using multiple contructor candidates.