fix(deps): update dependency me.carleslc.simple-yaml:simple-yaml to v1.8.3 #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.7.2→1.8.3Release Notes
Carleslc/Simple-YAML (me.carleslc.Simple-YAML:Simple-Yaml)
v1.8.3Compare Source
v1.8.2Compare Source
Updated snakeyaml to 1.32
v1.8.1Compare Source
v1.8Compare Source
The examples have been improved with the new features:
Comment Fixes
#character inside values or side commentsComment Formatting
yamlFile.options().headerFormatter(YamlHeaderFormatter).Now it is possible to format comments using prefixes and suffixes, globally or per comment, taking into account blank lines as comments, with some configurations available for reading comments (for instance stripping the # prefix and stripping trailing or leading blank lines), using an instance of YamlCommentFormatter or a custom format implementing CommentFormatter.
Some formatters are available with the
YamlCommentFormatenum. For instance, the following will add blank lines above of the comments you add on keys with indent 0:The default prefix is
"# "for block comments and" # "for side comments. You can change them to add blank lines above or below the comments, or to add more spaces, # characters or section dividers.Examples:
Changing Quote Style
yamlFile.options().quoteStyleDefaults().You can change the default quote style for all values or for specific value types.
More information here.
List indexing
You can use list indexing to select list values with array notation. This is especially useful if you want to get a single element, set a comment on a specific index or set different comments on list values that are not unique.
Negative indexing is allowed (
list[-1]is the last element).See the example with values and example with comments.
Other features
path(String)method to set comments along with values without repeating the path.\character prefix, for instancegetString("a\.b.c")selectsa\.b->c. In previous versions that would have beena\->b->c. This is for specific scenarios, but if you usually have dots in keys consider changing the path separator to something else like/, in that casegetString("a.b/c")selectsa.b->c.Implementation abstraction
Now the snakeyaml implementation is decoupled from
YamlConfigurationclass.You can access to the implementation if needed with
getImplementation():You can also provide a custom implementation using
yamlFile.setImplementation(YamlImplementation)if you don't want to use snakeyaml.More information here.
@Deprecated
If you were loading a file with
loadConfiguration(Reader)orloadConfiguration(InputStream)those methods have been deprecated. UseloadConfiguration(SupplierIO.Reader)orloadConfiguration(SupplierIO.InputStream)instead:Change
YamlFile.loadConfiguration(new BufferedReader(...))toYamlFile.loadConfiguration(() -> new BufferedReader(...))orYamlFile.loadConfiguration(new FileInputStream(file))toYamlFile.loadConfiguration(() -> new FileInputStream(file)).Previously while loading or saving a file the whole file was stored in a String in memory before parsing or dumping the yaml file. This is acceptable for small to medium configuration files, but now writing the yaml in memory to a StringBuilder is not required, so this is an improvement in memory usage.
Loading a
YamlFilewithloadorloadWithCommentsand saving withsavehave this improvement automatically so you don't have to change anything in that case.v1.7.3Compare Source
yamlFile.options().indentList(int)method to change the indentation of list elements. It is 2 by default.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - 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.
This PR was generated by Mend Renovate. View the repository job log.