Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency YamlDotNet to v11 #176

Merged
merged 1 commit into from
Apr 12, 2022
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 12, 2022

WhiteSource Renovate

This PR contains the following updates:

Package Type Update Change
YamlDotNet nuget major 6.1.2 -> 11.2.1

Release Notes

aaubry/YamlDotNet

v11.2.1

v11.2.0

New features

  • #​613 Fix dates not round-tripping correctly in all cases.
  • #​608 Allow omitting empty collections via DefaultValuesHandling.

v11.1.1

Bugfixes

  • #​600 Fix nullable enum roundtrip (fixes #​544)
    There was a problem deserializing nullable enums that was introduced with release 9.1.0.

v11.1.0

New features

  • #​604 Support for deserialization of interface types (Fixes #​601)
    This allows to register a concrete class for a given interface. When deserializing a value of that interface type, the concrete class will be deserialized instead.
    var sut = new DeserializerBuilder()
        .WithNamingConvention(CamelCaseNamingConvention.Instance)
        .WithTypeMapping<ICar, Car>()
        .WithTypeMapping<IModelSpec, ModelSpec>()
        .Build();
    Check this test for a more complete example

Other fixes

  • #​603 Fix nullable annotation of TagName implicit converter.
  • #​602 Fix nullable annotations for AnchorName implicit converter.

v11.0.1

Bugfixes

  • #​596 Merge sequence of anchors in reverse order (fixes #​594)
    When merging sequences, the order was incorrect.
    This is a breaking change. If you relied on the previous behaviour, you will need to adapt your code.

  • #​563 Fix imutable pattern in EmitterSettings.SkipAnchorName.

v10.1.0

  • #​584 Add support for adding comments to properties.
    The YamlMember attribute now has a Description property. When set, a comment is emitted when serializing that property:
    class Person
    {
        public string Name { get; set; }
    
        [YamlMember(Description = "This is the age")]
        public int Age { get; set; }
    
        [YamlMember(Description = "male or female")]
        public string Sex { get; set; }
    }
    Name: PandaTea

This is the age

Age: 100

male or female

Sex: male

v10.0.0

New features

  • #​592 adds the ability specify additional indentation for lists. By default, the emitter emits:
    list:
    - item1
    - item2
    By using this option, the emitter will output:
    list:
    - item1
    - item2

Bug fixes

  • #​598 Fixed AnchorNotFoundException if there is a reference to an anchor of a node which is being deserialized. This happens in cyclic references.

Other changes

  • Breaking - Binary serialization support has been removed as there was no practical use-case for it.

  • Refactor Portability.cs into conditionally included files to improve maintainability.
    There is now a set of directories under YamlDotNet/Helpers/Portability. Each directory's name contains a list of target platforms, separated by +. Each of those files is included only when building for one of those target platforms. Each directory may also contain a subsirectory named others. The files in this directory are included only when building for one target platform that is not in it's parent name.

  • Make the type Nothing a ValueType
    There's no need for it to be a reference type.

  • Use a custom type to represent anchor names
    This enables the compiler to detect when we pass something else
    where an anchor name is expected.

  • Use a custom type to represent tag names
    This enables the compiler to detect when we pass something else
    where a tag name is expected.

  • Release notes are no longer stored in the repository, because this forced a new meaningless commit to be created for each release.

v9.1.4

  • Fix LookAheadBuffer trying to read from the stream after reaching its end

v9.1.3

  • Fix an error when a stream returns less than the requested amount of bytes
    Fixes #​560

v9.1.2

  • Fix writePtr decrementation in InsertionQueue [#​558]

This fixes another critical bug that was causing failures while parsing Yaml documents. If you are using release 9.1.1, please use this version instead.

v9.1.1

  • Fix off by one error when resizing InsertionQueue

This fixes a critical bug that was causing failures while parsing Yaml documents. If you are using release 9.1.0, please use this version instead.

v9.1.0

Improvements

  • Small performance improvements. Addresses [#​519]
  • [#​490] Add anchor/alias support in JsonEventEmitter
  • [#​540] Allow block style in multiline scalars with trailing spaces
  • [#​482] Add support for private properties in the serializer.

Bugfixes

  • Fix KeyNotFoundException in WithoutTypeInspector (fixes [#​507])
  • [#​539] Fix deserialization for Nullable types.
  • [#​491] Disallow usage of alias before anchor declaration
  • [#​542] Fix the order of YamlMappingNode items
    YamlMappingNode will now return the items in the order they appear inside the document.

v8.1.2

Bug fixes

  • Merge #​483 - Allow values after DocumentStart token
  • Merge #​497 - Fix indentation check for first content line - fixes #​492

v8.1.1

Bug fixes

  • Improve compliance with the official YAML test suite: #​467, #​469 and #​475.

  • Make YamlMemberAttribute.DefaultValuesHandling actually usable. Fixes #​466.

  • Actually inherit YamlIgnore attributes: #​481.

New features

  • Add LowerCaseNamingConvention: #​477.

v8.1.0

New features and improvements

  • Made CachedTypeInspector thread safe #​386
    Previously, using an instance of Serializer or Deserializer was not thread-safe,
    although the intention was for them to be thread safe. The only mutable state is
    inside CachedTypeInspector and was not properly protected against concurrent mutation.

Other fixes

  • Fix type conflicts when targeting frameworks without nullability attributes #​460

v8.0.0

New features and improvements

  • Change the default value handling behavior. Fixes #​427
    This is a breaking change to the default behaviour of the serializer, which will now always emit null and default values.
    It is possible to configure this behaviour by using the ConfigureDefaultValuesHandling method on SerializerBuilder.

    More details are available in the documentation.

  • Add default implementations for the following non-generic collections to DefaultObjectFactory:

    • IEnumerable
    • ICollection
    • IList
    • IDictionary
  • Remove obsolete and unused SerializationOptions enum. Fixes #​438

  • Throw descriptive exceptions when using the "linq" methods of YamlNode. Relates to #​437

Bug fixes

  • Never emit document end indicator on stream end. Fixes #​436
  • Fix exception when deserializing an interface. Fixes #​439

v7.0.0

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 @&#8203;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 @&#8203;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:

    new SerializerBuilder()
        .WithNamingConvention(new CamelCaseNamingConvention());

    Use:

    new SerializerBuilder()
        .WithNamingConvention(CamelCaseNamingConvention.Instance);

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/yamldotnet-11.x branch from 73772db to edc545f Compare April 12, 2022 12:13
@Ahoo-Wang Ahoo-Wang merged commit 3f94374 into master Apr 12, 2022
@renovate renovate bot deleted the renovate/yamldotnet-11.x branch April 12, 2022 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants