Skip to content

Commit 8feb2d0

Browse files
committed
Pull request 694: AG-38291 esm pure scriptlets
Squashed commit of the following: commit 4d6f129 Author: Maxim Topciu <[email protected]> Date: Tue Dec 17 20:41:16 2024 +0300 Pull request 692: AG-38291 update agtree and make scriptlets esm pure Squashed commit of the following: commit c862505 Author: Maxim Topciu <[email protected]> Date: Tue Dec 17 19:22:51 2024 +0200 AG-38291 Remove outdated test scriptlets package (test-adguard-scriptlets-2.1.0.tgz) commit 71aafdd Author: Maxim Topciu <[email protected]> Date: Tue Dec 17 19:00:41 2024 +0200 AG-38291 Update @adguard/agtree dependency to version 3.0.0-alpha.2 and add new test scriptlets package commit 0dcb350 Author: Maxim Topciu <[email protected]> Date: Tue Dec 17 19:00:24 2024 +0200 AG-38291 Update @adguard/agtree dependency to version 3.0.0-alpha.2 and remove outdated test scriptlets package commit 7984ff6 Author: Maxim Topciu <[email protected]> Date: Tue Dec 17 18:00:10 2024 +0200 AG-38291 update for test scriptlets once more commit a90f0fe Author: Maxim Topciu <[email protected]> Date: Wed Dec 11 19:24:04 2024 +0200 AG-38291 update scriptlets commit 024b4ac Author: Maxim Topciu <[email protected]> Date: Mon Dec 9 18:10:59 2024 +0200 AG-38289 add agtree dependency commit bc9b0f0 Author: Maxim Topciu <[email protected]> Date: Mon Dec 9 17:28:58 2024 +0200 AG-38289 update agtree commit 32ff53c Author: Maxim Topciu <[email protected]> Date: Mon Dec 9 11:31:11 2024 +0200 AG-38289 improve import commit f0dbc67 Author: Maxim Topciu <[email protected]> Date: Mon Dec 9 11:26:03 2024 +0200 AG-38289 use modules from node more explicitly commit fccba30 Author: Maxim Topciu <[email protected]> Date: Mon Dec 9 11:23:21 2024 +0200 AG-38289 add changelog note commit 324ed44 Author: Maxim Topciu <[email protected]> Date: Mon Dec 9 11:21:52 2024 +0200 AG-38289 improve documentation commit f1b4366 Author: Maxim Topciu <[email protected]> Date: Fri Dec 6 17:14:08 2024 +0200 AG-38289 add build for tests commit ecfe90d Author: Maxim Topciu <[email protected]> Date: Fri Dec 6 17:11:38 2024 +0200 AG-38291 update smoke test commit ca63915 Author: Maxim Topciu <[email protected]> Date: Fri Dec 6 17:08:39 2024 +0200 AG-38289 import from agtree entrypoint commit c395adb Author: Maxim Topciu <[email protected]> Date: Fri Dec 6 16:46:04 2024 +0200 AG-38289 update version commit d8052d9 Author: Maxim Topciu <[email protected]> Date: Fri Dec 6 16:42:22 2024 +0200 AG-38289 build esm only commit 33c934e Author: Maxim Topciu <[email protected]> Date: Thu Dec 5 20:28:57 2024 +0200 AG-38289 build esm only commit 9c66676 Author: Maxim Topciu <[email protected]> Date: Thu Dec 5 21:07:35 2024 +0300 AG-38289 introduce vitest in the scriptlets Merge in ADGUARD-FILTERS/scriptlets from fix/AG-38289 to fix/AG-38291 Squashed commit of the following: commit 6287cde Author: Maxim Topciu <[email protected]> Date: Thu Dec 5 19:43:20 2024 +0200 AG-38289 fix json format commit 75b5506 Author: Maxim Topciu <[email protected]> Date: Thu Dec 5 19:42:56 2024 +0200 AG-38289 fix json format commit f19c8f2 Author: Maxim Topciu <[email protected]> Date: Thu Dec 5 19:10:29 2024 +0200 AG-38289 introduce vitest in the scriptlets commit c4f812f Author: Maxim Topciu <[email protected]> Date: Thu Dec 5 19:08:40 2024 +0200 AG-38291 update agtree
1 parent d12f6bf commit 8feb2d0

File tree

314 files changed

+1329
-52094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

314 files changed

+1329
-52094
lines changed

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
1-
const path = require('path');
1+
const path = require('node:path');
22

33
const MAX_LINE_LENGTH = 120;
44

55
module.exports = {
6-
parser: '@babel/eslint-parser',
7-
parserOptions: {
8-
babelOptions: {
9-
rootMode: 'upward',
10-
},
11-
},
6+
parser: '@typescript-eslint/parser',
127
ignorePatterns: ['tests/smoke/**'],
138
env: {
149
browser: true,
1510
qunit: true,
16-
jest: true,
1711
},
1812
extends: [
1913
'airbnb-base',
@@ -35,6 +29,9 @@ module.exports = {
3529
indent: ['error', 4, {
3630
SwitchCase: 1,
3731
}],
32+
'no-underscore-dangle': ['error', {
33+
allow: ['__filename', '__dirname'],
34+
}],
3835
'import/extensions': ['error', 'never', { json: 'always' }],
3936
'no-param-reassign': 0,
4037
'no-shadow': 0,
@@ -121,12 +118,14 @@ module.exports = {
121118
'@typescript-eslint/indent': ['error', 4],
122119
'@typescript-eslint/interface-name-prefix': 0,
123120
'@typescript-eslint/no-non-null-assertion': 0,
121+
'import/no-extraneous-dependencies': 'off',
124122
'@typescript-eslint/type-annotation-spacing': [
125123
'error',
126124
{
127125
after: true,
128126
},
129127
],
128+
'prefer-object-spread': 0,
130129
},
131130
},
132131
// Array destructuring is not allowed according to the

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ local.log
1616
.eslintcache
1717
tsconfig.tsbuildinfo
1818
.pnpm-store
19+
/dist

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic
1414

1515
### Changed
1616

17+
- ESM-only bundle
1718
- `trusted-click-element` scriptlet, now when `containsText` is used then it will search for all given selectors
1819
and click on the first element with matched text [#468]
1920

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ yarn dev
235235

236236
### <a name="how-to-test"></a> How to test
237237

238-
Some tests are run in QUnit, some in Jest.
238+
Some tests are run in QUnit, some in Vitest.
239239

240240
Run all tests:
241241

@@ -272,14 +272,14 @@ pnpm test
272272
1. Run all jest tests:
273273
274274
```bash
275-
pnpm test:jest
275+
pnpm test:vitest
276276
```
277277
278-
or limit the testing — `testRegex` may be specified in `jest.config.js`
279-
or specify [test name](https://jestjs.io/docs/cli#--testnamepatternregex) in command line, e.g.:
278+
or limit the testing — `include` may be specified in `vitest.config.ts`
279+
or specify [test name](https://vitest.dev/guide/filtering#cli) in command line, e.g.:
280280
281281
```bash
282-
pnpm test:jest -t isValidScriptletRule
282+
pnpm test:vitest -t isValidScriptletRule
283283
```
284284
285285
To run browserstack tests create `.env` file or copy and rename `.env-example`.

browserstack.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
const webdriver = require('selenium-webdriver');
33
const BrowserStackLocal = require('browserstack-local');
44
const dotenv = require('dotenv');
5-
const path = require('path');
6-
const fs = require('fs');
5+
const path = require('node:path');
6+
const fs = require('node:fs');
77
const kleur = require('kleur');
88

99
const {

dist/build.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/cjs/converters/converters.js

Lines changed: 0 additions & 62 deletions
This file was deleted.

dist/cjs/converters/index.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

dist/cjs/helpers/get-error-message.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

dist/cjs/helpers/injector.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)