xref: /freebsd/contrib/lyaml/NEWS.md (revision 2bc180ef045e5911cce0cea1c2a139cffd2b577a)
1# lyaml NEWS - User visible changes
2
3## Noteworthy changes in release 6.2.8 (2022-10-22) [stable]
4
5### Bug fixes
6
7  - `luke` no longer crashes in `std.normalize` require loops
8    occasionally in Lua 5.4.
9
10  - lyaml emitter no longer leaks at least six bytes for every
11    map, sequence and scalar emitted.
12
13
14## Noteworthy changes in release 6.2.7 (2020-11-27) [stable]
15
16### Bug fixes
17
18  - Don't skip YAML entries from mixed key Lua tables.
19
20
21## Noteworthy changes in release 6.2.6 (2020-08-28) [stable]
22
23### Bug fixes
24
25  - `luke` really propagates `LDFLAGS` to module compilation
26    commands.
27
28
29## Noteworthy changes in release 6.2.5 (2020-04-15) [stable]
30
31### Bug fixes
32
33  - `luke` really propagates `YAML_BINDIR`, `YAML_DIR`,
34    `YAML_INCDIR` and `YAML_LIBDIR` to checksymbol test in lukefile
35    given the change to `external_dependencies` layout in 6.1.2.
36
37
38## Noteworthy changes in release 6.2.4 (2019-07-20) [stable]
39
40### Bug fixes
41
42  - `luke` works with upgraded bootstrap luarocks version of
43    `require`.
44
45
46## Noteworthy changes in release 6.2.3 (2018-09-16) [stable]
47
48### New Features
49
50  - Initial support for Lua 5.4.
51
52
53## Noteworthy changes in release 6.2.2 (2018-03-28) [stable]
54
55### Bug fixes
56
57  - Remove spurious dependency on `std.normalize` and `std._debug`
58    libraries.
59
60
61## Noteworthy changes in release 6.2.1 (2018-02-20) [stable]
62
63### Bug fixes
64
65  - `spec/spec_helper.lua` now looks in the correct objdir
66    for object modules built by luke, instead of adding unused
67    paths from old Autotools objdirs.  So now specl is properly
68    running examples against the not yet installed lyaml objects.
69
70
71## Noteworthy changes in release 6.2 (2017-11-26) [stable]
72
73### Bug fixes
74
75  - `luke` uses the correct spelling of LIBFLAG to match luarocks now.
76
77  - `luke` no longer throws spurious `cp: file exists` errors.
78
79  - `luke` works on luajit again.
80
81
82## Noteworthy changes in release 6.1.3 (2017-05-29) [stable]
83
84### Bug fixes
85
86  - `luke` no longer bombs out with a nil concat error.
87
88
89## Noteworthy changes in release 6.1.2 (2017-04-30) [stable]
90
91### Bug fixes
92
93  - `luke` now propagates `LUA_DIR`, `YAML_INCDIR` and `YAML_LIBDIR`
94    correctly.
95
96
97## Noteworthy changes in release 6.1.1 (2017-01-22) [stable]
98
99### New Features
100
101  - Builds and installs with `luke` instead of Autotools.
102
103
104## Noteworthy changes in release 6.1 (2016-10-08) [stable]
105
106### Bug fixes
107
108  - `lyaml.load` now correctly reads implicit null scalars in a YAML
109    document as an `lyaml.null` reference, identical to the "~"
110    shorthand syntax, according to [the specification][nullspec].
111
112    ```yaml
113    empty:
114    canonical: ~
115    english: null
116    ~: null key
117    ```
118
119
120## Noteworthy changes in release 6.0 (2015-07-27) [stable]
121
122### New Features
123
124  - `lyaml.load` now correctly reads a !!bool tagged scalar from a
125    YAML document, or an implicit bool value, according to
126    [the specification][boolspec].
127
128    ```yaml
129    %TAG ! tag:yaml.org,2002:
130    ---
131    truthy:
132      - !bool Y
133      - !bool y
134      - !bool True
135      - !bool "on"
136    falsey:
137      - !bool n
138      - !bool OFF
139      - !bool garbage
140    ```
141
142  - `lyaml.load` now correctly reads a !!float tagged scalar from a
143    YAML document, or an implicit float value, according to
144    [the specification][floatspec].
145
146  - `lyaml.load` now correctly reads a !!int tagged scalar from a
147    YAML document, or an implicit integer value, according to
148    [the specification][intspec].
149
150  - `lyaml.load` now supports the !!merge key type according to
151    [the specification][mergespec].
152
153    ```yaml
154    - &MERGE { x: 1, y: 2 }
155    - &OVERRIDE { x: 0, z: 1 }
156    -
157      << : [&MERGE, &OVERRIDE]
158      z: 3
159    ```
160
161    The anchored tables remain in the document too, so this results in
162    the following Lua table:
163
164    ```lua
165    {                           -- START_STREAM
166      {                         -- START_DOCUMENT
167        { x = 1, y = 2 },       -- MERGE
168        { x = 0, z = 1 },       -- OVERRIDE
169        { x = 1, y = 2, z = 3}, -- <<<
170      }                         -- END_DOCUMENT
171    }                           -- END_STREAM
172    ```
173
174### Bug fixes
175
176  - Multi-line strings were previously being dumped using single quotes
177    which caused the dumped YAML to break.
178
179    For example, { foo = "a\nmultiline\nstring" } would get dumped as:
180
181    ```yaml
182    foo: 'a
183
184    multiline
185
186    string'
187    ```
188
189    Note the extra line-breaks in between each line. This also causes
190    YAML parsing to fail (since the blank lines didn't have the expected
191    indentation).
192
193    This patch fixes the dump to use the YAML literal syntax for any
194    multi-line strings so the same example gets dumped as:
195
196    ```yaml
197    foo: |-
198      a
199      multiline
200      string
201    ```
202
203  - `lyaml.load` now correctly reads the !!null tag in a YAML
204    document as an `lyaml.null` reference, identical to the "~"
205    shorthand syntax, according to [the specification][nullspec].
206
207### Incompatible Changes
208
209  - `lyaml.load` now takes a table of options as an optional second
210    argument, not a simple boolean to determine whether all documents
211    should be returned from the stream.  For now, a `true` second
212    argument will be converted to the modern equivalent:
213
214    ```lua
215    lyaml.load (document, { all = true })
216    ```
217
218  - `lyaml.dump` now takes a table of options as an optional second
219    argument, not an initial table of anchors.  For now, a second
220    argument without any new API keys will be converted to the modern
221    equivalent:
222
223    ```lua
224    lyaml.dump (t, { anchors = arg2 })
225    ```
226
227[boolspec]:  http://yaml.org/type/bool.html
228[floatspec]: http://yaml.org/type/float.html
229[intspec]:   http://yaml.org/type/int.html
230[mergespec]: http://yaml.org/type/merge.html
231[nullspec]:  http://yaml.org/type/null.html
232
233
234## Noteworthy changes in release 5.1.4 (2015-01-01) [stable]
235
236  - This release is functionally identical to the last.
237
238
239## Noteworthy changes in release 5.1.3 (2015-01-01) [stable]
240
241  - This release is functionally identical to the last.
242
243
244## Noteworthy changes in release 5.1.2 (2014-12-27) [stable]
245
246### Bugs Fixed
247
248  - No more spurious .travis.yml is out of date warnings during
249    `luarocks install lyaml`.
250
251
252## Noteworthy changes in release 5.1.1 (2014-12-19) [stable]
253
254### Bugs Fixed
255
256  - When using `sudo make install` instead of LuaRocks, `lyaml.so`
257    is now correctly installed to `$luaexecdir`.
258
259
260## Noteworthy changes in release 5.1.0 (2014-12-17) [stable]
261
262### New Features
263
264  - Lua 5.3.0 compatibility.
265
266
267## Noteworthy changes in release 5 (2014-09-25) [beta]
268
269### Build
270
271  - Significantly reduced pointer mismatch warnings from modern GNU
272    compilers.
273
274### New Features
275
276  - `lyaml.dump` now takes a second argument containing a table of
277    potential anchor values in `ANCHOR_NAME = { "match", "elements" }`
278    pairs format.  The first time any are matched in the table being
279    dumped, they are preceded by `&ANCHOR_NAME` in the output YAML
280    document; subsequent matches are not written out in full, but
281    shortened to the appropriate `*ANCHOR_NAME` alias.
282
283### Bugs Fixed
284
285  - `yaml.emitter` no longer emits numbers in SINGLE_QUOTE style by
286    default.
287
288  - `yaml.emitter ().emit` returns error strings correctly for invalid
289    STREAM_START encoding, and MAPPING_START, SEQUENCE_START & SCALAR
290    style fields.
291
292
293## Noteworthy changes in release 4 (2013-09-11) [beta]
294
295### New Features
296
297  - New yaml.emitter API returns an object with an emit method for
298    adding events using yaml_*_event_initialize() calls.
299
300  - New yaml.parser API returns a Lua iterator that fetches the next
301    event using yaml_parser_parse().
302
303  - New yaml.scanner API returns a Lua iterator that fetches the next
304    token using yaml_parser_scan().
305
306  - Beginnings of Specl specs, starting with a reasonably comprehensive
307    specifications for the new APIs above.
308
309  - C implementation of lyaml.dump has moved to Lua implementation as
310    yaml.dump.
311
312  - C implementation of lyaml.load has moved to Lua implementation as
313    yaml.load.
314
315  - The new Lua implementation of lyaml.load () handles multi-document
316    streams, and returns a table of documents when the new second
317    argument is `true`.
318
319
320## Noteworthy changes in release 3 (2013-04-27) [beta]
321
322  - This release is functionally identical to the last.
323
324### New Features
325
326  - lyaml builds are now made against Lua 5.1, Lua 5.2 and luajit 2.0.0
327    automatically, with every commit.
328
329  - move to a cleaner, automated release system.
330
331
332## Noteworthy changes in release 2 (2013-03-18) [beta]
333
334  - This release is functionally identical to the last.
335
336  - Use correct MIT license attribution, relicensing build files to match
337    Andrew Danforth''s MIT licensed lyaml.c too.
338
339
340## Noteworthy changes in release 1 (2013-03-17) [beta]
341
342### New Features
343
344  - A binding for libYAML, by Andrew Danforth:  Updated for Lua 5.1 and
345    5.2, and packaged as a luarock.
346
347  - I spun this out of Specl (http://github.com/gvvaughan/specl) so that
348    other projects may use it, and to simplify the Specl build.
349
350### Known Issues
351
352  - There's not really any documentation, sorry.  Contributions welcome!
353