apify-test-tools 0.5.5 → 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.
@@ -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
@@ -0,0 +1,3 @@
1
+ {
2
+ "$schema": "https://unpkg.com/knip@5/schema.json"
3
+ }
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;
package/package.json CHANGED
@@ -1,8 +1,12 @@
1
1
  {
2
2
  "name": "apify-test-tools",
3
- "version": "0.5.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.12.6",
21
+ "apify-client": "^2.22.2",
18
22
  "yargs": "^18.0.0"
19
23
  },
20
24
  "devDependencies": {
21
- "@apify/eslint-config-ts": "^0.3.0",
22
- "@apify/tsconfig": "^0.1.0",
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
- "@typescript-eslint/eslint-plugin": "^6.7.2",
25
- "@typescript-eslint/parser": "^6.7.2",
26
- "eslint": "^8.50.0",
27
- "tsx": "^4.19.2",
28
- "typescript": "^5.7",
29
- "vitest": "^3.2.4"
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 ./src --ext .ts",
39
- "lint:fix": "eslint ./src --ext .ts --fix",
40
- "test": "vitest run"
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
- describe('custom-matchers', { timeout: 100_000 }, () => {
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();
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=test-actor.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-actor.test.d.ts","sourceRoot":"","sources":["../../../test/unit/test-actor.test.ts"],"names":[],"mappings":""}
@@ -1,17 +0,0 @@
1
- import { describe, testActor } from '../../lib/lib';
2
- describe('testActor tests', async () => {
3
- testActor('compass/google-maps-extractor', 'basic', async ({ expect, run }) => {
4
- const runResult = await run({
5
- input: {},
6
- prefilledInput: true,
7
- options: {
8
- memory: 512,
9
- },
10
- });
11
- const input = await runResult.getInput();
12
- await expect(runResult).toFinishWith({
13
- datasetItemCount: input.maxCrawledPlacesPerSearch,
14
- });
15
- });
16
- });
17
- //# sourceMappingURL=test-actor.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-actor.test.js","sourceRoot":"","sources":["../../../test/unit/test-actor.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEpD,QAAQ,CAAC,iBAAiB,EAAE,KAAK,IAAI,EAAE;IACnC,SAAS,CAAC,+BAA+B,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;QAC1E,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC;YACxB,KAAK,EAAE,EAAE;YACT,cAAc,EAAE,IAAI;YACpB,OAAO,EAAE;gBACL,MAAM,EAAE,GAAG;aACd;SACJ,CAAC,CAAA;QACF,MAAM,KAAK,GAAG,MAAM,SAAS,CAAC,QAAQ,EAAyC,CAAC;QAChF,MAAM,MAAM,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC;YACjC,gBAAgB,EAAE,KAAK,CAAC,yBAAyB;SACpD,CAAC,CAAA;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}