@duckduckgo/autoconsent 15.1.0 → 16.0.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.
Files changed (84) hide show
  1. package/.github/dependabot.yml +0 -3
  2. package/.github/workflows/release.yml +0 -4
  3. package/AGENTS.md +3 -3
  4. package/CHANGELOG.md +20 -0
  5. package/build.sh +0 -2
  6. package/dist/addon-firefox/background.bundle.js +8 -24
  7. package/dist/addon-firefox/compact-rules.json +1 -1
  8. package/dist/addon-firefox/content.bundle.js +176 -686
  9. package/dist/addon-firefox/manifest.json +1 -1
  10. package/dist/addon-firefox/popup.bundle.js +31 -27
  11. package/dist/addon-firefox/popup.html +21 -13
  12. package/dist/addon-firefox/rule-index.json +1 -1
  13. package/dist/addon-firefox/rules.json +1 -1
  14. package/dist/addon-mv3/background.bundle.js +8 -24
  15. package/dist/addon-mv3/compact-rules.json +1 -1
  16. package/dist/addon-mv3/content.bundle.js +176 -686
  17. package/dist/addon-mv3/manifest.json +1 -1
  18. package/dist/addon-mv3/popup.bundle.js +31 -27
  19. package/dist/addon-mv3/popup.html +21 -13
  20. package/dist/addon-mv3/rule-index.json +1 -1
  21. package/dist/addon-mv3/rules.json +1 -1
  22. package/dist/autoconsent.cjs.js +176 -685
  23. package/dist/autoconsent.esm.js +176 -685
  24. package/dist/autoconsent.playwright.js +177 -689
  25. package/dist/autoconsent.standalone.js +177 -690
  26. package/dist/types/cmps/base.d.ts +3 -3
  27. package/dist/types/heuristics.d.ts +2 -2
  28. package/dist/types/types.d.ts +10 -23
  29. package/dist/types/web.d.ts +0 -9
  30. package/docs/api.md +1 -8
  31. package/docs/puppeteer.md +1 -3
  32. package/docs/rule-syntax.md +0 -17
  33. package/eslint.config.mjs +1 -1
  34. package/lib/cmps/base.ts +5 -6
  35. package/lib/heuristics.ts +15 -15
  36. package/lib/types.ts +9 -21
  37. package/lib/utils.ts +2 -4
  38. package/lib/web.ts +3 -53
  39. package/package.json +4 -17
  40. package/playwright/content.ts +1 -2
  41. package/readme.md +3 -6
  42. package/rules/autoconsent/dreamlab-cmp.json +13 -0
  43. package/rules/build.ts +1 -24
  44. package/rules/compact-rules.json +1 -1
  45. package/rules/rule-index-builder.ts +2 -7
  46. package/rules/rule-index.json +1 -1
  47. package/rules/rules.json +1 -1
  48. package/standalone/content.ts +0 -2
  49. package/tests/dreamlab-cmp.spec.ts +3 -0
  50. package/tests/quantcast.spec.ts +0 -6
  51. package/tests-wtr/heuristics/get-actionable-popups.ts +13 -13
  52. package/tests-wtr/heuristics/heuristic-cmp.ts +32 -33
  53. package/tests-wtr/lifecycle/find-cmp.ts +5 -8
  54. package/tests-wtr/web/do-opt-in.test.ts +0 -1
  55. package/tests-wtr/web/do-opt-out.test.ts +0 -1
  56. package/tests-wtr/web/do-self-test.test.ts +0 -1
  57. package/tests-wtr/web/filter-cmps.test.ts +0 -1
  58. package/tests-wtr/web/receive-message-callback.test.ts +1 -2
  59. package/tests-wtr/web/update-state.test.ts +1 -3
  60. package/tsconfig.build.json +1 -1
  61. package/.github/workflows/update-filterlist.yml +0 -42
  62. package/dist/autoconsent.extra.cjs.js +0 -15717
  63. package/dist/autoconsent.extra.esm.js +0 -15649
  64. package/dist/types/cmps/consentomatic.d.ts +0 -34
  65. package/dist/types/consentomatic/index.d.ts +0 -2
  66. package/dist/types/consentomatic/tools.d.ts +0 -10
  67. package/dist/types/filterlist-engine.d.ts +0 -2
  68. package/dist/types/filterlist-utils.d.ts +0 -4
  69. package/dist/types/web-extra.d.ts +0 -11
  70. package/lib/cmps/consentomatic.ts +0 -97
  71. package/lib/consentomatic/index.ts +0 -252
  72. package/lib/consentomatic/tools.ts +0 -199
  73. package/lib/filterlist-engine.ts +0 -5
  74. package/lib/filterlist-utils.ts +0 -45
  75. package/lib/web-extra.ts +0 -116
  76. package/rules/consentomatic.json +0 -1
  77. package/rules/filterlist.txt +0 -18440
  78. package/rules/filterlists/overrides.txt +0 -4
  79. package/scripts/compile-filterlist.mjs +0 -63
  80. package/scripts/fetch-easylist.sh +0 -25
  81. package/scripts/rebuild-filterlist.mjs +0 -216
  82. package/tests/oil.spec.ts +0 -7
  83. package/tests/springer.spec.ts +0 -7
  84. package/tests/wordpressgdpr.spec.ts +0 -6
@@ -3,7 +3,6 @@ import { filterCompactRules, type IndexedCMPRuleset } from '../lib/encoding';
3
3
  import { BackgroundMessage, ContentScriptMessage } from '../lib/messages';
4
4
  import { Config, RuleBundle } from '../lib/types';
5
5
  import compactRules from '../rules/compact-rules.json';
6
- import { consentomatic } from '../rules/consentomatic.json';
7
6
 
8
7
  declare global {
9
8
  interface Window {
@@ -22,7 +21,6 @@ function isMainFrame() {
22
21
  function buildRules(): RuleBundle {
23
22
  return {
24
23
  autoconsent: [],
25
- consentomatic,
26
24
  compact: filterCompactRules(compactRules as IndexedCMPRuleset, {
27
25
  url: window.location.href,
28
26
  mainFrame: isMainFrame(),
@@ -0,0 +1,3 @@
1
+ import generateCMPTests from '../playwright/runner';
2
+
3
+ generateCMPTests('dreamlab-cmp', ['https://www.onet.pl/', 'https://konkursy.onet.pl/', 'https://techawards.komputerswiat.pl/']);
@@ -14,9 +14,3 @@ generateCMPTests(
14
14
  skipRegions: ['US', 'GB', 'FR'],
15
15
  },
16
16
  );
17
-
18
- generateCMPTests('com_quantcast2', ['https://www.fandom.com/'], {
19
- testOptIn: false,
20
- testSelfTest: false,
21
- skipRegions: ['US'],
22
- });
@@ -1,6 +1,6 @@
1
1
  import { expect } from '@esm-bundle/chai';
2
2
  import { getActionablePopups } from '../../lib/heuristics';
3
- import { ButtonData, PopupHandlingModes } from '../../lib/types';
3
+ import { ButtonData } from '../../lib/types';
4
4
 
5
5
  function rejectButtons(buttons: ButtonData[]) {
6
6
  return buttons.filter((b) => b.regexClassification === 'reject');
@@ -46,7 +46,7 @@ describe('getActionablePopups', () => {
46
46
  it('ignores popup with accept and settings buttons', () => {
47
47
  showPopup('popup-no-reject');
48
48
 
49
- const popups = getActionablePopups(PopupHandlingModes.Tier2);
49
+ const popups = getActionablePopups('tier2');
50
50
 
51
51
  expect(popups.length).to.equal(0);
52
52
  });
@@ -56,7 +56,7 @@ describe('getActionablePopups', () => {
56
56
  it('finds accept-only popup with no reject buttons', () => {
57
57
  showPopup('popup-accept-only');
58
58
 
59
- const popups = getActionablePopups(PopupHandlingModes.Tier2);
59
+ const popups = getActionablePopups('tier2');
60
60
 
61
61
  expect(popups.length).to.equal(1);
62
62
  expect(rejectButtons(popups[0].buttons)).to.have.length(0);
@@ -66,7 +66,7 @@ describe('getActionablePopups', () => {
66
66
  it('finds acknowledge-only popup with no reject buttons', () => {
67
67
  showPopup('popup-acknowledge-only');
68
68
 
69
- const popups = getActionablePopups(PopupHandlingModes.Tier2);
69
+ const popups = getActionablePopups('tier2');
70
70
 
71
71
  expect(popups.length).to.equal(1);
72
72
  expect(rejectButtons(popups[0].buttons)).to.have.length(0);
@@ -76,10 +76,10 @@ describe('getActionablePopups', () => {
76
76
  it('finds popup with multiple reject buttons', () => {
77
77
  showPopup('popup-multiple-reject');
78
78
 
79
- const popups = getActionablePopups(PopupHandlingModes.Tier2);
79
+ const popups = getActionablePopups('tier2');
80
80
 
81
81
  expect(popups.length).to.equal(1);
82
- expect(popups[0].regexClassification).to.equal(PopupHandlingModes.Reject);
82
+ expect(popups[0].regexClassification).to.equal('reject');
83
83
  expect(rejectButtons(popups[0].buttons)).to.have.length(2);
84
84
  });
85
85
  });
@@ -88,7 +88,7 @@ describe('getActionablePopups', () => {
88
88
  it('does not return accept-only popup when mode is Reject', () => {
89
89
  showPopup('popup-accept-only');
90
90
 
91
- const popups = getActionablePopups(PopupHandlingModes.Reject);
91
+ const popups = getActionablePopups();
92
92
 
93
93
  expect(popups.length).to.equal(0);
94
94
  });
@@ -96,16 +96,16 @@ describe('getActionablePopups', () => {
96
96
  it('returns acknowledge-only popup when mode is Tier1', () => {
97
97
  showPopup('popup-acknowledge-only');
98
98
 
99
- const popups = getActionablePopups(PopupHandlingModes.Tier1);
99
+ const popups = getActionablePopups('tier1');
100
100
 
101
101
  expect(popups.length).to.equal(1);
102
- expect(popups[0].regexClassification).to.equal(PopupHandlingModes.Tier1);
102
+ expect(popups[0].regexClassification).to.equal('tier1');
103
103
  });
104
104
 
105
105
  it('does not return accept-only popup when mode is Tier1', () => {
106
106
  showPopup('popup-accept-only');
107
107
 
108
- const popups = getActionablePopups(PopupHandlingModes.Tier1);
108
+ const popups = getActionablePopups('tier1');
109
109
 
110
110
  expect(popups.length).to.equal(0);
111
111
  });
@@ -114,11 +114,11 @@ describe('getActionablePopups', () => {
114
114
  showPopup('popup-reject-all');
115
115
  showPopup('popup-accept-only');
116
116
 
117
- const popups = getActionablePopups(PopupHandlingModes.Tier2);
117
+ const popups = getActionablePopups('tier2');
118
118
 
119
119
  expect(popups.length).to.equal(2);
120
- expect(popups[0].regexClassification).to.equal(PopupHandlingModes.Reject);
121
- expect(popups[1].regexClassification).to.equal(PopupHandlingModes.Tier2);
120
+ expect(popups[0].regexClassification).to.equal('reject');
121
+ expect(popups[1].regexClassification).to.equal('tier2');
122
122
  });
123
123
  });
124
124
 
@@ -1,15 +1,14 @@
1
1
  import { expect } from '@esm-bundle/chai';
2
2
  import Autoconsent from '../../lib/web';
3
3
  import { AutoConsentHeuristicCMP } from '../../lib/cmps/base';
4
- import { PopupHandlingMode, PopupHandlingModes } from '../../lib/types';
4
+ import { HeuristicLevel } from '../../lib/types';
5
5
 
6
6
  // must be run from heuristic-cmp.html
7
7
  describe('AutoConsentHeuristicCMP', () => {
8
- function createAutoconsent(heuristicMode: PopupHandlingMode) {
8
+ function createAutoconsent(heuristicMode: HeuristicLevel) {
9
9
  return new Autoconsent(() => Promise.resolve(), {
10
10
  enabled: false,
11
11
  autoAction: null,
12
- enableHeuristicAction: true,
13
12
  heuristicMode,
14
13
  });
15
14
  }
@@ -30,20 +29,20 @@ describe('AutoConsentHeuristicCMP', () => {
30
29
  });
31
30
 
32
31
  describe('detectCmp', () => {
33
- it('detects reject popup as HEURISTIC-TIER0', async () => {
34
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
35
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
32
+ it('detects reject popup as HEURISTIC-REJECT', async () => {
33
+ const autoconsent = createAutoconsent('tier2');
34
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
36
35
  showPopup('popup-reject');
37
36
 
38
37
  const detected = await cmp.detectCmp();
39
38
 
40
39
  expect(detected).to.be.true;
41
- expect(cmp.name).to.equal('HEURISTIC-TIER0');
40
+ expect(cmp.name).to.equal('HEURISTIC-REJECT');
42
41
  });
43
42
 
44
43
  it('detects acknowledge-only popup as HEURISTIC-TIER1', async () => {
45
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
46
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
44
+ const autoconsent = createAutoconsent('tier2');
45
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
47
46
  showPopup('popup-acknowledge-only');
48
47
 
49
48
  const detected = await cmp.detectCmp();
@@ -53,8 +52,8 @@ describe('AutoConsentHeuristicCMP', () => {
53
52
  });
54
53
 
55
54
  it('detects accept-only popup as HEURISTIC-TIER2', async () => {
56
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
57
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
55
+ const autoconsent = createAutoconsent('tier2');
56
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
58
57
  showPopup('popup-accept-only');
59
58
 
60
59
  const detected = await cmp.detectCmp();
@@ -64,8 +63,8 @@ describe('AutoConsentHeuristicCMP', () => {
64
63
  });
65
64
 
66
65
  it('does not detect popup with accept and settings buttons', async () => {
67
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
68
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
66
+ const autoconsent = createAutoconsent('tier2');
67
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
69
68
  showPopup('popup-accept-settings');
70
69
 
71
70
  const detected = await cmp.detectCmp();
@@ -73,33 +72,33 @@ describe('AutoConsentHeuristicCMP', () => {
73
72
  expect(detected).to.be.false;
74
73
  });
75
74
 
76
- it('detects popup with multiple reject buttons as HEURISTIC-TIER0', async () => {
77
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
78
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
75
+ it('detects popup with multiple reject buttons as HEURISTIC-REJECT', async () => {
76
+ const autoconsent = createAutoconsent('tier2');
77
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
79
78
  showPopup('popup-multiple-reject');
80
79
 
81
80
  const detected = await cmp.detectCmp();
82
81
 
83
82
  expect(detected).to.be.true;
84
- expect(cmp.name).to.equal('HEURISTIC-TIER0');
83
+ expect(cmp.name).to.equal('HEURISTIC-REJECT');
85
84
  });
86
85
 
87
86
  it('prefers reject popup when reject and accept popups are visible', async () => {
88
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
89
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
87
+ const autoconsent = createAutoconsent('tier2');
88
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
90
89
  showPopup('popup-tier-preference-reject', 'popup-tier-preference-accept');
91
90
 
92
91
  const detected = await cmp.detectCmp();
93
92
 
94
93
  expect(detected).to.be.true;
95
- expect(cmp.name).to.equal('HEURISTIC-TIER0');
94
+ expect(cmp.name).to.equal('HEURISTIC-REJECT');
96
95
  });
97
96
  });
98
97
 
99
98
  describe('heuristicMode cap', () => {
100
99
  it('does not detect accept-only popup when mode is Reject', async () => {
101
- const autoconsent = createAutoconsent(PopupHandlingModes.Reject);
102
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Reject);
100
+ const autoconsent = createAutoconsent('reject');
101
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'reject');
103
102
  showPopup('popup-accept-only');
104
103
 
105
104
  const detected = await cmp.detectCmp();
@@ -108,8 +107,8 @@ describe('AutoConsentHeuristicCMP', () => {
108
107
  });
109
108
 
110
109
  it('detects acknowledge-only popup when mode is Tier1', async () => {
111
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier1);
112
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier1);
110
+ const autoconsent = createAutoconsent('tier1');
111
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier1');
113
112
  showPopup('popup-acknowledge-only');
114
113
 
115
114
  const detected = await cmp.detectCmp();
@@ -119,8 +118,8 @@ describe('AutoConsentHeuristicCMP', () => {
119
118
  });
120
119
 
121
120
  it('does not detect accept-only popup when mode is Tier1', async () => {
122
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier1);
123
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier1);
121
+ const autoconsent = createAutoconsent('tier1');
122
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier1');
124
123
  showPopup('popup-accept-only');
125
124
 
126
125
  const detected = await cmp.detectCmp();
@@ -130,9 +129,9 @@ describe('AutoConsentHeuristicCMP', () => {
130
129
  });
131
130
 
132
131
  describe('optOut', () => {
133
- it('clicks the reject button for TIER0 popup', async () => {
134
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
135
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
132
+ it('clicks the reject button for REJECT popup', async () => {
133
+ const autoconsent = createAutoconsent('tier2');
134
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
136
135
  showPopup('popup-reject');
137
136
  await cmp.detectCmp();
138
137
 
@@ -146,8 +145,8 @@ describe('AutoConsentHeuristicCMP', () => {
146
145
  });
147
146
 
148
147
  it('clicks the acknowledge button for TIER1 popup', async () => {
149
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
150
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
148
+ const autoconsent = createAutoconsent('tier2');
149
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
151
150
  showPopup('popup-acknowledge-only');
152
151
  await cmp.detectCmp();
153
152
 
@@ -161,8 +160,8 @@ describe('AutoConsentHeuristicCMP', () => {
161
160
  });
162
161
 
163
162
  it('clicks the accept button for TIER2 popup', async () => {
164
- const autoconsent = createAutoconsent(PopupHandlingModes.Tier2);
165
- const cmp = new AutoConsentHeuristicCMP(autoconsent, PopupHandlingModes.Tier2);
163
+ const autoconsent = createAutoconsent('tier2');
164
+ const cmp = new AutoConsentHeuristicCMP(autoconsent, 'tier2');
166
165
  showPopup('popup-accept-only');
167
166
  await cmp.detectCmp();
168
167
 
@@ -1,7 +1,6 @@
1
1
  import { expect } from '@esm-bundle/chai';
2
2
  import Autoconsent from '../../lib/web';
3
3
  import Onetrust from '../../lib/cmps/onetrust';
4
- import { PopupHandlingModes } from '../../lib/types';
5
4
 
6
5
  describe('Autoconsent.findCmp', () => {
7
6
  let autoconsent: Autoconsent;
@@ -11,7 +10,7 @@ describe('Autoconsent.findCmp', () => {
11
10
  autoconsent = new Autoconsent((msg) => Promise.resolve(), {
12
11
  enabled: false, // bypass initialization
13
12
  autoAction: null,
14
- enableHeuristicAction: false,
13
+ heuristicMode: 'off',
15
14
  });
16
15
  });
17
16
 
@@ -141,7 +140,7 @@ describe('Autoconsent.findCmp', () => {
141
140
  autoconsent = new Autoconsent((msg) => Promise.resolve(), {
142
141
  enabled: false,
143
142
  autoAction: null,
144
- enableHeuristicAction: true,
143
+ heuristicMode: 'reject',
145
144
  });
146
145
  });
147
146
 
@@ -167,7 +166,7 @@ describe('Autoconsent.findCmp', () => {
167
166
  const found = await autoconsent.findCmp(1);
168
167
 
169
168
  expect(found).to.have.length(1);
170
- expect(found[0].name).to.equal('HEURISTIC-TIER0');
169
+ expect(found[0].name).to.equal('HEURISTIC-REJECT');
171
170
  });
172
171
 
173
172
  it('prefers declarative rules over heuristic CMP', async () => {
@@ -192,8 +191,7 @@ describe('Autoconsent.findCmp', () => {
192
191
  autoconsent = new Autoconsent((msg) => Promise.resolve(), {
193
192
  enabled: false,
194
193
  autoAction: null,
195
- enableHeuristicAction: true,
196
- heuristicMode: PopupHandlingModes.Tier1,
194
+ heuristicMode: 'tier1',
197
195
  });
198
196
  autoconsent.state.findCmpAttempts = 1;
199
197
 
@@ -210,8 +208,7 @@ describe('Autoconsent.findCmp', () => {
210
208
  autoconsent = new Autoconsent((msg) => Promise.resolve(), {
211
209
  enabled: false,
212
210
  autoAction: null,
213
- enableHeuristicAction: true,
214
- heuristicMode: PopupHandlingModes.Tier2,
211
+ heuristicMode: 'tier2',
215
212
  });
216
213
  autoconsent.state.findCmpAttempts = 1;
217
214
 
@@ -18,7 +18,6 @@ function createTestConfig(overrides: Partial<Config> = {}): Config {
18
18
  detectRetries: 0,
19
19
  isMainWorld: false,
20
20
  prehideTimeout: 2000,
21
- enableFilterList: false,
22
21
  enableHeuristicDetection: false,
23
22
  enableHeuristicAction: false,
24
23
  visualTest: false,
@@ -18,7 +18,6 @@ function createTestConfig(overrides: Partial<Config> = {}): Config {
18
18
  detectRetries: 0,
19
19
  isMainWorld: false,
20
20
  prehideTimeout: 2000,
21
- enableFilterList: false,
22
21
  enableHeuristicDetection: false,
23
22
  enableHeuristicAction: false,
24
23
  visualTest: false,
@@ -18,7 +18,6 @@ function createTestConfig(overrides: Partial<Config> = {}): Config {
18
18
  detectRetries: 0,
19
19
  isMainWorld: false,
20
20
  prehideTimeout: 2000,
21
- enableFilterList: false,
22
21
  enableHeuristicDetection: false,
23
22
  enableHeuristicAction: false,
24
23
  visualTest: false,
@@ -40,7 +40,6 @@ function createTestConfig(overrides: Partial<Config> = {}): Config {
40
40
  detectRetries: 5,
41
41
  isMainWorld: false,
42
42
  prehideTimeout: 2000,
43
- enableFilterList: false,
44
43
  enableHeuristicDetection: false,
45
44
  enableHeuristicAction: false,
46
45
  visualTest: false,
@@ -17,7 +17,6 @@ function createTestConfig(overrides: Partial<Config> = {}): Config {
17
17
  detectRetries: 0,
18
18
  isMainWorld: false,
19
19
  prehideTimeout: 2000,
20
- enableFilterList: false,
21
20
  enableHeuristicDetection: false,
22
21
  enableHeuristicAction: false,
23
22
  visualTest: false,
@@ -125,7 +124,7 @@ describe('AutoConsent.receiveMessageCallback', () => {
125
124
 
126
125
  it('should pass rules to initialize', async () => {
127
126
  const initializeStub = sinon.stub(autoconsent, 'initialize');
128
- const rules = { autoconsent: [], consentomatic: {} };
127
+ const rules = { autoconsent: [] };
129
128
 
130
129
  await autoconsent.receiveMessageCallback({
131
130
  type: 'initResp',
@@ -17,7 +17,6 @@ function createTestConfig(overrides: Partial<Config> = {}): Config {
17
17
  detectRetries: 0,
18
18
  isMainWorld: false,
19
19
  prehideTimeout: 2000,
20
- enableFilterList: false,
21
20
  enableHeuristicDetection: false,
22
21
  enableHeuristicAction: false,
23
22
  visualTest: false,
@@ -87,10 +86,9 @@ describe('AutoConsent.updateState', () => {
87
86
  });
88
87
 
89
88
  it('should update boolean properties', () => {
90
- autoconsent.updateState({ prehideOn: true, cosmeticFiltersOn: true });
89
+ autoconsent.updateState({ prehideOn: true });
91
90
 
92
91
  expect(autoconsent.state.prehideOn).to.be.true;
93
- expect(autoconsent.state.cosmeticFiltersOn).to.be.true;
94
92
  });
95
93
 
96
94
  it('should update numeric properties', () => {
@@ -6,6 +6,6 @@
6
6
  "declarationDir": "./dist/types",
7
7
  "noCheck": true
8
8
  },
9
- "include": ["lib/web.ts", "lib/web-extra.ts"],
9
+ "include": ["lib/web.ts"],
10
10
  "exclude": []
11
11
  }
@@ -1,42 +0,0 @@
1
- name: Update filterlist
2
-
3
- on:
4
- workflow_dispatch:
5
-
6
- schedule:
7
- - cron: '0 3 * * FRI' # run every Friday at 3:00
8
-
9
- jobs:
10
- update_filterlist:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
-
15
- - name: Use Node.js
16
- uses: actions/setup-node@v3
17
- with:
18
- node-version: lts/*
19
-
20
- - name: Install dependencies
21
- run: npm ci
22
-
23
- - name: Update EasyList
24
- run: |
25
- npm run update-easylist
26
-
27
- - name: Read EasyList revision
28
- id: read-revision
29
- run: echo "revision=`cat rules/filterlists/easylist_revision.txt`" >> "$GITHUB_OUTPUT"
30
-
31
- - name: Create Pull Request
32
- uses: peter-evans/create-pull-request@v7
33
- with:
34
- title: Update EasyList Cookie to ${{ steps.read-revision.outputs.revision }}
35
- commit-message: Update EasyList Cookie to ${{ steps.read-revision.outputs.revision }}
36
- labels: |
37
- minor
38
- dependencies
39
- release
40
- reviewers: muodov,sammacbeth
41
- body: |
42
- This PR updates the filterlist based on EasyList Cookie commit [${{ steps.read-revision.outputs.revision }}](https://github.com/easylist/easylist/tree/${{ steps.read-revision.outputs.revision }}/easylist_cookie).