-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCHANGELOG
57 lines (45 loc) · 2.59 KB
/
CHANGELOG
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
# 2.2.1
- Bugfix - Fix diffing when map contain atoms as key
# 2.2.0
- Change - Allow to replace the entire root
# 2.1.0
- Create diffs as pure maps and do not use Jsonpatch structs
# 2.0.0
- Bugfix - ADD behaviour is now compliant with RFC (insert or update)
- Bugfix - allow usage of nil values, previous implementation used `Map.get` with default `nil` to detect if a key was not present
- Change - COPY operation to be based on ADD operation (as per RFC)
- Change - MOVE operation to be based on COPY+REMOVE operation (as per RFC)
- Change - REPLACE operation to be based on REMOVE+ADD operation (as per RFC)
- Change - `Jsonpatch.apply_patch()` signature changes:
- patches can be defined as `Jsonpatch.Operation.Add/Copy/Remove/...` structs or with plain map conforming to the jsonpatch schema
- error reason is now defined with a `{:error, %Jsonpatch.Error{}}` tuple.
%Jsonpatch.Error{patch_index: _, path: _, reason: _} reports the patch index, the path and the reason that caused the error.
- Removed - `Jsonpatch.Mapper` module, in favour of new Jsonpatch.apply_patch signature
- Removed - `Jsonpatch.Operation` protocol
- Feature - introduced new `Jsonpatch.apply_patch()` option `keys: {:custom, convert_fn}` to convert path fragments with a user specific logic
- Improvements - increased test coverage
# 1.0.1
- Escape remaining keys before comparing them to the (already escaped) keys from earlier in the diffing process when determining Remove operations
# 1.0.0
- Allow lists at top level of Jsonpatch.apply_patch
- Fix error message when updating a non existing key in list
# 0.13.1
- Make Jsonpatch faster by (un)escaping conditional
# 0.13.0
- Allow usage of atoms for keys via `keys` option
# 0.12.1
- Generate diffs with correct order (thanks https://github.com/smartepsh)
# 0.12.0
- The functions apply_patch and apply_patch! do not sort anymore a list of patches before applying them
# 0.11.0
- Removed module Jsonpatch.FlatMap because it is not necessary anymore and not the focus of the lib
- Reworked creating diff to create less unnecessary data and for more accurate patches
- Fixed adding values to empty lists (thanks https://github.com/webdeb)
# 0.10.0
- Made jsonpatch more Elixir-API-like by adding Jsonpatch.apply_patch! (which raise an exception) and changed Jsonpatch.apply_patch to return a tuple.
- Implemented escaping for '~' and '/'
- Allow usage of '-' for Add and Copy operation
- Fixed adding and copying values to array
- Improved error feedback of test operation
- Fixed: Replace operation adds error to target
- Cleaned code: Replaced strange constructs of Enum.with_index with Enum.fetch