View Source Changelog
All notable changes to this project will be documented in this file.
0.3.0 - 2022-02-15
- [Plugin] Add the
field/4callback with an additional
envargument. This is the same as
field/3but gives access to the environment of the field definition.
- [Plugin] Deprecate the
field/3callback in favour of
field/4. You should migrate to
field/4, simply by adding
_envas the last argument in your implementation. Currently, if a plugin implements
field/4is derived from it and a compilation warning is emitted.
field/3will be removed in TypedStruct 1.0.0.
- Drop support for unsupported Elixir versions in the tests and CI. The library may still be compatible, but this is not tested.
- Fix the lexical scope of the
typestructblock, so it covers it completely. Previously, anything defined inside the
typedstructblock, such as aliases, would not be available for the field definitions. See #22 and #21 for details.
- Fix a typo in the documentation.
0.2.1 - 2020-07-19
- Add the
module: ModuleNametop-level option to create the typed struct in a submodule.
- Update the
@typedocexample in the documentation to put it inside the
typedstructblock and not above. While putting it above works in the general case, it is mandatory to put it inside the block when defining a submodule.
0.2.0 - 2020-05-31
- Add a plugin API.
- Remove reflection support through the
__types__/0function which where defined by TypedStruct in the user modules. If you rely on these functions, please use the TypedStructLegacyReflection plugin to enable them again, and consider creating a plugin for your needs.
- Do not enforce fields with a default value set to nil (fixes #14).
- Prefix all internal module attributes and clean them after use (fixes #15).
- Create a scope in the
typedstructblock to avoid import leaks.
0.1.4 - 2018-11-13
- Add the ability to generate an opaque type (#10).
0.1.3 - 2018-09-06
- Fix a bug where boolean fields with
default: falsewhere still enforced when setting
enforce: trueat top-level.
0.1.2 - 2018-09-06
- Add the ability to enforce keys by default (#6).
- Clarify the documentation about
0.1.1 - 2018-06-20
- Do not make the type nullable when there is a default value.
0.1.0 - 2018-06-19
- Struct definition
- Type definition
- Default values
- Enforced keys