Skip to content

Commit 590bdc8

Browse files
committed
AG-48910 fix conversion of googlesyndication-adsbygoogle alias
Squashed commit of the following: commit b9d4b42 Author: slvvko <v.leleka@adguard.com> Date: Tue Dec 16 13:17:06 2025 -0500 update libs commit 5da4592 Merge: 7dec294 877cc15 Author: slvvko <v.leleka@adguard.com> Date: Tue Dec 16 13:13:30 2025 -0500 merge parent branch into current one, resolve conflicts commit 7dec294 Author: slvvko <v.leleka@adguard.com> Date: Wed Dec 10 20:40:56 2025 -0500 fix changelog commit b40b15e Author: slvvko <v.leleka@adguard.com> Date: Wed Dec 10 20:38:35 2025 -0500 add test for googlesyndication-adsbygoogle alias conversion
1 parent 877cc15 commit 590bdc8

File tree

4 files changed

+50
-22
lines changed

4 files changed

+50
-22
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ 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.4] - 2025-12-16
9+
10+
### Changed
11+
12+
- Updated [@adguard/agtree] to v3.4.3.
13+
- Updated [@adguard/scriptlets] to v2.2.14.
14+
- Updated [@adguard/tsurlfilter] to v3.5.2.
15+
16+
### Fixed
17+
18+
- Conversion of `googlesyndication.com/adsbygoogle.js` redirect.
19+
20+
[v3.2.4]: https://github.com/AdguardTeam/FiltersCompiler/compare/v3.2.3...v3.2.4
21+
822
## [v3.2.3] - 2025-12-12
923

1024
### Fixed

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.3",
3+
"version": "3.2.4",
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": "^3.3.1",
31+
"@adguard/agtree": "^3.4.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.2.13",
39-
"@adguard/tsurlfilter": "^3.5.1",
38+
"@adguard/scriptlets": "^2.2.14",
39+
"@adguard/tsurlfilter": "^3.5.2",
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: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,20 @@ describe('converter', () => {
654654
const actual = convertRulesToAdgSyntax(['intermarche.pl#%#document.cookie = "interapp_redirect=false; path=/;";']);
655655
expect(actual[0]).toBe('intermarche.pl#%#document.cookie = "interapp_redirect=false; path=/;";');
656656
});
657+
658+
it('converts googlesyndication.com/adsbygoogle.js redirect to AdGuard format', () => {
659+
let actual = convertRulesToAdgSyntax([
660+
'||example.com/adsbygoogle.js^$script,redirect-rule=googlesyndication.com/adsbygoogle.js',
661+
]);
662+
let expected = '||example.com/adsbygoogle.js^$script,redirect-rule=googlesyndication-adsbygoogle';
663+
expect(actual[0]).toBe(expected);
664+
665+
actual = convertRulesToAdgSyntax([
666+
'||example.com/adsbygoogle.js$script,redirect=googlesyndication.com/adsbygoogle.js,important',
667+
]);
668+
expected = '||example.com/adsbygoogle.js$script,redirect=googlesyndication-adsbygoogle,important';
669+
expect(actual[0]).toBe(expected);
670+
});
657671
});
658672

659673
it('converts :remove() rules', () => {

0 commit comments

Comments
 (0)