Skip to content

Commit 0330774

Browse files
committed
AG-46075 Improve json-related scriptlets — support JSON path queries. #522
Squashed commit of the following: commit 8fbc34b Author: Adam Wróblewski <adam@adguard.com> Date: Thu Apr 2 11:38:41 2026 +0200 Do not use `getPrunePath` when `jsonpath` mode is used commit f3a0fdd Author: Adam Wróblewski <adam@adguard.com> Date: Tue Mar 31 14:22:02 2026 +0200 Update changelog commit 3c32b3b Author: Adam Wróblewski <adam@adguard.com> Date: Tue Mar 31 14:05:57 2026 +0200 Add tests for JSONPath handling of keys with backslashes and quotes commit 227bf4e Author: Adam Wróblewski <adam@adguard.com> Date: Tue Mar 31 12:04:41 2026 +0200 Add error logging for invalid JSON input commit 1eca71e Author: Adam Wróblewski <adam@adguard.com> Date: Tue Mar 31 10:54:10 2026 +0200 Add missing imports commit 4689d26 Author: Adam Wróblewski <adam@adguard.com> Date: Tue Mar 31 10:19:23 2026 +0200 Fix test description commit 871c87e Author: Adam Wróblewski <adam@adguard.com> Date: Tue Mar 31 10:00:00 2026 +0200 Add ability to match property by regexp commit df9c906 Author: Adam Wróblewski <adam@adguard.com> Date: Mon Mar 30 21:31:13 2026 +0200 Add few more tests commit 888935c Author: Adam Wróblewski <adam@adguard.com> Date: Mon Mar 30 17:15:43 2026 +0200 Update changelog commit 1558bfa Merge: 81db83e 006c4be Author: Adam Wróblewski <adam@adguard.com> Date: Mon Mar 30 17:12:20 2026 +0200 Merge branch 'master' into feature/AG-46075 commit 81db83e Author: Adam Wróblewski <adam@adguard.com> Date: Fri Mar 27 20:51:38 2026 +0100 Fix some edge cases and add few tests commit d1ddc0a Author: Adam Wróblewski <adam@adguard.com> Date: Thu Mar 26 15:34:53 2026 +0100 Add ability to remove property in `trusted-json-set` related scriptlets Add ability to remove/modify property in json-like string commit ba5bf63 Author: Adam Wróblewski <adam@adguard.com> Date: Wed Mar 25 16:29:11 2026 +0100 Revert changes in wiki commit c2c2825 Author: Adam Wróblewski <adam@adguard.com> Date: Wed Mar 25 16:22:28 2026 +0100 Add support for JSONPath in `json` related scriptlets
1 parent 006c4be commit 0330774

19 files changed

Lines changed: 5869 additions & 176 deletions

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
1010
<!-- TODO: change `@added unknown` tag due to the actual version -->
1111
<!-- during new scriptlets or redirects releasing -->
1212

13+
## [Unreleased]
14+
15+
### Added
16+
17+
- New `mode` parameter to all `json-prune` and `trusted-json-set` related scriptlets,
18+
which allows to specify the way of pruning JSON objects [#522].
19+
- Line-delimited JSON processing in `trusted-json-set` related scriptlets [#522].
20+
- `$remove$` value to all `trusted-json-set` related scriptlets, which allows removing specific properties [#522].
21+
- Support for `JSONPath` in `json-prune`, `json-prune-fetch-response`, `json-prune-xhr-response`,
22+
`trusted-json-set`, `trusted-json-set-fetch-response` and `trusted-json-set-xhr-response` scriptlets [#522].
23+
24+
[Unreleased]: https://github.com/AdguardTeam/Scriptlets/compare/v2.3.1...HEAD
25+
[#522]: https://github.com/AdguardTeam/Scriptlets/issues/522
26+
1327
## [v2.3.1] - 2026-03-24
1428

1529
### Changed

src/helpers/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export * from './get-descriptor-addon';
2727
export * from './get-error-message';
2828
export * from './get-property-in-chain';
2929
export * from './get-wildcard-property-in-chain';
30+
export * from './json-path-utils';
3031
export * from './json-set-utils';
3132
export * from './hit';
3233
export * from './match-request-props';

0 commit comments

Comments
 (0)