Skip to content

Commit 6e0fa5a

Browse files
committed
AG-52322 update agtree to v4.0.3
Squashed commit of the following: commit 9225710 Author: slvvko <v.leleka@adguard.com> Date: Tue Mar 24 15:30:32 2026 -0400 combine min and max length attr values into single regexp
1 parent 006e042 commit 6e0fa5a

4 files changed

Lines changed: 50 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [v3.2.6] - 2026-03-24
9+
10+
### Changed
11+
12+
- Updated [@adguard/agtree] to v4.0.3.
13+
- Updated [@adguard/scriptlets] to v2.3.1.
14+
- Updated [@adguard/tsurlfilter] to v4.0.4.
15+
16+
[v3.2.6]: https://github.com/AdguardTeam/FiltersCompiler/compare/v3.2.5...v3.2.6
17+
818
## [v3.2.5] - 2026-03-19
919

1020
### Changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adguard/filters-compiler",
3-
"version": "3.2.5",
3+
"version": "3.2.6",
44
"description": "AdGuard filters compiler",
55
"homepage": "http://adguard.com",
66
"type": "module",
@@ -28,15 +28,15 @@
2828
"node": ">=22"
2929
},
3030
"dependencies": {
31-
"@adguard/agtree": "^4.0.2",
31+
"@adguard/agtree": "^4.0.3",
3232
"@adguard/css-tokenizer": "^1.2.0",
3333
"@adguard/ecss-tree": "^2.0.1",
3434
"@eslint/css-tree": "3.6.6",
3535
"@adguard/extended-css": "^2.1.1",
3636
"@adguard/filters-downloader": "^2.4.0",
3737
"@adguard/logger": "^2.0.0",
38-
"@adguard/scriptlets": "^2.3.0",
39-
"@adguard/tsurlfilter": "^4.0.3",
38+
"@adguard/scriptlets": "^2.3.1",
39+
"@adguard/tsurlfilter": "^4.0.4",
4040
"ajv": "^8.17.1",
4141
"child_process": ">=1.0.2",
4242
"jsdom": "^21.1.1",

pnpm-lock.yaml

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/converter.test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,24 @@ describe('converter', () => {
330330
expect(actual[0]).toBe(expected);
331331
});
332332

333+
it('converts html filtering rules with [min-length] and [max-length] into a single :contains() with combined quantifier', () => {
334+
let actual = convertRulesToAdgSyntax(['example.com$$script[tag-content="Flags."][min-length="20000"][max-length="300000"]']);
335+
let expected = 'example.com$$script:contains(Flags.):contains(/^(?=.{20000,300000}$).*/s)';
336+
expect(actual[0]).toBe(expected);
337+
338+
actual = convertRulesToAdgSyntax(['example.com$$script[min-length="100"][max-length="500"]']);
339+
expected = 'example.com$$script:contains(/^(?=.{100,500}$).*/s)';
340+
expect(actual[0]).toBe(expected);
341+
342+
actual = convertRulesToAdgSyntax(['example.com$$script[min-length="1000"]']);
343+
expected = 'example.com$$script:contains(/^(?=.{1000,}$).*/s)';
344+
expect(actual[0]).toBe(expected);
345+
346+
actual = convertRulesToAdgSyntax(['example.com$$script[max-length="5000"]']);
347+
expected = 'example.com$$script:contains(/^(?=.{0,5000}$).*/s)';
348+
expect(actual[0]).toBe(expected);
349+
});
350+
333351
describe('converts html rules with pseudo-classes', () => {
334352
it.each([
335353
'example.com$$script:contains(eval(function(p,a,c,k,e,d))',

0 commit comments

Comments
 (0)