From 9474100e6a7d09798ba9ead06bc8898fdce7e8fa Mon Sep 17 00:00:00 2001 From: Maxim Topciu Date: Thu, 17 Oct 2024 16:31:57 +0300 Subject: [PATCH] AG-36969 fix allowlist determination for a new tab Merge in ADGUARD-FILTERS/tsurlfilter from fix/AG-36969 to release/v3.1 Squashed commit of the following: commit c58c034e25b3e27ad8c26b3762f21580b509f777 Author: Maxim Topciu Date: Thu Oct 17 16:11:00 2024 +0300 AG-36969 update pnpm-lock commit 3ef89ea52da2e2b13181fce27e38d12da28ef7cf Author: Maxim Topciu Date: Thu Oct 17 16:09:29 2024 +0300 AG-36969 update version of the tswebextension in the adguard/api-mv3 commit 20a3187daf2b83af614ba4b1a4f9c72edc62e896 Author: Maxim Topciu Date: Thu Oct 17 16:04:56 2024 +0300 AG-36969 update CHANGELOG.md commit a3408ceaf53aac470cb79b5310bea8974baa20d3 Author: Maxim Topciu Date: Thu Oct 17 15:56:21 2024 +0300 AG-36969 fix allowlist determination for a new tab --- packages/adguard-api-mv3/CHANGELOG.md | 6 ++++++ packages/adguard-api-mv3/package.json | 4 ++-- packages/tswebextension/CHANGELOG.md | 8 ++++++++ packages/tswebextension/package.json | 2 +- packages/tswebextension/src/lib/mv3/tabs/tabs-api.ts | 4 ++++ pnpm-lock.yaml | 2 +- 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/adguard-api-mv3/CHANGELOG.md b/packages/adguard-api-mv3/CHANGELOG.md index e9c0dc7b9..60bf4a03e 100644 --- a/packages/adguard-api-mv3/CHANGELOG.md +++ b/packages/adguard-api-mv3/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. 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). +## 0.2.2 - 2024-10-17 + +### Changed + +- Updated [@adguard/tswebextension] to `v2.4.0-alpha.5`. + ## 0.2.1 - 2024-10-15 ### Changed diff --git a/packages/adguard-api-mv3/package.json b/packages/adguard-api-mv3/package.json index 29c345862..a5d6b494f 100644 --- a/packages/adguard-api-mv3/package.json +++ b/packages/adguard-api-mv3/package.json @@ -1,6 +1,6 @@ { "name": "@adguard/api-mv3", - "version": "0.2.1", + "version": "0.2.2", "description": "This is a TypeScript library that implements AdGuard's extension API for MV3", "main": "dist/adguard-api.js", "files": [ @@ -37,7 +37,7 @@ "license": "GPL-3.0-only", "dependencies": { "@adguard/logger": "1.1.0", - "@adguard/tswebextension": "2.4.0-alpha.3", + "@adguard/tswebextension": "2.4.0-alpha.5", "zod": "3.22.4" }, "devDependencies": { diff --git a/packages/tswebextension/CHANGELOG.md b/packages/tswebextension/CHANGELOG.md index 65ea8b540..5e76ce31a 100644 --- a/packages/tswebextension/CHANGELOG.md +++ b/packages/tswebextension/CHANGELOG.md @@ -8,6 +8,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 +## [2.4.0-alpha.5] - 2024-10-17 + +### Fixed + +- Allowlist determination for a new tab + +[2.4.0-alpha.5]: https://github.com/AdguardTeam/tsurlfilter/releases/tag/tswebextension-v2.4.0-alpha.5 + ## [2.4.0-alpha.4] - 2024-10-16 ### Changed diff --git a/packages/tswebextension/package.json b/packages/tswebextension/package.json index 774eac821..96ec131e2 100644 --- a/packages/tswebextension/package.json +++ b/packages/tswebextension/package.json @@ -1,6 +1,6 @@ { "name": "@adguard/tswebextension", - "version": "2.4.0-alpha.4", + "version": "2.4.0-alpha.5", "description": "This is a TypeScript library that implements AdGuard's extension API", "main": "dist/index.js", "typings": "dist/types/src/lib/mv2/background/index.d.ts", diff --git a/packages/tswebextension/src/lib/mv3/tabs/tabs-api.ts b/packages/tswebextension/src/lib/mv3/tabs/tabs-api.ts index f6d250c0d..851283442 100644 --- a/packages/tswebextension/src/lib/mv3/tabs/tabs-api.ts +++ b/packages/tswebextension/src/lib/mv3/tabs/tabs-api.ts @@ -402,6 +402,10 @@ export class TabsApi { return; } + if (frameId === MAIN_FRAME_ID && partialFrameContext.frameRule) { + tabContext.mainFrameRule = partialFrameContext.frameRule; + } + const frameContext = tabContext?.getFrameContext(frameId); if (!frameContext) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b23a0f433..1212536cf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,7 +91,7 @@ importers: specifier: 1.1.0 version: 1.1.0 '@adguard/tswebextension': - specifier: 2.4.0-alpha.3 + specifier: 2.4.0-alpha.5 version: link:../tswebextension zod: specifier: 3.22.4