Releases: eemeli/yaml
Releases · eemeli/yaml
v1.7.0
New Features
- Add optional id, customTags arguments to Document#setSchema()
- Keep explicit keys with block scalar values as such
- Add simpleKeys option (#122)
Improved Errors & Warnings
- Add more context to pretty error messages
- Improve error for missing flow collection terminator char
- Use offset when prettifying flow collection character errors
- Add warning when stringifying map/seq-valued keys for JS Object
- Use process.emitWarning rather than console.warn in YAML.parse if possible
Bugfixes
v1.6.0
v1.5.1
v1.5.0
New Features
- Refactor exports (#99, #107)
- In addition to main export, use only
yaml/parse-cst
,yaml/types
andyaml/util
- Drop public export of custom tag objects
- Rename
tags
option ascustomTags
, and allow/prefer string identifiers for built-in custom tags - Add warnings to deprecated endpoints (set
_YAML_SILENCE_DEPRECATION_WARNINGS
to disable) - Drop babel-plugin-add-module-exports, using instead custom untranspiled CommonJS files for public exports
- In addition to main export, use only
- Add protection for exponential entity expansion attacks, such as Billion laughs and quadratic expansion attacks (#104)
- Add
maxAliasCount
option, defaulting to max 100 aliases for any anchor - For Object, stringify mapping key as YAML rather than JSON
- Add
- Simplify custom tag creation
- Add default stringifier
(item, ...) => item.toString(...)
for collections - Add
Schema#createPair(key, value, ctx)
; dropcreate{Map,Seq}
exports - Improve & expand documentation on custom tags
- Add default stringifier
- Preserve float formatting when parsed to Document (#97)
- Add optional
minFractionDigits
property to numbers - Add
EXP
format handling for float numbers - Allow scalar resolvers to return a Scalar instance
- Add optional
- Add
prettyErrors
option, which makes errors prettier and drops theirsource
reference (#96) - Add common ancestor
YAMLError
for error classes - Reorganise files, e.g. separating
tags/
fromschema/
and addingconstants.js
Bugfixes
- Tag presence in AST node now corresponds to explicit tags in YAML source (#97)
- Add
Pair#addToJSMap(ctx, map)
, fixing merge of anchor seq withmapAsMap: true
v1.4.0
New Features
- Add
@babel/runtime
as a dependency for use via "browser" (#83) - Support circular objects, representing circular references using YAML alias nodes when encountered during
YAML.stringify()
(#84) - Deprecate the
class
attribute of tags, replacing it with the more genericidentify(value)
(#86) - Turn the string stringifier into a generic scalar stringifier, fallback to it by default, and export it as
stringify()
fromyaml/schema
(#86) - Add yaml-playground as a git submodule, extending ESLint rules
- Add start script, providing an interactive node env with
YAML
defined
Bugfixes
v1.3.2
v1.3.1
v1.3.0
New Features
- Add
context.root
andrangeAsLinePos
to CST nodes (#67, #68) - Add collection accessor methods (#74)
- New methods: add/delete/get/has/set and addIn/deleteIn/getIn/hasIn/setIn
- Available on all collections as well as documents containing a collection
- Include a separate browser build in the release (#73)
- Used by Webpack, Rollup, etc. via the
"browser"
value in package.json - Uses a Browserslist config of
> 0.5%, not dead
to (currently) support at least IE 11 - Has a dependency on
@babel/runtime
that is not included in the package.json dependencies
- Used by Webpack, Rollup, etc. via the
- Optimise the Node.js release to leave out unnecessary polyfills (87beb89)
- Run CI tests on latest, LTS & 6.0.0 versions of Node.js (#70, #73)
- Move & reorganise test files under
tests/
(12876df) - Add
.editorconfig
(#69)
Bugfixes
v1.2.1
v1.2.0
New Features
- Support blank lines (#64)
- Add
BLANK_LINE
nodes to the CST - Add a boolean property
spaceBefore
for all AST nodes - cst: Assign comments & blank lines at end of collection to parent unless sufficiently indented
- Always separate document comments from the rest by a blank line
- Add
- Add missing YAML 1.1 collections:
!!omap
,!!pairs
, and!!set
(#65) - Add
tag
argument forcreateNode()
, along with its refactored schema-specific implementation (29f399b) - Add optional
createNode
andnodeClass
properties to tag objects (bcb8d9c, 3ae63bc) - Add property based tests using fast-check, thanks to @dubzzz (#62)
Bugfixes
- Fix parsing of minimal strings: '', '-', '?', ':' (#61)
- Revert earlier fix for #48, which is now properly handled thanks to the fix for #57 (#59)
- cst/ParseContext: Stop advancing node.range.end past newline (08571ff)
- cst/PlainValue: Limit
valueRange.end
to actual value end (0001333) - cst: Stop breaking the spec by allowing tab indents for map values (572f540)
- Stop aliasing Pair comment to the comment of its value (9b49ddb, 6d3cb36):
key: # this is now a pair comment value
- Render maps with all null values as
? a\n? b\n
or{ a, b }
(40b7a2a)