Yamlpath

Latest version: v3.8.2

Safety actively analyzes 682457 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 9

1.2.2

Enhancements:
* Array element selection can now be specified by either the usual [] notation
or a bare integer. Thus, the following are all identical:
array[1]
array.1
/array/1

1.2.1

Enhancements:
* Some exception/error messages have been updated to print the entire original
-- albeit parsed -- YAML Path in addition to the present segment under
evaluation.

Bug Fixes:
* yaml-get version 1.0.2 now converts new-lines into "\n" character sequences
when writing output so that multi-line values remain one-result-per-line.
* Use of escape symbols for unusual characters (where demarcation would usually
be more intuitive) is now preserved. Thus, these two search phrases are now
identical:
array[.%" can't "]
array[.%\ can\'t\ ]
* The issue preventing some YAML Paths from being printable after parsing has
been fixed. Valid, parsed YAML Paths now correctly print into a re-parsable
form even with weird sequences and escapes. Note that superfluous whitespace
and other symbols are still removed or escaped when the YAML Path is printed,
so:
term [ key == "Superfluous spaces aren\'t kept." ]
correctly parses and prints as:
term[key=Superfluous\ spaces\ aren\'t\ kept.]

1.2.0

Enhancements:
* A new search operator, :, now enables capturing slices of Arrays (by 0-based
element number) and Hashes (by alphanumeric key-name). This looks like:
"some::array[2:15]" or "some::hash[beta:gamma]".
* yaml-get now returns JSON instead of "pretty Python" data objects when the
search returns complex data types (Arrays and Hashes). This change makes the
result more portable to non-Python consumers and ensures the result will be
one per line.
* The separator used for identifying Hash sub-keys can now be customized. If
you prefer your paths to look like "/hash/sub/key" rather than "hash.sub.key",
you can now have it your way. For now, only . and / are allowed. The
separator can be either strictly specified or automatically inferred by
whether the first character of a given YAML Path is /. Command-line tools
like yaml-get and yaml-set have a new --pathsep argument for this; the default
is "auto" and can be set to "fslash" (/) or "dot" (.).

Bug Fixes:
* EYAML on Windows now works when a batch file is used to wrap the Ruby `eyaml`
command.

Known Issues:
* Escape symbols in YAML Paths parse correctly and will be properly processed,
resulting in retriving or setting the expected data. However, the parsed
path cannot be stringified back to its original form (with escape symbols).
This issue affects only logging/printing of the post-parsed path. A unit test
has been created to track this issue, but it is marked xfail until such time
as someone is willing to tackle this (very) low priority issue. Until then,
developers should try to print the pre-parsed version of their paths rather
than rely exclusively on Parser.str_path(). Further, don't do this:
1. Accept or take a string path that has escaped characters.
2. Parse that path.
3. Stringify the parsed path.
4. Parse the stringified, parsed path. This is silly, anyway because you
already have the first (good) parsed result at step 2.
5. Try to use this parsed-stringified-parsed path result for anything.
Instead, only use the first parsed result that you got at step 2.

1.1.2

Bug fixes:
* When the YAML Path is fully quoted -- a known side-effect of using Jenkins and
trying to responsibly quote any part of an argument to a shell command -- the
visual feedback failed to show the user that the parsed version of the YAML
Path was (correctly) treated as one whole KEY. While this is not what most
users should expect, it is correct because YAML Path cannot safely make any
assumptions as to whether the quoting was deliberate or unintentional. Now,
the stringified version of affected YAML Paths very clearly injects escape
symbols for otherwise intentional special symbols, clearly alerting the user
that a probable issue is afoot.
* When instructed to `--save` old values, the yaml-set binary was saving only
decrypted versions of the original values. It now preserves the original
encrypted form while still performing other requested or necessary tests
against the decrypted value.

1.1.1

Bug fixes:
* The . search operand was limited to only Hash key-names; it now also enables
searching Array elements.

1.1.0

Added support for Regular Expressions as a search mechanism against Hash keys
and values. Also increased unit test coverage and fixed some bugs in that
effort.

Page 8 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.