Skip to content

Commit

Permalink
Bump version 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spideythewebhead committed May 18, 2024
1 parent 520abf3 commit 5370a57
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/file_generation_mode/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ packages:
path: "../../package"
relative: true
source: path
version: "1.3.0"
version: "1.4.0"
file:
dependency: transitive
description:
Expand Down
7 changes: 7 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 1.4.0

- Remove nullable type in operator == [(issue #372)](https://github.com/spideythewebhead/data_class_plugin/issues/372)
- Correctly annotate with @override toJson in data and union classes [(issue #375)](https://github.com/spideythewebhead/data_class_plugin/issues/375)
- Add option not to automatically delete code that contradicts with annotation values [(issue #377)](https://github.com/spideythewebhead/data_class_plugin/issues/377)
- "toJson" for unions now includes the "unionJsonKey" if available [(issue #379)](https://github.com/spideythewebhead/data_class_plugin/issues/379)

## 1.3.0

- Bump tachyon version [(issue #367)](https://github.com/spideythewebhead/data_class_plugin/issues/367)
Expand Down
23 changes: 23 additions & 0 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,26 @@ To create a custom configuration you need to add a file named `data_class_plugin

#### Available options

1. auto_delete_code_from_annotation

To automatically remove code which can be generated by an action in the source file
if the annotation value and the code are in matching.

Based on this example :

```dart
@DataClass(toJson: false)
class User {
Map<String, dynamic> toJson() {
// ...
}
}
```

When `auto_delete_code_from_annotation` is `true` => `toJson` will be removed because is set as `false` in the `@DataClass`.

When `auto_delete_code_from_annotation` is `false` => `toJson` will be kept as it is even when `toJson` is set as `false` in the `@DataClass`. This allows to create custom `fromJson/toJson` implementations.

1. `json`

Set the default naming convention for json keys.
Expand All @@ -298,6 +318,9 @@ To create a custom configuration you need to add a file named `data_class_plugin
#### Configuration supported values

```yaml
# To automatically remove code generated from an annotation or code that can be generated by an annotation action. (commonly fromJson / toJson)
auto_delete_code_from_annotation: true | false
json:
# Default naming convention for json keys
key_name_convention: camel_case (default) | snake_case | kebab_case | pascal_case
Expand Down
2 changes: 1 addition & 1 deletion package/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: data_class_plugin
version: 1.3.0
version: 1.4.0
description: A tool that uses Dart's Analyzer to generate code on-the-fly.

homepage: https://github.com/spideythewebhead/dart_data_class_plugin
Expand Down
2 changes: 1 addition & 1 deletion package/tools/analyzer_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ environment:
sdk: ">=3.1.0 <4.0.0"

dependencies:
data_class_plugin: ^1.3.0
data_class_plugin: ^1.4.0

0 comments on commit 5370a57

Please sign in to comment.