Skip to content

Commit

Permalink
AG-17160 release v1.8
Browse files Browse the repository at this point in the history
Merge in ADGUARD-FILTERS/scriptlets from release/v1.8 to master

Squashed commit of the following:

commit c179e6f
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Thu Jan 19 12:42:46 2023 +0300

    update docs

commit 7fa8b46
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Thu Jan 19 12:33:56 2023 +0300

    set v1.8.1 in changelog

commit 35e0e5a
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Wed Jan 18 21:38:19 2023 +0300

    AG-18125 add inject-css-in-shadow-dom scriplet #267

    Merge in ADGUARD-FILTERS/scriptlets from feature/AG-18125 to release/v1.8

    Squashed commit of the following:

    commit 0e8aa2f
    Merge: 25eaaca d6d4662
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 21:14:26 2023 +0300

        Merge branch 'release/v1.8' into feature/AG-18125

    commit 25eaaca
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 19:20:20 2023 +0300

        fix description

    commit 0b78ff2
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 19:19:14 2023 +0300

        fix test and improve hostSelector arg description

    commit 5443317
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 17:47:49 2023 +0300

        improve logging invalid rule and fix  description

    commit 9191fc8
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 17:09:27 2023 +0300

        gaurd CSSStyleSheet constructor

    commit 65f1b08
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 16:44:06 2023 +0300

        guard Proxy and Reflect

    commit 3d351b6
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 16:08:40 2023 +0300

        add image-set to disallowed css functions

    commit b283b30
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 15:14:18 2023 +0300

        update changelog

    commit 95ec59b
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 14:47:59 2023 +0300

        add testcase for complex layout and open root

    commit ca7b9d0
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 18 14:09:43 2023 +0300

        disallow url func in styles and add testcases

    commit ccf8928
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 17 20:43:10 2023 +0300

        add hostSelector, limit selectors to 1 rule and 1 host selectors, add testcase

    commit ed308a9
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 17 16:02:14 2023 +0300

        add css injection via style tag and add testcase

    commit f1a6ff8
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 17 04:50:56 2023 +0300

        remove legacy leftovers

    commit c8808ba
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 17 04:45:18 2023 +0300

        add inject-css-in-shadow-dom scriplet

commit d6d4662
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Wed Jan 18 20:37:59 2023 +0300

    add missing gh issue number to changelog

commit 59528ff
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Tue Jan 17 03:46:53 2023 +0300

    update 1.8 changelog

    Merge in ADGUARD-FILTERS/scriptlets from update_1.8_changelog to release/v1.8

    Squashed commit of the following:

    commit 3e7e3be
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 16 20:11:34 2023 +0300

        add getScriptletFunction change to log

    commit cc63542
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 16 19:08:15 2023 +0300

        update changelog

commit 0b493a8
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Mon Jan 16 16:19:53 2023 +0300

    fix jsdoc tag for trusted-set-constant

commit c8868cb
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Mon Jan 16 15:27:26 2023 +0300

    AG-17126 Update browsers compatibility

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-17126 to release/v1.8

    Squashed commit of the following:

    commit e705cd2
    Merge: e56f305 d09e5ef
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 16 15:16:47 2023 +0300

        Merge branch 'release/v1.8' into fix/AG-17126

    commit e56f305
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 18:58:35 2023 +0300

        remove compatibilityGuartd helper

    commit 7dccc55
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 18:52:33 2023 +0300

        Revert "use isBrowserSupported in tests"

        This reverts commit b7b1156.

    commit 6d4dc6d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 18:42:33 2023 +0300

        revert removing global methods check

    commit bdee33f
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 17:48:38 2023 +0300

        add targets to babel config

    commit 283d0be
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 13:45:17 2023 +0300

        remove attachShadow from isBrowserSupported

    commit 6ee9c62
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 13:39:28 2023 +0300

        remove eslint compat plugin

    commit 94a4d06
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Jan 13 12:38:44 2023 +0300

        fix compat guard

    commit b7b1156
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 15:02:07 2023 +0300

        use isBrowserSupported in tests

    commit 53884e6
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 14:47:53 2023 +0300

        remove legacy wrappers from prevent-setTimeout and prevent-setInterval scriptlets

    commit c19db5d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 14:40:03 2023 +0300

        remove checking global methods in scriptlets

    commit ff07fb5
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 14:16:17 2023 +0300

        improve compatibility check

    commit 71986f3
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 14:28:29 2023 +0300

        remove babel plugins that are included in preset and fix transforms

    commit d415b9c
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 13:40:49 2023 +0300

        remove compat/compat rule and exclusions

    commit 179a7b4
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 13:18:43 2023 +0300

        update babel config

    commit 27a3fda
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 12:35:52 2023 +0300

        fix checkCompatibility injections

    commit fa12a23
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 12:07:07 2023 +0300

        update babel deps

    commit 51056fe
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 11:54:50 2023 +0300

        add compatibility guard

    commit 9531694
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 11:34:36 2023 +0300

        update readme

commit d09e5ef
Merge: 0f789e1 b350a74
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Mon Jan 16 15:02:33 2023 +0300

    merge master

commit 0f789e1
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Fri Jan 13 11:48:02 2023 +0300

    AG-9480 add trusted-set-constant scriptlet #137

    Merge in ADGUARD-FILTERS/scriptlets from feature/AG-9480 to release/v1.8

    Squashed commit of the following:

    commit e69dccd
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 14:49:58 2023 +0300

        improve inferValue description

    commit 3dcf6d4
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 12:59:05 2023 +0300

        add 32767 to const and tweak failing test

    commit 39f1c2d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Jan 12 12:23:50 2023 +0300

        add testcases with string value

    commit bb1960e
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 21:40:48 2023 +0300

        fix and improve description

    commit 68b112c
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 19:37:30 2023 +0300

        improve funcs descriptions and warning

    commit d620833
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 19:17:50 2023 +0300

        improve value type inferred and remove shouldInfer argument

    commit 824e900
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 17:39:17 2023 +0300

        jsdoc set-constant helpers

    commit 71a5451
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 14:58:30 2023 +0300

        fix typos

    commit b9bb8fe
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Jan 11 14:49:07 2023 +0300

        swap 0x7FFF to 32767 everywhere

    commit 4fa3b37
    Merge: 327216a 96e65b4
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 10 14:43:35 2023 +0300

        Merge branch 'release/v1.8' into feature/AG-9480

    commit 327216a
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 10 14:32:47 2023 +0300

        update changelog

    commit 0af2569
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Jan 10 12:55:01 2023 +0300

        fix tests

    commit 726e63d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 9 21:16:26 2023 +0300

        update description

    commit 105ea07
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 9 19:30:05 2023 +0300

        fix helper and add scriptlet tests

    commit bcef888
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 30 18:49:45 2022 +0300

        draft inferValue helper

    commit e45a707
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 29 16:24:04 2022 +0300

        draft trusted-set-constant

commit 96e65b4
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Tue Jan 10 14:36:30 2023 +0300

    AG-17246 fix code style to conform to guidelines

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-17246 to release/v1.8

    Squashed commit of the following:

    commit 62ebaba
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 9 21:20:40 2023 +0300

        remove dashes after param docs

    commit 3e1ea2d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Jan 9 21:18:22 2023 +0300

        swap wildcard to 'any' for param types

    commit 9edacb0
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 30 14:52:40 2022 +0300

        config and apply check-types

    commit 8a17e2d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 30 14:10:50 2022 +0300

        remove unsupported import syntax

    commit c49ebf4
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 29 20:51:12 2022 +0300

        enable rules for helpers p2

    commit 279c589
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 29 20:18:20 2022 +0300

        enable rules for helpers p1

    commit 6e3f5de
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 29 17:04:06 2022 +0300

        split overrides into separate eslint configs

    commit bbffe49
    Merge: 8717f33 0aeb1d5
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 29 16:34:42 2022 +0300

        merge master

    commit 8717f33
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 20:39:28 2022 +0300

        use rules for helpers

    commit 026785f
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 20:03:59 2022 +0300

        fix tag-lines p2

    commit 9a4aa4d
    Merge: 048e32c 89185d3
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 18:48:44 2022 +0300

        merge release/v1.8

    commit 048e32c
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 15:09:30 2022 +0300

        enable jsdoc/require-property-description

    commit c3d3d5d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 14:39:00 2022 +0300

        enable jsdoc/tag-lines

    commit fe47c15
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 14:14:21 2022 +0300

        enable jsdoc/require-returns

    commit f5d898e
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 13:33:58 2022 +0300

        enable jsdoc/newline-after-description

    commit 034db74
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 12:59:12 2022 +0300

        enable jsdoc/check-tag-names

    commit 286558e
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 21:11:37 2022 +0300

        enable jsdoc/require-param-type

    commit b34878a
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 20:59:30 2022 +0300

        enable jsdoc/check-alignment

    commit fe20657
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 20:56:32 2022 +0300

        enable jsdoc/check-types

    commit 4908c90
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 20:48:19 2022 +0300

        enable jsdoc/check-param-names

    ... and 4 more commits

commit 0aeb1d5
Merge: 89185d3 88c982d
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Thu Dec 29 13:55:35 2022 +0300

    merge master

commit 89185d3
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Wed Dec 28 17:56:12 2022 +0300

    AG-13199 rename noopThrow helper into throwFunc

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-13199_01 to release/v1.8

    Squashed commit of the following:

    commit 0278bdf
    Merge: 1fe4d3b b2624bf
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 17:48:57 2022 +0300

        Merge branch 'release/v1.8' into fix/AG-13199_01

    commit 1fe4d3b
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 17:32:01 2022 +0300

        rename noopThrow helper into throwFunc

commit b2624bf
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Wed Dec 28 17:46:11 2022 +0300

    AG-17519 improve logMessage helper and update tests

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-17519 to release/v1.8

    Squashed commit of the following:

    commit f54bbcc
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 28 15:52:35 2022 +0300

        tweak prevent-xhr test

    commit 4060687
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 19:54:06 2022 +0300

        improve helper tests

    commit 855ce89
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 19:14:57 2022 +0300

        fix changelog

    commit 7054753
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 18:48:09 2022 +0300

        remove max-len from tests

    commit f93dc21
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 18:42:29 2022 +0300

        improve naming

    commit 21da001
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 18:30:38 2022 +0300

        update tests

    commit 0903fb6
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 18:10:55 2022 +0300

        improve helper and add tests

    commit 6e3dc40
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 17:21:56 2022 +0300

        improve naming

    commit d4aa78e
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 16:04:39 2022 +0300

        update CHANGELOG

    commit 8342527
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 16:00:11 2022 +0300

        improve logMessage helper and update tests

commit 1caed03
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Tue Dec 27 15:58:26 2022 +0300

    Revert "improve logMessage helper and update tests"

    This reverts commit 56fdd86.

commit 56fdd86
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Tue Dec 27 15:48:12 2022 +0300

    improve logMessage helper and update tests

commit 419d4a0
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Tue Dec 27 13:38:53 2022 +0300

    AG-13199 improve set-constant: noopCallbackFunc, noopThrow

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-13199 to release/v1.8

    Squashed commit of the following:

    commit 8a95806
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 12:53:22 2022 +0300

        tweak trusted-set-cookie test

    commit f7e2f08
    Merge: d681b99 22e41f8
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 12:28:44 2022 +0300

        merge release

    commit d681b99
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 27 12:10:17 2022 +0300

        improve changelog

    commit d1206f0
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 26 20:43:06 2022 +0300

        fix changelog

    commit 34a6b6c
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 26 19:20:57 2022 +0300

        update changelog

    commit 659ec77
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 26 18:44:17 2022 +0300

        improve set-constant, add corresponding helpers and testcases

commit 22e41f8
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Tue Dec 27 12:08:49 2022 +0300

    AG-16616 add decimal delay matching for prevent-setTimeout/-setInterval #247

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-16616 to release/v1.8

    Squashed commit of the following:

    commit 6313c0e
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 26 15:57:57 2022 +0300

        improve helper

    commit 47b9202
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 22 20:40:17 2022 +0300

        tweak buggy test

    commit 55c72f6
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 22 17:29:25 2022 +0300

        fix typo

    commit 72946ad
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 22 12:16:27 2022 +0300

        fix parseRawDelay helper

    commit 5350f36
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 21 20:06:15 2022 +0300

        fix parseRawDelay helper

    commit 369c327
    Merge: dd79e29 6191100
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Wed Dec 21 16:32:20 2022 +0300

        merge release/v1.8

    commit dd79e29
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 19 19:49:08 2022 +0300

        improve helper

    commit 8d52c1b
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 19 18:49:34 2022 +0300

        fix helper description

    commit 28b374d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 19 18:34:22 2022 +0300

        improve descriptions

    commit 6bf00c1
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 19 18:17:55 2022 +0300

        imporve parseRawDelay and move to prevent-utils

    commit 491b35f
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 16 19:34:43 2022 +0300

        fix changelog indents

    commit e35248d
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 16 15:00:53 2022 +0300

        improve and test helper

    commit baca1d8
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 15 21:21:10 2022 +0300

        improve raw delay parsing

    commit e0e6698
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 15 19:24:40 2022 +0300

        add typecheck for delay + tests

    commit 60505e9
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 15 19:06:15 2022 +0300

        update scriptlets descriptions, fix typo in changelog

    commit f4b48ce
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 15 17:03:37 2022 +0300

        add decimal delay matching for prevent-setTimeout/-setInterval

commit 6191100
Merge: 2c10348 049012a
Author: Stanislav A <s.atroschenko@adguard.com>
Date:   Wed Dec 21 16:21:47 2022 +0300

    merge master

commit 2c10348
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Tue Dec 20 17:09:28 2022 +0300

    AG-17905 fix closure bug for prevent-xhr and trusted-replace-xhr-response #261

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-17905 to release/v1.8

    Squashed commit of the following:

    commit 09626a3
    Merge: 25c9820 f0fbd11
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 20 16:53:59 2022 +0300

        Merge branch 'release/v1.8' into fix/AG-17905

    commit 25c9820
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Tue Dec 20 13:29:55 2022 +0300

        update changelog and fix typos in test

    commit 6973376
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 19 22:10:18 2022 +0300

        add tests

    commit 492da8f
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 16 21:40:20 2022 +0300

        fix closure bug for trusted-replace-xhr-response

    commit 4f1d59b
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 16 21:24:30 2022 +0300

        fix closure bug for prevent-xhr and add testcase

commit f0fbd11
Author: Stanislav Atroschenko <s.atroschenko@adguard.com>
Date:   Mon Dec 19 20:01:21 2022 +0300

    AG-18132 handle getScriptletFunction calls on unknown scriptlet names

    Merge in ADGUARD-FILTERS/scriptlets from fix/AG-18132 to release/v1.8

    Squashed commit of the following:

    commit 0beb472
    Merge: 481ed62 7fd04c9
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Mon Dec 19 19:55:37 2022 +0300

        Merge branch 'release/v1.8' into fix/AG-18132

    commit 481ed62
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Fri Dec 16 21:57:14 2022 +0300

        add comment

    commit dc38b52
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 15 21:41:26 2022 +0300

        refactor and update readme

    commit 35440f5
    Author: Stanislav A <s.atroschenko@adguard.com>
    Date:   Thu Dec 15 19:53:30 2022 +0300

        Handle getScriptletFunction calls on unknown scriptlet names

... and 4 more commits
  • Loading branch information
stanislav-atr committed Jan 19, 2023
1 parent b350a74 commit b1e0bda
Show file tree
Hide file tree
Showing 176 changed files with 3,919 additions and 2,552 deletions.
29 changes: 0 additions & 29 deletions .eslintrc

This file was deleted.

48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
extends: [
'airbnb-base',
'plugin:jsdoc/recommended',
],
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
rootMode: 'upward',
},
},
env: {
browser: true,
qunit: true,
},
rules: {
'max-len': [
'error',
{
code: 120,
ignoreUrls: true,
},
],
indent: ['error', 4, { SwitchCase: 1 }],
'no-param-reassign': 0,
'no-shadow': 0,
'import/prefer-default-export': 0,
'arrow-body-style': 0,
'import/no-extraneous-dependencies': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': 0,
// jsdoc rules
'jsdoc/check-tag-names': ['error', { definedTags: ['scriptlet', 'trustedScriptlet', 'redirect'] }],
'jsdoc/require-jsdoc': 0,
'jsdoc/require-param': 0,
'jsdoc/valid-types': 0,
'jsdoc/no-undefined-types': 0,
'jsdoc/require-param-description': 0,
'jsdoc/require-returns-description': 0,
},
settings: {
jsdoc: {
preferredTypes: {
object: 'Object',
},
},
},
};
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
yarn test
75 changes: 46 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Scriptlets and Redirect Resources Changelog

## v1.8.1

### Added
- new `trusted-set-constant` scriptlet [#137](https://github.com/AdguardTeam/Scriptlets/issues/137)
- new `inject-css-in-shadow-dom` scriptlet [#267](https://github.com/AdguardTeam/Scriptlets/issues/267)
- `throwFunc` and `noopCallbackFunc` prop values for `set-constant` scriptlet
- `recreateIframeForSlot` method mock to `googletagservices-gpt` redirect [#259](https://github.com/AdguardTeam/Scriptlets/issues/259)

### Changed

- add decimal delay matching for `prevent-setInterval` and `prevent-setTimeout` [#247](https://github.com/AdguardTeam/Scriptlets/issues/247)
- debug logging to include rule text when available
- `getScriptletFunction` calls to throw error on unknown scriptlet names

### Fixed

- `prevent-xhr` and `trusted-replace-xhr-response` closure bug on multiple requests [#261](https://github.com/AdguardTeam/Scriptlets/issues/261)
- missing `googletagmanager-gtm` in compatibility table

## v1.7.20

### Added
Expand Down Expand Up @@ -31,44 +50,42 @@

* `isEmptyObject` helper not counting `prototype` as an object property


## v1.7.10

### Added

* new scriptlet `trusted-set-cookie-reload`
- new scriptlet `trusted-set-cookie-reload`

### Fixed

* `set-cookie-reload` infinite page reloading [#265](https://github.com/AdguardTeam/Scriptlets/issues/265)
* breakage of `prevent-element-src-loading` due to `window` getting into `apply` wrapper [#264](https://github.com/AdguardTeam/Scriptlets/issues/264)
* spread of args bug at `getXhrData` call for `trusted-replace-xhr-response`
* request properties array not being served to `getRequestData` and `parseMatchProps` helpers

- `set-cookie-reload` infinite page reloading [#265](https://github.com/AdguardTeam/Scriptlets/issues/265)
- breakage of `prevent-element-src-loading` due to `window` getting into `apply` wrapper [#264](https://github.com/AdguardTeam/Scriptlets/issues/264)
- spread of args bug at `getXhrData` call for `trusted-replace-xhr-response`
- request properties array not being served to `getRequestData` and `parseMatchProps` helpers

## v1.7.3

### Added

* [Trusted scriptlets](./README.md#trusted-scriptlets) with extended capabilities:
* trusted-click-element [#23](https://github.com/AdguardTeam/Scriptlets/issues/23)
* trusted-replace-xhr-response [#202](https://github.com/AdguardTeam/Scriptlets/issues/202)
* trusted-replace-fetch-response
* trusted-set-local-storage-item
* trusted-set-cookie

* Scriptlets:
* xml-prune [#249](https://github.com/AdguardTeam/Scriptlets/issues/249)

### Improved

* Scriptlets:
* prevent-element-src-loading [#228](https://github.com/AdguardTeam/Scriptlets/issues/228)
* prevent-fetch [#216](https://github.com/AdguardTeam/Scriptlets/issues/216)
* abort-on-stack-trace [#201](https://github.com/AdguardTeam/Scriptlets/issues/201)
* abort-current-inline-script [#251](https://github.com/AdguardTeam/Scriptlets/issues/251)
* set-cookie & set-cookie-reload
* Redirects:
* google-ima3 [#255](https://github.com/AdguardTeam/Scriptlets/issues/255)
* metrika-yandex-tag [#254](https://github.com/AdguardTeam/Scriptlets/issues/254)
* googlesyndication-adsbygoogle [#252](https://github.com/AdguardTeam/Scriptlets/issues/252)
- [Trusted scriptlets](./README.md#trusted-scriptlets) with extended capabilities:
- `trusted-click-element` [#23](https://github.com/AdguardTeam/Scriptlets/issues/23)
- `trusted-replace-xhr-response` [#202](https://github.com/AdguardTeam/Scriptlets/issues/202)
- `trusted-replace-fetch-response`
- `trusted-set-local-storage-item`
- `trusted-set-cookie`

- Scriptlets:
- `xml-prune` [#249](https://github.com/AdguardTeam/Scriptlets/issues/249)

### Changed

- Scriptlets:
- `prevent-element-src-loading` [#228](https://github.com/AdguardTeam/Scriptlets/issues/228)
- `prevent-fetch` [#216](https://github.com/AdguardTeam/Scriptlets/issues/216)
- `abort-on-stack-trace` [#201](https://github.com/AdguardTeam/Scriptlets/issues/201)
- `abort-current-inline-script` [#251](https://github.com/AdguardTeam/Scriptlets/issues/251)
- `set-cookie` & `set-cookie-reload`
- Redirects:
- `google-ima3` [#255](https://github.com/AdguardTeam/Scriptlets/issues/255)
- `metrika-yandex-tag` [#254](https://github.com/AdguardTeam/Scriptlets/issues/254)
- `googlesyndication-adsbygoogle` [#252](https://github.com/AdguardTeam/Scriptlets/issues/252)
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ And also there is a module at `dist/scriptlets.js` which has been exported to a

```javascript
/**
* Returns scriptlet code
* Returns scriptlet code by param
* @param {Source} source
* @returns {string}
* @returns {string|null} scriptlet code
* @throws on unknown scriptlet name
*/
scriptlets.invoke(source);
```
Expand Down Expand Up @@ -514,9 +515,14 @@ There are two scripts to update wiki:
2. `yarn wiki:build-docs` — updates wiki pages `about-scriptlets.md` and `about-redirects.md`. They are being generated from JSDoc-type comments of corresponding scriptlets and redirects source files due to `@scriptlet`/`@redirect` and `@description` tags. Runs automatically while the release build.

## <a id="browser-compatibility"> Browser Compatibility
| Chrome | Edge | Firefox | IE | Opera | Safari |
| ------ | ---- | ------- | --- | ----- | ------ |
| 55 | 15 | 52 | 11 | 42 | 10 |
| Browser | Version |
|-----------------------|:----------|
| Chrome | ✅ 55 |
| Firefox | ✅ 52 |
| Edge | ✅ 15 |
| Opera | ✅ 42 |
| Safari | ✅ 11 |
| Internet Explorer ||

## <a id="used-by"> Projects using Scriptlets
* [CoreLibs](https://github.com/AdguardTeam/CoreLibs) (updates automatically)
Expand Down
24 changes: 19 additions & 5 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,31 @@ module.exports = (api) => {
const config = {
presets: [
[
'@babel/env',
'@babel/preset-env',
{
exclude: ['transform-typeof-symbol'],
exclude: [
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-transform-regenerator',
'@babel/plugin-transform-typeof-symbol',
'@babel/plugin-transform-computed-properties',
],
targets: [
'last 1 version',
'> 1%',
// ie 11 is dead and no longer supported
'not dead',
'chrome >= 55',
'firefox >= 52',
'edge >= 15',
'opera >= 42',
'safari >= 11',
],
},
],
],
plugins: [
'@babel/plugin-transform-regenerator',
'@babel/plugin-transform-runtime',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-transform-arrow-functions',
],
};

Expand Down
30 changes: 8 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adguard/scriptlets",
"version": "1.7.23",
"version": "1.8.0",
"description": "AdGuard's JavaScript library of Scriptlets and Redirect resources",
"scripts": {
"build": "babel-node bundler.js",
Expand All @@ -20,11 +20,6 @@
"eslint"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"author": "AdGuard",
"license": "GPL-3.0",
"repository": {
Expand All @@ -48,15 +43,12 @@
"js-yaml": "^3.13.1"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.20.5",
"@babel/eslint-parser": "^7.16.5",
"@babel/node": "^7.8.7",
"@babel/plugin-proposal-class-properties": "^7.16.5",
"@babel/plugin-proposal-private-methods": "^7.16.5",
"@babel/plugin-transform-regenerator": "^7.7.0",
"@babel/cli": "^7.20.7",
"@babel/core": "^7.20.12",
"@babel/eslint-parser": "^7.19.1",
"@babel/node": "^7.20.7",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.9.0",
"@babel/preset-env": "^7.20.2",
"@rollup/plugin-babel": "^5.0.4",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0",
Expand All @@ -72,10 +64,10 @@
"dox": "^0.9.0",
"eslint": "^7.25.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^39.6.4",
"fs-extra": "^10.0.1",
"husky": "^3.1.0",
"husky": "~8.0.2",
"js-reporters": "^2.1.0",
"kleur": "^4.1.4",
"lint-staged": "^12.1.2",
Expand All @@ -91,11 +83,5 @@
},
"files": [
"dist"
],
"browserslist": [
"last 1 versions",
"chrome >= 55",
"safari >= 10",
"ie >= 9"
]
}
13 changes: 6 additions & 7 deletions scripts/build-compatibility-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ const WIKI_COMPATIBILITY_TABLE_PATH = path.resolve(

/**
* @typedef {Object} CompatibilityItem
* @property {string} adg
* @property {string} abp
* @property {string} ubo
* @property {string} adg AdGuard name
* @property {string} abp Adblock Plus name
* @property {string} ubo uBlock name
*/

/**
* @typedef {Object} CompatibilityData
* @property {CompatibilityItem[]} scriptlets
* @property {CompatibilityItem[]} redirects
* @property {CompatibilityItem[]} scriptlets list of scriptlets compatibility items
* @property {CompatibilityItem[]} redirects list of redirects compatibility items
*/

/**
Expand All @@ -50,7 +50,6 @@ const getTableData = () => {
* @param {string} item.adg AdGuard name
* @param {string} item.abp Adblock Plus name
* @param {string} item.ubo uBlock name
*
* @returns {string} markdown table row
*/
const getRow = (id, { adg, abp, ubo }) => {
Expand All @@ -77,10 +76,10 @@ const getTableHeader = () => {

/**
* Builds markdown string of scriptlets/redirect compatibility table
*
* @param {string} title title for scriptlets or redirects
* @param {CompatibilityItem[]} data array of scriptlets or redirects compatibility data items
* @param {'scriptlets'|'redirects'} id
*
* @returns {string} scriptlets or redirects compatibility table
*/
const buildTable = (title, data = [], id = '') => {
Expand Down
3 changes: 2 additions & 1 deletion scripts/build-corelibs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { version } from '../package.json';
import { writeFile } from './helpers';

const buildCorelibsJson = async () => {
const { getScriptletFunction } = require('../tmp/scriptlets-func'); // eslint-disable-line import/no-unresolved,global-require
// eslint-disable-next-line import/no-unresolved,global-require
const { getScriptletFunction } = require('../tmp/scriptlets-func');

const scriptlets = await Promise.all(Object
.values(scriptletList)
Expand Down
6 changes: 3 additions & 3 deletions scripts/build-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ const aboutTrustedScriptletsPath = path.resolve(
);

/**
* Collects required comments from files and
* returns describing object for scriptlets and redirects
* Collects required comments from files
*
* @returns {Object} describing object for scriptlets and redirects
*/
const manageDataFromFiles = () => {
const dataFromScriptletsFiles = getDataFromFiles(
Expand Down Expand Up @@ -95,7 +96,6 @@ const manageDataFromFiles = () => {
* Generates markdown list and describing text.
*
* @param {DescribingCommentData[]} dataItems array of comment data objects
*
* @returns {MarkdownData}
*/
const getMarkdownData = (dataItems) => {
Expand Down
Loading

0 comments on commit b1e0bda

Please sign in to comment.