@duckduckgo/autoconsent 5.1.0 → 5.3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ # v5.3.0 (Wed Aug 09 2023)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - Fix the target ES version to avoid surprises downstream [#227](https://github.com/duckduckgo/autoconsent/pull/227) ([@muodov](https://github.com/muodov))
6
+
7
+ #### Authors: 1
8
+
9
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
10
+
11
+ ---
12
+
13
+ # v5.2.0 (Thu Aug 03 2023)
14
+
15
+ #### 🚀 Enhancement
16
+
17
+ - Bump tslib from 2.5.3 to 2.6.1 [#217](https://github.com/duckduckgo/autoconsent/pull/217) ([@dependabot[bot]](https://github.com/dependabot[bot]))
18
+ - Bump @puppeteer/replay from 2.11.0 to 2.13.2 [#216](https://github.com/duckduckgo/autoconsent/pull/216) ([@dependabot[bot]](https://github.com/dependabot[bot]))
19
+ - Bump eslint from 8.45.0 to 8.46.0 [#215](https://github.com/duckduckgo/autoconsent/pull/215) ([@dependabot[bot]](https://github.com/dependabot[bot]))
20
+
21
+ #### 🐛 Bug Fix
22
+
23
+ - Bump @types/chrome from 0.0.241 to 0.0.242 [#218](https://github.com/duckduckgo/autoconsent/pull/218) ([@dependabot[bot]](https://github.com/dependabot[bot]))
24
+ - Add rules for twitch.tv and kleinanzeigen.de [#220](https://github.com/duckduckgo/autoconsent/pull/220) ([@muodov](https://github.com/muodov))
25
+
26
+ #### Authors: 2
27
+
28
+ - [@dependabot[bot]](https://github.com/dependabot[bot])
29
+ - Maxim Tsoy ([@muodov](https://github.com/muodov))
30
+
31
+ ---
32
+
1
33
  # v5.1.0 (Mon Jul 31 2023)
2
34
 
3
35
  #### 🚀 Enhancement
package/build.sh CHANGED
@@ -4,8 +4,8 @@ set -ex
4
4
  ESBUILD="node_modules/.bin/esbuild --bundle"
5
5
 
6
6
  $ESBUILD --format=iife --target=chrome90 --minify playwright/content.ts --outfile=dist/autoconsent.playwright.js
7
- $ESBUILD --format=esm lib/web.ts --outfile=dist/autoconsent.esm.js
8
- $ESBUILD --format=cjs --platform=node lib/web.ts --outfile=dist/autoconsent.cjs.js
7
+ $ESBUILD --format=esm --target=es2021 lib/web.ts --outfile=dist/autoconsent.esm.js
8
+ $ESBUILD --format=cjs --target=es2021 --platform=node lib/web.ts --outfile=dist/autoconsent.cjs.js
9
9
 
10
10
  # Extension
11
11
  $ESBUILD addon/background.ts --outfile=dist/addon-mv3/background.bundle.js
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 2,
3
3
  "name": "Autoconsent",
4
- "version": "2023.7.18",
4
+ "version": "2023.8.3",
5
5
  "background": {
6
6
  "scripts": [
7
7
  "background.bundle.js"
@@ -2408,12 +2408,12 @@
2408
2408
  ],
2409
2409
  "detectCmp": [
2410
2410
  {
2411
- "exists": ".consent-banner"
2411
+ "exists": ".consent-banner .consent-banner__actions"
2412
2412
  }
2413
2413
  ],
2414
2414
  "detectPopup": [
2415
2415
  {
2416
- "exists": ".consent-banner"
2416
+ "visible": ".consent-banner .consent-banner__actions"
2417
2417
  }
2418
2418
  ],
2419
2419
  "optIn": [
@@ -2517,6 +2517,73 @@
2517
2517
  ],
2518
2518
  "test": []
2519
2519
  },
2520
+ {
2521
+ "name": "kleinanzeigen-de",
2522
+ "runContext": {
2523
+ "urlPattern": "^https?://(www\\.)?kleinanzeigen\\.de"
2524
+ },
2525
+ "prehideSelectors": [
2526
+ "#gdpr-banner-container"
2527
+ ],
2528
+ "detectCmp": [
2529
+ {
2530
+ "any": [
2531
+ {
2532
+ "exists": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-cmp-button]"
2533
+ },
2534
+ {
2535
+ "exists": "#ConsentManagementPage"
2536
+ }
2537
+ ]
2538
+ }
2539
+ ],
2540
+ "detectPopup": [
2541
+ {
2542
+ "any": [
2543
+ {
2544
+ "visible": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-cmp-button]"
2545
+ },
2546
+ {
2547
+ "visible": "#ConsentManagementPage"
2548
+ }
2549
+ ]
2550
+ }
2551
+ ],
2552
+ "optIn": [
2553
+ {
2554
+ "if": {
2555
+ "exists": "#gdpr-banner-container #gdpr-banner"
2556
+ },
2557
+ "then": [
2558
+ {
2559
+ "click": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-accept]"
2560
+ }
2561
+ ],
2562
+ "else": [
2563
+ {
2564
+ "click": "#ConsentManagementPage .Button-primary"
2565
+ }
2566
+ ]
2567
+ }
2568
+ ],
2569
+ "optOut": [
2570
+ {
2571
+ "if": {
2572
+ "exists": "#gdpr-banner-container #gdpr-banner"
2573
+ },
2574
+ "then": [
2575
+ {
2576
+ "click": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-cmp-button]"
2577
+ }
2578
+ ],
2579
+ "else": [
2580
+ {
2581
+ "click": "#ConsentManagementPage .Button-secondary"
2582
+ }
2583
+ ]
2584
+ }
2585
+ ]
2586
+ },
2520
2587
  {
2521
2588
  "name": "linkedin.com",
2522
2589
  "prehideSelectors": [
@@ -4291,6 +4358,55 @@
4291
4358
  }
4292
4359
  ]
4293
4360
  },
4361
+ {
4362
+ "name": "twitch.tv",
4363
+ "runContext": {
4364
+ "urlPattern": "^https?://(www\\.)?twitch\\.tv"
4365
+ },
4366
+ "prehideSelectors": [
4367
+ "div:has(> .consent-banner .consent-banner__content--gdpr-v2),.ReactModalPortal:has([data-a-target=consent-modal-save])"
4368
+ ],
4369
+ "detectCmp": [
4370
+ {
4371
+ "exists": ".consent-banner .consent-banner__content--gdpr-v2"
4372
+ }
4373
+ ],
4374
+ "detectPopup": [
4375
+ {
4376
+ "visible": ".consent-banner .consent-banner__content--gdpr-v2"
4377
+ }
4378
+ ],
4379
+ "optIn": [
4380
+ {
4381
+ "click": "button[data-a-target=\"consent-banner-accept\"]"
4382
+ }
4383
+ ],
4384
+ "optOut": [
4385
+ {
4386
+ "hide": [
4387
+ "div:has(> .consent-banner .consent-banner__content--gdpr-v2)"
4388
+ ]
4389
+ },
4390
+ {
4391
+ "click": "button[data-a-target=\"consent-banner-manage-preferences\"]"
4392
+ },
4393
+ {
4394
+ "waitFor": "input[type=checkbox][data-a-target=tw-checkbox]"
4395
+ },
4396
+ {
4397
+ "click": "input[type=checkbox][data-a-target=tw-checkbox][checked]:not([disabled])",
4398
+ "all": true,
4399
+ "optional": true
4400
+ },
4401
+ {
4402
+ "waitForThenClick": "[data-a-target=consent-modal-save]"
4403
+ },
4404
+ {
4405
+ "waitForVisible": ".ReactModalPortal:has([data-a-target=consent-modal-save])",
4406
+ "check": "none"
4407
+ }
4408
+ ]
4409
+ },
4294
4410
  {
4295
4411
  "name": "twitter",
4296
4412
  "runContext": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "Autoconsent",
4
- "version": "2023.7.18",
4
+ "version": "2023.8.3",
5
5
  "background": {
6
6
  "service_worker": "background.bundle.js"
7
7
  },
@@ -2408,12 +2408,12 @@
2408
2408
  ],
2409
2409
  "detectCmp": [
2410
2410
  {
2411
- "exists": ".consent-banner"
2411
+ "exists": ".consent-banner .consent-banner__actions"
2412
2412
  }
2413
2413
  ],
2414
2414
  "detectPopup": [
2415
2415
  {
2416
- "exists": ".consent-banner"
2416
+ "visible": ".consent-banner .consent-banner__actions"
2417
2417
  }
2418
2418
  ],
2419
2419
  "optIn": [
@@ -2517,6 +2517,73 @@
2517
2517
  ],
2518
2518
  "test": []
2519
2519
  },
2520
+ {
2521
+ "name": "kleinanzeigen-de",
2522
+ "runContext": {
2523
+ "urlPattern": "^https?://(www\\.)?kleinanzeigen\\.de"
2524
+ },
2525
+ "prehideSelectors": [
2526
+ "#gdpr-banner-container"
2527
+ ],
2528
+ "detectCmp": [
2529
+ {
2530
+ "any": [
2531
+ {
2532
+ "exists": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-cmp-button]"
2533
+ },
2534
+ {
2535
+ "exists": "#ConsentManagementPage"
2536
+ }
2537
+ ]
2538
+ }
2539
+ ],
2540
+ "detectPopup": [
2541
+ {
2542
+ "any": [
2543
+ {
2544
+ "visible": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-cmp-button]"
2545
+ },
2546
+ {
2547
+ "visible": "#ConsentManagementPage"
2548
+ }
2549
+ ]
2550
+ }
2551
+ ],
2552
+ "optIn": [
2553
+ {
2554
+ "if": {
2555
+ "exists": "#gdpr-banner-container #gdpr-banner"
2556
+ },
2557
+ "then": [
2558
+ {
2559
+ "click": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-accept]"
2560
+ }
2561
+ ],
2562
+ "else": [
2563
+ {
2564
+ "click": "#ConsentManagementPage .Button-primary"
2565
+ }
2566
+ ]
2567
+ }
2568
+ ],
2569
+ "optOut": [
2570
+ {
2571
+ "if": {
2572
+ "exists": "#gdpr-banner-container #gdpr-banner"
2573
+ },
2574
+ "then": [
2575
+ {
2576
+ "click": "#gdpr-banner-container #gdpr-banner [data-testid=gdpr-banner-cmp-button]"
2577
+ }
2578
+ ],
2579
+ "else": [
2580
+ {
2581
+ "click": "#ConsentManagementPage .Button-secondary"
2582
+ }
2583
+ ]
2584
+ }
2585
+ ]
2586
+ },
2520
2587
  {
2521
2588
  "name": "linkedin.com",
2522
2589
  "prehideSelectors": [
@@ -4291,6 +4358,55 @@
4291
4358
  }
4292
4359
  ]
4293
4360
  },
4361
+ {
4362
+ "name": "twitch.tv",
4363
+ "runContext": {
4364
+ "urlPattern": "^https?://(www\\.)?twitch\\.tv"
4365
+ },
4366
+ "prehideSelectors": [
4367
+ "div:has(> .consent-banner .consent-banner__content--gdpr-v2),.ReactModalPortal:has([data-a-target=consent-modal-save])"
4368
+ ],
4369
+ "detectCmp": [
4370
+ {
4371
+ "exists": ".consent-banner .consent-banner__content--gdpr-v2"
4372
+ }
4373
+ ],
4374
+ "detectPopup": [
4375
+ {
4376
+ "visible": ".consent-banner .consent-banner__content--gdpr-v2"
4377
+ }
4378
+ ],
4379
+ "optIn": [
4380
+ {
4381
+ "click": "button[data-a-target=\"consent-banner-accept\"]"
4382
+ }
4383
+ ],
4384
+ "optOut": [
4385
+ {
4386
+ "hide": [
4387
+ "div:has(> .consent-banner .consent-banner__content--gdpr-v2)"
4388
+ ]
4389
+ },
4390
+ {
4391
+ "click": "button[data-a-target=\"consent-banner-manage-preferences\"]"
4392
+ },
4393
+ {
4394
+ "waitFor": "input[type=checkbox][data-a-target=tw-checkbox]"
4395
+ },
4396
+ {
4397
+ "click": "input[type=checkbox][data-a-target=tw-checkbox][checked]:not([disabled])",
4398
+ "all": true,
4399
+ "optional": true
4400
+ },
4401
+ {
4402
+ "waitForThenClick": "[data-a-target=consent-modal-save]"
4403
+ },
4404
+ {
4405
+ "waitForVisible": ".ReactModalPortal:has([data-a-target=consent-modal-save])",
4406
+ "check": "none"
4407
+ }
4408
+ ]
4409
+ },
4294
4410
  {
4295
4411
  "name": "twitter",
4296
4412
  "runContext": {
@@ -1225,10 +1225,7 @@ var all_default = rules;
1225
1225
  var rules2 = all_default;
1226
1226
 
1227
1227
  // lib/consentomatic/tools.ts
1228
- var Tools = class _Tools {
1229
- static {
1230
- this.base = null;
1231
- }
1228
+ var _Tools = class _Tools {
1232
1229
  static setBase(base) {
1233
1230
  _Tools.base = base;
1234
1231
  }
@@ -1395,6 +1392,8 @@ var Tools = class _Tools {
1395
1392
  }
1396
1393
  }
1397
1394
  };
1395
+ _Tools.base = null;
1396
+ var Tools = _Tools;
1398
1397
 
1399
1398
  // lib/consentomatic/index.ts
1400
1399
  function matches(config) {
@@ -1198,10 +1198,7 @@ var all_default = rules;
1198
1198
  var rules2 = all_default;
1199
1199
 
1200
1200
  // lib/consentomatic/tools.ts
1201
- var Tools = class _Tools {
1202
- static {
1203
- this.base = null;
1204
- }
1201
+ var _Tools = class _Tools {
1205
1202
  static setBase(base) {
1206
1203
  _Tools.base = base;
1207
1204
  }
@@ -1368,6 +1365,8 @@ var Tools = class _Tools {
1368
1365
  }
1369
1366
  }
1370
1367
  };
1368
+ _Tools.base = null;
1369
+ var Tools = _Tools;
1371
1370
 
1372
1371
  // lib/consentomatic/index.ts
1373
1372
  function matches(config) {