apify-test-tools 0.5.4 → 0.5.6
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/.github/scripts/before-beta-release.js +36 -0
- package/.github/workflows/_check_code.yaml +80 -0
- package/.github/workflows/_tests.yaml +35 -0
- package/.github/workflows/_update_release_metadata.yaml +86 -0
- package/.github/workflows/manual_publish_to_npm.yaml +51 -0
- package/.github/workflows/manual_release_stable.yaml +80 -0
- package/.github/workflows/on_master.yaml +56 -0
- package/.github/workflows/on_pull_request.yaml +25 -0
- package/CHANGELOG.md +8 -0
- package/dist/bin/build.d.ts.map +1 -1
- package/dist/bin/git.d.ts.map +1 -1
- package/dist/bin/github.d.ts.map +1 -1
- package/dist/bin/slack.d.ts.map +1 -1
- package/dist/bin/test-report.d.ts.map +1 -1
- package/dist/bin/utils.d.ts.map +1 -1
- package/dist/lib/extend-expect.d.ts.map +1 -1
- package/dist/lib/lib.d.ts.map +1 -1
- package/dist/lib/lib.js +1 -2
- package/dist/lib/lib.js.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/test/unit/custom-matchers.test.js +2 -1
- package/dist/test/unit/custom-matchers.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +30 -0
- package/knip.json +3 -0
- package/lib/lib.ts +1 -2
- package/package.json +25 -13
- package/test/unit/custom-matchers.test.ts +2 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import prettier from 'eslint-config-prettier';
|
|
2
|
+
|
|
3
|
+
import apify from '@apify/eslint-config/ts.js';
|
|
4
|
+
import globals from 'globals';
|
|
5
|
+
import tsEslint from 'typescript-eslint';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line import/no-default-export
|
|
8
|
+
export default [
|
|
9
|
+
{ ignores: ['**/dist', 'eslint.config.mjs'] },
|
|
10
|
+
...apify,
|
|
11
|
+
prettier,
|
|
12
|
+
{
|
|
13
|
+
languageOptions: {
|
|
14
|
+
parser: tsEslint.parser,
|
|
15
|
+
parserOptions: {
|
|
16
|
+
project: 'tsconfig.json',
|
|
17
|
+
},
|
|
18
|
+
globals: {
|
|
19
|
+
...globals.node,
|
|
20
|
+
...globals.jest,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
plugins: {
|
|
24
|
+
'@typescript-eslint': tsEslint.plugin,
|
|
25
|
+
},
|
|
26
|
+
rules: {
|
|
27
|
+
'no-console': 0,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
];
|
package/knip.json
ADDED
package/lib/lib.ts
CHANGED
|
@@ -191,7 +191,6 @@ const createStandbyTask = async (actorNameOrId: string, buildNumber?: string): P
|
|
|
191
191
|
throw new Error(`Actor "${actorNameOrId} doesn't contain actorStandby options`);
|
|
192
192
|
}
|
|
193
193
|
const { isEnabled, ...defaultActorStandby } = actorInfo.actorStandby;
|
|
194
|
-
// @ts-expect-error This is not typed properly in ApifyClient, we need to remove it or API fails
|
|
195
194
|
delete defaultActorStandby.disableStandbyFieldsOverride
|
|
196
195
|
|
|
197
196
|
const build = buildNumber ?? defaultActorStandby.build;
|
|
@@ -253,7 +252,7 @@ const createStartRunFn = <T>(actorNameOrId: string, testContext: TestContext) =>
|
|
|
253
252
|
...(prefilledInput && (await getActorPrefilledInput(apifyClient, actorNameOrId, buildId))),
|
|
254
253
|
...input,
|
|
255
254
|
};
|
|
256
|
-
const run = await actor.call(actorInput, { build, ...options });
|
|
255
|
+
const run = await actor.call(actorInput, { build, log: null, ...options });
|
|
257
256
|
|
|
258
257
|
const runLink = generateRunLink(run);
|
|
259
258
|
await annotate(`${task.name} - ${runLink}`, 'run_link');
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apify-test-tools",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TBD",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/apify/apify-test-tools.git"
|
|
9
|
+
},
|
|
6
10
|
"engines": {
|
|
7
11
|
"node": ">=18.0.0"
|
|
8
12
|
},
|
|
@@ -14,19 +18,23 @@
|
|
|
14
18
|
"dependencies": {
|
|
15
19
|
"@apify/consts": "^2.43.0",
|
|
16
20
|
"@slack/web-api": "^7.9.2",
|
|
17
|
-
"apify-client": "^2.
|
|
21
|
+
"apify-client": "^2.22.2",
|
|
18
22
|
"yargs": "^18.0.0"
|
|
19
23
|
},
|
|
20
24
|
"devDependencies": {
|
|
21
|
-
"@apify/eslint-config
|
|
22
|
-
"@apify/tsconfig": "^0.1.
|
|
25
|
+
"@apify/eslint-config": "^1.0.0",
|
|
26
|
+
"@apify/tsconfig": "^0.1.1",
|
|
27
|
+
"@types/node": "^24.0.0",
|
|
23
28
|
"@types/yargs": "^17.0.33",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
29
|
+
"eslint": "^9.29.0",
|
|
30
|
+
"eslint-config-prettier": "^10.1.5",
|
|
31
|
+
"globals": "^17.0.0",
|
|
32
|
+
"prettier": "^3.5.3",
|
|
33
|
+
"tsx": "^4.20.3",
|
|
34
|
+
"typescript": "^5.9.3",
|
|
35
|
+
"typescript-eslint": "^8.34.1",
|
|
36
|
+
"vitest": "^3.2.4",
|
|
37
|
+
"knip": "^5.65.0"
|
|
30
38
|
},
|
|
31
39
|
"peerDependencies": {
|
|
32
40
|
"vitest": ">=3.2.4"
|
|
@@ -35,9 +43,13 @@
|
|
|
35
43
|
"start": "npm run dist/bin/main.js",
|
|
36
44
|
"start:dev": "GITHUB_WORKSPACE=local-clone tsx bin/main.ts",
|
|
37
45
|
"build": "tsc && chmod +x ./dist/bin/main.js",
|
|
38
|
-
"lint": "eslint
|
|
39
|
-
"lint:fix": "eslint
|
|
40
|
-
"
|
|
46
|
+
"lint": "eslint",
|
|
47
|
+
"lint:fix": "eslint --fix",
|
|
48
|
+
"format": "prettier --write .",
|
|
49
|
+
"format:check": "prettier --check .",
|
|
50
|
+
"type-check": "tsc --noEmit",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"check-unused": "npx knip"
|
|
41
53
|
},
|
|
42
54
|
"author": "oklinov",
|
|
43
55
|
"license": "ISC"
|
|
@@ -17,7 +17,8 @@ const PPE_EVENT_CONST = {
|
|
|
17
17
|
ADS_SCRAPED: 'ads-scraped',
|
|
18
18
|
} as const;
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
// TODO: Remake these tests. k5MNKmaDGHlABDn2I run doesn't exist and we probably don't want to depend on fixed run
|
|
21
|
+
describe.skip('custom-matchers', { timeout: 100_000 }, () => {
|
|
21
22
|
testTestActor('basic', async ({ expect }) => {
|
|
22
23
|
const apifyClient = new ApifyClient({ token: process.env.TESTER_APIFY_TOKEN });
|
|
23
24
|
const run = await apifyClient.run('k5MNKmaDGHlABDn2I').get();
|