Skip to content

Commit

Permalink
Prepare release 7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Aubry committed Sep 28, 2019
1 parent a792b3f commit eee32fd
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 30 deletions.
79 changes: 49 additions & 30 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
# Release notes
## Release 6.1.2

Improves conformance with the official test suite:

* [W4TN](https://github.com/yaml/yaml-test-suite/tree/data/W4TN) (Spec Example 9.5. Directives Documents)
* [2LFX](https://github.com/yaml/yaml-test-suite/tree/data/2LFX) (Spec Example 6.13. Reserved Directives [1.3])
* [6LVF](https://github.com/yaml/yaml-test-suite/tree/data/6LVF) (Spec Example 6.13. Reserved Directives)
* [S3PD](https://github.com/yaml/yaml-test-suite/tree/data/S3PD) (Spec Example 8.18. Implicit Block Mapping Entries)
* [NHX8](https://github.com/yaml/yaml-test-suite/tree/data/NHX8) (Empty Lines at End of Document)
* [2JQS](https://github.com/yaml/yaml-test-suite/tree/data/2JQS) (Block Mapping with Missing Keys)
* [M7A3](https://github.com/yaml/yaml-test-suite/tree/data/M7A3) (Spec Example 9.3. Bare Documents)
* [WZ62](https://github.com/yaml/yaml-test-suite/tree/data/WZ62) (Spec Example 7.2. Empty Content)
* [52DL](https://github.com/yaml/yaml-test-suite/tree/data/52DL) (Explicit Non-Specific Tag [1.3])
* [S4JQ](https://github.com/yaml/yaml-test-suite/tree/data/S4JQ) (Spec Example 6.28. Non-Specific Tags)
* [8MK2](https://github.com/yaml/yaml-test-suite/tree/data/8MK2) (Explicit Non-Specific Tag)
* [R4YG](https://github.com/yaml/yaml-test-suite/tree/data/R4YG) (Spec Example 8.2. Block Indentation Indicator)
* [6BCT](https://github.com/yaml/yaml-test-suite/tree/data/6BCT) (Spec Example 6.3. Separation Spaces)
* [A2M4](https://github.com/yaml/yaml-test-suite/tree/data/A2M4) (Spec Example 6.2. Indentation Indicators)
* [Q5MG](https://github.com/yaml/yaml-test-suite/tree/data/Q5MG) (Tab at beginning of line followed by a flow mapping)
* [S7BG](https://github.com/yaml/yaml-test-suite/tree/data/S7BG) (Colon followed by comma)
* [DK3J](https://github.com/yaml/yaml-test-suite/tree/data/DK3J) (Zero indented block scalar with line that looks like a comment)
* [FP8R](https://github.com/yaml/yaml-test-suite/tree/data/FP8R) (Zero indented block scalar)
* [4MUZ](https://github.com/yaml/yaml-test-suite/tree/data/4MUZ) (Flow mapping colon on line after key)
* [NJ66](https://github.com/yaml/yaml-test-suite/tree/data/NJ66) (Multiline plain flow mapping key)
* [UT92](https://github.com/yaml/yaml-test-suite/tree/data/UT92) (Spec Example 9.4. Explicit Documents)
* [9SA2](https://github.com/yaml/yaml-test-suite/tree/data/9SA2) (Multiline double quoted flow mapping key)
* [K3WX](https://github.com/yaml/yaml-test-suite/tree/data/K3WX) (Colon and adjacent value after comment on next line)
* [5MUD](https://github.com/yaml/yaml-test-suite/tree/data/5MUD) (Colon and adjacent value on next line)

Also adds the license file to nupkg to fix NU5125 warning.
## Release 7.0.0

Added support for **nullable references** and **netstandard 2.1**.

Enabling nullable references exposed many potential bugs where the code assumed
that a reference would not be null, but where it was possible for it to be null.
In most cases this did not cause an error because of the way the code was being used.

Because fixing these problems required some breaking changes, a few improvements were made to the code base to take advantage of modern C# constructs.

Overall, the following **breaking changes** were made:

- **Removed the default constructor from most exceptions**, because that would cause some uninitialized properties.

- Made the **`ParsingEvent` concretizations sealed**. There is no point in inheriting from these because the library assumes that they form a closed set.

- **Made many classes sealed**, since they are not intended to be extended.

- **`YamlDocument` now throws an exception** if is has no root node after loading. This should only happen when loading from an `IParser` that returns invalid data or is in an invalid state.

The following APIs were made **obsolete** (but still work as before):

- Refactored the **extension methods to `IParser`** to have better names with a more sensible semantic. The previous extension methods, `Expect<T>`, `Allow<T>`, `Peek<T>` and `Accept<T>` are still available but have been deprecated. The new extension methods are:

- `T Consume<T>() where T : ParsingEvent`
Ensures that the current event is of the specified type, returns it and moves to the next event. Throws an exception if the next event is not of the expected type.

- `bool TryConsume<T>(out T @event) where T : ParsingEvent`
If the event is of the specified type, returns it and moves to the next event, otherwise returns null.

- `T Require<T>() where T : ParsingEvent`
Enforces that the current event is of the specified type.

- `bool Accept<T>(out T @event) where T : ParsingEvent`
Checks whether the current event is of the specified type.

- Made the **constructor of all naming conventions obsolete**. Instead each has a static property named `Instance`. There was no point in creating multiple instances of those classes.
Instead of:
```c#
new SerializerBuilder()
.WithNamingConvention(new CamelCaseNamingConvention());
```
Use:
```c#
new SerializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance);
```


# Previous releases
- [6.1.2](releases/6.1.2.md)
- [6.1.1](releases/6.1.1.md)
- [6.0.0](releases/6.0.0.md)
- [5.4.0](releases/5.4.0.md)
Expand Down
48 changes: 48 additions & 0 deletions releases/7.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Release 7.0.0

Added support for **nullable references** and **netstandard 2.1**.

Enabling nullable references exposed many potential bugs where the code assumed
that a reference would not be null, but where it was possible for it to be null.
In most cases this did not cause an error because of the way the code was being used.

Because fixing these problems required some breaking changes, a few improvements were made to the code base to take advantage of modern C# constructs.

Overall, the following **breaking changes** were made:

- **Removed the default constructor from most exceptions**, because that would cause some uninitialized properties.

- Made the **`ParsingEvent` concretizations sealed**. There is no point in inheriting from these because the library assumes that they form a closed set.

- **Made many classes sealed**, since they are not intended to be extended.

- **`YamlDocument` now throws an exception** if is has no root node after loading. This should only happen when loading from an `IParser` that returns invalid data or is in an invalid state.

The following APIs were made **obsolete** (but still work as before):

- Refactored the **extension methods to `IParser`** to have better names with a more sensible semantic. The previous extension methods, `Expect<T>`, `Allow<T>`, `Peek<T>` and `Accept<T>` are still available but have been deprecated. The new extension methods are:

- `T Consume<T>() where T : ParsingEvent`
Ensures that the current event is of the specified type, returns it and moves to the next event. Throws an exception if the next event is not of the expected type.

- `bool TryConsume<T>(out T @event) where T : ParsingEvent`
If the event is of the specified type, returns it and moves to the next event, otherwise returns null.

- `T Require<T>() where T : ParsingEvent`
Enforces that the current event is of the specified type.

- `bool Accept<T>(out T @event) where T : ParsingEvent`
Checks whether the current event is of the specified type.

- Made the **constructor of all naming conventions obsolete**. Instead each has a static property named `Instance`. There was no point in creating multiple instances of those classes.
Instead of:
```c#
new SerializerBuilder()
.WithNamingConvention(new CamelCaseNamingConvention());
```
Use:
```c#
new SerializerBuilder()
.WithNamingConvention(CamelCaseNamingConvention.Instance);
```

0 comments on commit eee32fd

Please sign in to comment.