Skip to content

Commit

Permalink
update tsurlfilter to v2.2.4. AG-17467
Browse files Browse the repository at this point in the history
AdguardTeam/tsurlfilter#66

Squashed commit of the following:

commit 7e79ca1
Author: Slava Leleka <[email protected]>
Date:   Wed Nov 8 19:58:28 2023 +0200

    add tests

commit 521eea2
Author: Slava Leleka <[email protected]>
Date:   Wed Nov 8 19:58:16 2023 +0200

    update tsurlfilter to v2.2.4

commit 191ff52
Author: Slava Leleka <[email protected]>
Date:   Wed Nov 8 19:57:51 2023 +0200

    update changelog
  • Loading branch information
slavaleleka committed Nov 8, 2023
1 parent 236b203 commit 4fba87d
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [v1.1.104] - 2023-11-08

### Changed

- Updated [@adguard/tsurlfilter] to v2.2.4


## [v1.1.102] - 2023-11-03

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@adguard/extended-css": "^2.0.52",
"@adguard/filters-downloader": "^1.1.21",
"@adguard/scriptlets": "^1.9.83",
"@adguard/tsurlfilter": "2.2.3",
"@adguard/tsurlfilter": "2.2.4",
"ajv": "^8.11.0",
"child_process": ">=1.0.2",
"jsdom": "^21.1.1",
Expand Down
3 changes: 3 additions & 0 deletions src/test/converter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ describe('converter', () => {

c = converter.convertRulesToAdgSyntax([String.raw`||example.org/*/*/$replace=/<item type=\"banner\">.{280\,400}.*<\/background><\/item>//`]);
expect(c[0]).toBe(String.raw`||example.org/*/*/$replace=/<item type=\"banner\">.{280\,400}.*<\/background><\/item>//`);

c = converter.convertRulesToAdgSyntax(['||example.org^$permissions=geolocation=()']);
expect(c[0]).toBe('||example.org^$permissions=geolocation=()');
});

it('keeps cosmetic rule as is', () => {
Expand Down
9 changes: 9 additions & 0 deletions src/test/validator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,15 @@ describe('validator', () => {
});
});

describe('validate permissions modifier', () => {
const validRules = [
'||example.org^$permissions=geolocation=()',
];
test.each(validRules)('%s', (rule) => {
expect(validator.validate([rule])).toHaveLength(1);
});
});

it('checkAffinityDirectives test', () => {
let rules = [
'||test1.ru',
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@babel/runtime" "^7.20.13"
js-yaml "^3.13.1"

"@adguard/[email protected].3":
version "2.2.3"
resolved "https://registry.yarnpkg.com/@adguard/tsurlfilter/-/tsurlfilter-2.2.3.tgz#7cd05ae333f43f8982db45581fecbef530e75ca0"
integrity sha512-RLdQUbi8u4o2cRMHHr9zZplyhmbSVGkq0N5Jpx4iJlo9CMspq6e4hEM2KefKUM6mui58Bx8m/1u1mXhuLv/v4A==
"@adguard/[email protected].4":
version "2.2.4"
resolved "https://registry.yarnpkg.com/@adguard/tsurlfilter/-/tsurlfilter-2.2.4.tgz#97b775f1091eea8f8135eb0890266e3e4be69359"
integrity sha512-Q+XfoU5E0gNI6Kf3WIznGWETsrMpA/t7tTg+hUVbY2ELCLW9X/h1wTSizMS1kDPx2dnRFrJa/zzdmXiF3P7trQ==
dependencies:
"@adguard/scriptlets" "^1.9.83"
cidr-tools "^6.4.1"
Expand Down

0 comments on commit 4fba87d

Please sign in to comment.