Starcounter-Jack/JSON-Patch
### [`v2.1.0`](https://togithub.com/Starcounter-Jack/JSON-Patch/releases/v2.1.0)
[Compare Source](https://togithub.com/Starcounter-Jack/JSON-Patch/compare/v2.0.7...v2.1.0)
- `applyOperation` and `applyReducer` now accept an optional index parameter. This param is used to create more elaborate error messages when invalid operations occur in your patches, [#221](https://togithub.com/Starcounter-Jack/JSON-Patch/pull/221).
- Error messages are now nicely-formatted, they look like:
The specified index MUST NOT be greater than the number of elements in the array
name: OPERATION_VALUE_OUT_OF_BOUNDS
index: 1
operation: {
"op": "add",
"path": "/root/1",
"value": "val"
}
tree: {
"root": []
}"
- By default, prototype injection is not allowed and throws an error. If you want to pollute a prototype, you'll need to pass a flag `banPrototypeModifications = false` to all `applyX` functions. [#219](https://togithub.com/Starcounter-Jack/JSON-Patch/pull/219).
- Bad behaviour when you replace an object with an array is now fixed. See [#205](https://togithub.com/Starcounter-Jack/JSON-Patch/pull/205).
Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".
:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Renovate Bot. View repository job log here.
This PR contains the following updates:
2.0.7
->2.1.0
Release Notes
Starcounter-Jack/JSON-Patch
### [`v2.1.0`](https://togithub.com/Starcounter-Jack/JSON-Patch/releases/v2.1.0) [Compare Source](https://togithub.com/Starcounter-Jack/JSON-Patch/compare/v2.0.7...v2.1.0) - `applyOperation` and `applyReducer` now accept an optional index parameter. This param is used to create more elaborate error messages when invalid operations occur in your patches, [#221](https://togithub.com/Starcounter-Jack/JSON-Patch/pull/221). - Error messages are now nicely-formatted, they look like: The specified index MUST NOT be greater than the number of elements in the array name: OPERATION_VALUE_OUT_OF_BOUNDS index: 1 operation: { "op": "add", "path": "/root/1", "value": "val" } tree: { "root": [] }" - By default, prototype injection is not allowed and throws an error. If you want to pollute a prototype, you'll need to pass a flag `banPrototypeModifications = false` to all `applyX` functions. [#219](https://togithub.com/Starcounter-Jack/JSON-Patch/pull/219). - Bad behaviour when you replace an object with an array is now fixed. See [#205](https://togithub.com/Starcounter-Jack/JSON-Patch/pull/205).Renovate configuration
:date: Schedule: At any time (no schedule defined).
:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.
:recycle: Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!
".:no_bell: Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.