@adguard/filters-compiler 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/build.txt CHANGED
@@ -1 +1 @@
1
- version=3.0.1
1
+ version=3.1.0
package/dist/index.cjs CHANGED
@@ -4283,7 +4283,8 @@ const EXTENDED_CSS_RULES_PATTERNS = [
4283
4283
  ];
4284
4284
 
4285
4285
  /**
4286
- * Used for `EXTENSION_CHROMIUM`, `EXTENSION_CHROMIUM_MV3`, `EXTENSION_EDGE`, and `EXTENSION_OPERA` platforms.
4286
+ * Used for `EXTENSION_CHROMIUM`, `EXTENSION_CHROMIUM_MV3`, `EXTENSION_EDGE`,
4287
+ * `EXTENSION_OPERA`, and `EXTENSION_OPERA_MV3` platforms.
4287
4288
  */
4288
4289
  const CHROMIUM_BASED_EXTENSION_PATTERNS = [
4289
4290
  ...HTML_FILTERING_MODIFIER_PATTERNS,
@@ -4490,6 +4491,24 @@ const platformsConfig = {
4490
4491
  'adguard_ext_chromium': true,
4491
4492
  },
4492
4493
  },
4494
+ 'EXTENSION_OPERA_MV3': {
4495
+ 'platform': 'ext_opera_mv3',
4496
+ 'path': 'extension/opera-mv3',
4497
+ 'expires': '10 days',
4498
+ 'configuration': {
4499
+ 'removeRulePatterns': [
4500
+ ...CHROMIUM_BASED_EXTENSION_PATTERNS,
4501
+ ...REDIRECT_MODIFIER_PATTERNS,
4502
+ ],
4503
+ 'replacements': null,
4504
+ 'ignoreRuleHints': false,
4505
+ },
4506
+ 'defines': {
4507
+ 'adguard': true,
4508
+ 'adguard_ext_opera_mv3': true,
4509
+ 'adguard_ext_chromium_mv3': true,
4510
+ },
4511
+ },
4493
4512
  'EXTENSION_FIREFOX': {
4494
4513
  'platform': 'ext_ff',
4495
4514
  'path': 'extension/firefox',
@@ -4615,9 +4634,6 @@ const platformsConfig = {
4615
4634
  },
4616
4635
  };
4617
4636
 
4618
- // Sets RuleConverter to use logger of current library
4619
- tsurlfilter.setLogger(logger);
4620
-
4621
4637
  // Sets configuration compatibility
4622
4638
  tsurlfilter.setConfiguration({ compatibility: tsurlfilter.CompatibilityTypes.Corelibs });
4623
4639
 
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import path from 'path';
2
- import { RuleFactory, CosmeticRule, NetworkRule, setLogger, setConfiguration, CompatibilityTypes } from '@adguard/tsurlfilter';
2
+ import { RuleFactory, CosmeticRule, NetworkRule, setConfiguration, CompatibilityTypes } from '@adguard/tsurlfilter';
3
3
  import fs from 'fs';
4
4
  import md5 from 'md5';
5
5
  import { FiltersDownloader } from '@adguard/filters-downloader';
@@ -4280,7 +4280,8 @@ const EXTENDED_CSS_RULES_PATTERNS = [
4280
4280
  ];
4281
4281
 
4282
4282
  /**
4283
- * Used for `EXTENSION_CHROMIUM`, `EXTENSION_CHROMIUM_MV3`, `EXTENSION_EDGE`, and `EXTENSION_OPERA` platforms.
4283
+ * Used for `EXTENSION_CHROMIUM`, `EXTENSION_CHROMIUM_MV3`, `EXTENSION_EDGE`,
4284
+ * `EXTENSION_OPERA`, and `EXTENSION_OPERA_MV3` platforms.
4284
4285
  */
4285
4286
  const CHROMIUM_BASED_EXTENSION_PATTERNS = [
4286
4287
  ...HTML_FILTERING_MODIFIER_PATTERNS,
@@ -4487,6 +4488,24 @@ const platformsConfig = {
4487
4488
  'adguard_ext_chromium': true,
4488
4489
  },
4489
4490
  },
4491
+ 'EXTENSION_OPERA_MV3': {
4492
+ 'platform': 'ext_opera_mv3',
4493
+ 'path': 'extension/opera-mv3',
4494
+ 'expires': '10 days',
4495
+ 'configuration': {
4496
+ 'removeRulePatterns': [
4497
+ ...CHROMIUM_BASED_EXTENSION_PATTERNS,
4498
+ ...REDIRECT_MODIFIER_PATTERNS,
4499
+ ],
4500
+ 'replacements': null,
4501
+ 'ignoreRuleHints': false,
4502
+ },
4503
+ 'defines': {
4504
+ 'adguard': true,
4505
+ 'adguard_ext_opera_mv3': true,
4506
+ 'adguard_ext_chromium_mv3': true,
4507
+ },
4508
+ },
4490
4509
  'EXTENSION_FIREFOX': {
4491
4510
  'platform': 'ext_ff',
4492
4511
  'path': 'extension/firefox',
@@ -4612,9 +4631,6 @@ const platformsConfig = {
4612
4631
  },
4613
4632
  };
4614
4633
 
4615
- // Sets RuleConverter to use logger of current library
4616
- setLogger(logger);
4617
-
4618
4634
  // Sets configuration compatibility
4619
4635
  setConfiguration({ compatibility: CompatibilityTypes.Corelibs });
4620
4636
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adguard/filters-compiler",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "AdGuard filters compiler",
5
5
  "homepage": "http://adguard.com",
6
6
  "type": "module",