forked from json-e/json-e
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGELOG.rst
357 lines (226 loc) · 8.81 KB
/
CHANGELOG.rst
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
Jsone 4.8.0 (2024-10-03)
========================
Features
--------
- Introduces the `$reduce` operator which combines an array or object into a single value. (#531)
- Introduced the `range(..)` function for generating ranges of integers. (#534)
Jsone 4.7.1 (2024-07-05)
========================
Bugfixes
--------
- Removed unnecessary print statement from rust implementation. (slice_print)
Jsone 4.7.0 (2024-02-17)
========================
Features
--------
- WrapFunction has been added to the external interface of the Golang module so
users can inject custom functions into the context. (#523)
- The `$find` operator evaluates an expression for each value of the given array or object, returning
the first value for which the expression evaluates to `true`. If there are no matches the result is
either `null` or if used within an object or array, omitted from the parent object. (#525)
Bugfixes
--------
- Support for Unicode strings has been improved and made consistent across implementations: all indexing and slicing is in terms of codepoints, rather than bytes. (#390)
- Division by zero is now considered an error, since the result is not representible in JSON. (#391)
Jsone 4.6.0 (2023-11-21)
========================
Bugfixes
--------
- For JavaScript, variables added in a `$let` do not persist outside of that `$let` any more. (#473)
- The context is required to be a JSON object in all implementations. (#481)
- Python versions older than 3.8 are no longer tested or supported. Notably, Python 2 is no longer supported. (#486)
Improved Documentation
----------------------
- All of the time-range abbreviations supported by `fromNow` and `$fromNow` are
now documented, and all implementations agree on those abbreviations. (#483)
Jsone 4.5.3 (2023-07-27)
========================
Bugfixes
--------
- Upgraded Rust parser-builder `nom` to major version 7. (#462)
- Fix Rust JSON conversions for floats of small magnitude (#466)
Jsone 4.5.2 (2023-04-10)
========================
Bugfixes
--------
- Fixed a bug that caused some examples in documentation not to be rendered on json-e.js.org (#461)
Jsone 4.5.1 (2023-03-20)
========================
- The Rust crate no longer rebuilds on every invocation. (#460)
Jsone 4.5.0 (2022-12-25)
========================
Features
--------
- Added a $default case to the switch operator (#455)
Jsone 4.4.3 (2021-11-17)
========================
Features
--------
- The JSON-e GitHub repository has been moved to https://github.com/json-e/json-e. (#430)
Bugfixes
--------
- Emit an error on uncalled functions in all implementations. (#158)
- All implementations now enforce that context is an object. This was always the intent, but the JS and Python implementations' validation was not particularly thorough. (#408)
Jsone 4.4.1 (2021-03-12)
========================
No significant changes.
This version updates the release mechanics to include descriptions for each package.
Jsone 4.4.0 (2021-03-12)
========================
Features
--------
- JSON-e is now also available as a Rust crate! (#289)
- Each implementation language is now in its own subdirectory. This change should not affect users of the library. (#401)
Bugfixes
--------
- Syntax errors regarding unexpected identifiers are now phrased more clearly (Python and JS implementations only) (#383)
- JS implementation now throws instances of the correct SyntaxError type (#399)
Jsone 4.3.0 (2020-08-27)
========================
Features
--------
- Introduces `split` to built-in string functions enabling string splitting with a delimiter.
Input and delimiter can either be `string` or `number`. (#368)
- Introduces join to the built-in functions to join lists with a seperator. list items and separator can either be string or number. (#370)
- The Go port now uses GoModules. It should nonetheless remain compatible with earlier versions of Go. (#373)
Jsone 4.2.0 (2020-07-17)
========================
Bugfixes
--------
- The Python implementation no longer causes warnings about invalid escape sequences (#361).
Jsone 4.1.0 (2020-05-29)
========================
Features
--------
- Introduces $switch operator, which behaves like a combination of the $if and $match operator for
more complex boolean logic. It gets an object, in which every key is a string expression(s), where
at most one must evaluate to true and the remaining to false based on the context. The result will be
the value corresponding to the key that were evaluated to true. (#257)
Bugfixes
--------
- Builtin functions are now called with relevant context.
This means that builtins like `fromNow()` and `defined()` respect variables defined via `$let`. (342&343)
- Fix error (constructor.name) when using with Webpack in production mode (#354)
Improved Documentation
----------------------
- The `defined()` builtin is now documented. (#341)
- Tests now include a test case for #354, regarding function evaluation. (#354)
Jsone 4.0.1 (2020-03-11)
========================
Bugfixes
--------
- Revert PR # 330 (fix for issue 158)
Improved Documentation
----------------------
- Update releasing documentation with information on how to release on npm and deploy the web-site (release)
Jsone 4.0.0 (2020-03-04)
===================
Bugfixes
--------
- Added support for the short-circuiting of the boolean logic operators || and &&
Separated parser and interpreter.
Parser build an abstract syntax tree.
Interpreter make tree traversal. (#244)
Jsone 3.0.2 (2020-03-03)
========================
Bugfixes
--------
- ## Part fix for #168: Enforce all error messages match
Made sure error messages for arithmetic operations, builtins, and strings are the same.
Added error messages for array indexing. (#168)
- Fixed the issue of speacial values in '$let' not evaluating.
Values like 'if-then-else' statements, '$eval', and rendered keys.
The values evaluate to an object, the values of which are evaluated.
For example, the operations below no longer return an error:
title: let with a value of $if-then-else
$let:
$if: something == 3
then: {a: 10, b: 10}
else: {a: 20, b: 10}
in:
$eval: 'a + b'
context: {'something': 3}
result: 20
-----
title: let using values from the parent context
$let:
"b": {$eval: "a + 10"}
in:
$eval: 'a + b'
context: {'a':5}
result: 20
-----
title: let with a rendered key
$let:
"first_${name}": 1
"second_${name}": 2
in:
{$eval: "first_prize + second_prize"}
context: {'name': "prize"}
result: 3 (#249)
- Throw a useful error for `$then` (#252)
- Do not import `assert` in non-test code, so that it can run on browsers (#266)
- Differentiate path/variable from the rest of the error message (#283)
- [JS] Use `json-stable-stringify-without-jsonify`, dropping use of the unlicensed `jsonify`. (#299)
- Better error message when indexing string or array with non integer (#318)
- Strings containing unicode are now handled correctly by str() on Python 2. (#338)
Improved Documentation
----------------------
- Fix typo in CONTRIBUTING.md (contributingmd)
- Clarify 'all tests pass' instruction in PULL_REQUEST_TEMPLATE.md (pull_request_template)
- The `$fromNow` builtin is tested to properly handle a new value of `now` defined in a `$let`. (#344)
Jsone 3.0.1 (2018-07-11)
========================
Features
--------
- Introduction of support of TypeScript typings. This version adds type for the jsone function.
Jsone 3.0.0 (2018-11-01)
========================
Features
--------
- Support of `index` or `key` context variable in `$map` operation.
```yaml
template:
$map: [2, 4, 6]
each(x,i): {$eval: 'x + a + i'}
context: {a: 1}
result: [3, 6, 9]
---
template:
$map: {a: 1, b: 2, c: 3}
each(v,k): {'${k}x': {$eval: 'v + 1'}}
context: {}
result: {ax: 2, bx: 3, cx: 4}
``` (#235)
- Add support for element indexes in $map (#242)
Bugfixes
--------
- [BREAKING] make typeof(null) be "null", not null
This is a breaking change, as it changes an existing, documented behavior.
However, it is unlikely to affect most uses of JSON-e. (#246)
Jsone 2.7.1 (2018-09-22)
========================
Bugfixes
--------
- Ensure that `$match` results are deterministic (#258)
Jsone 2.7.0 (2018-08-23)
========================
Features
--------
- Add new operator `$match` which allows for a new way of flow control by evaluating boolean expressions it is given. (#161)
Jsone 2.6.0 (2018-06-20)
========================
Features
--------
- Begin using towncrier to build CHANGELOG.rst (#193)
- Add a `number` builtin that converts strings to numbers (#240)
Bugfixes
--------
- Ensure that ``$json`` consistently sorts object properties across languages
(#222)
Improved Documentation
----------------------
- Link to rjsone in README (#238)
Older Versions
==============
For versions of JSON-e 2.5.0 and older, please consult the git history.