@temporalio/testing 1.17.1 → 1.17.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/testing",
3
- "version": "1.17.1",
3
+ "version": "1.17.3",
4
4
  "description": "Temporal.io SDK Testing sub-package",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -11,15 +11,22 @@
11
11
  ],
12
12
  "author": "Temporal Technologies Inc. <sdk@temporal.io>",
13
13
  "license": "MIT",
14
+ "ava": {
15
+ "timeout": "60s",
16
+ "concurrency": 1,
17
+ "workerThreads": false
18
+ },
14
19
  "dependencies": {
15
- "abort-controller": "^3.0.0",
16
- "@temporalio/activity": "1.17.1",
17
- "@temporalio/client": "1.17.1",
18
- "@temporalio/common": "1.17.1",
19
- "@temporalio/core-bridge": "1.17.1",
20
- "@temporalio/worker": "1.17.1",
21
- "@temporalio/workflow": "1.17.1",
22
- "@temporalio/proto": "1.17.1"
20
+ "@temporalio/client": "1.17.3",
21
+ "@temporalio/activity": "1.17.3",
22
+ "@temporalio/core-bridge": "1.17.3",
23
+ "@temporalio/worker": "1.17.3",
24
+ "@temporalio/proto": "1.17.3",
25
+ "@temporalio/workflow": "1.17.3",
26
+ "@temporalio/common": "1.17.3"
27
+ },
28
+ "devDependencies": {
29
+ "ava": "^5.3.1"
23
30
  },
24
31
  "bugs": {
25
32
  "url": "https://github.com/temporalio/sdk-typescript/issues"
@@ -35,9 +42,15 @@
35
42
  },
36
43
  "files": [
37
44
  "lib",
38
- "src"
45
+ "src",
46
+ "!src/__tests__",
47
+ "!lib/__tests__"
39
48
  ],
40
49
  "publishConfig": {
41
50
  "access": "public"
51
+ },
52
+ "scripts": {
53
+ "build": "tsc --build",
54
+ "test": "ava ./lib/__tests__/test-*.js"
42
55
  }
43
56
  }
package/src/client.ts CHANGED
@@ -1,4 +1,3 @@
1
- import 'abort-controller/polyfill'; // eslint-disable-line import/no-unassigned-import
2
1
  import type {
3
2
  ClientOptions,
4
3
  Connection,
@@ -1,4 +1,3 @@
1
- import 'abort-controller/polyfill'; // eslint-disable-line import/no-unassigned-import
2
1
  import type { Duration, SearchAttributeType } from '@temporalio/common';
3
2
  import { msToNumber } from '@temporalio/common/lib/time';
4
3
  import type { native } from '@temporalio/core-bridge';
@@ -1,4 +1,3 @@
1
- import 'abort-controller/polyfill'; // eslint-disable-line import/no-unassigned-import
2
1
  import events from 'node:events';
3
2
  import type * as activity from '@temporalio/activity';
4
3
  import type { ActivityFunction, Logger, MetricMeter } from '@temporalio/common';
@@ -45,10 +44,18 @@ export class MockActivityEnvironment extends events.EventEmitter {
45
44
  payloadCodecs: [],
46
45
  failureConverter: defaultFailureConverter,
47
46
  };
47
+ const activityInfo = { ...defaultActivityInfo, ...info };
48
48
  this.activity = new Activity(
49
- { ...defaultActivityInfo, ...info },
49
+ activityInfo,
50
50
  undefined,
51
51
  loadedDataConverter,
52
+ {
53
+ type: 'activity',
54
+ namespace: activityInfo.activityNamespace, // eslint-disable-line @typescript-eslint/no-deprecated
55
+ activityId: activityInfo.activityId,
56
+ workflowId: activityInfo.workflowExecution?.workflowId,
57
+ isLocal: activityInfo.isLocal,
58
+ },
52
59
  heartbeatCallback,
53
60
  opts?.client,
54
61
  LoggerWithComposedMetadata.compose(opts?.logger ?? new DefaultLogger(), { sdkComponent: SdkComponent.worker }),
@@ -1,4 +1,3 @@
1
- import 'abort-controller/polyfill'; // eslint-disable-line import/no-unassigned-import
2
1
  import type { AsyncCompletionClient, ClientPlugin, ConnectionPlugin, WorkflowClient } from '@temporalio/client';
3
2
  import { Client, Connection } from '@temporalio/client';
4
3
  import type { ConnectionOptions, InternalConnectionOptions } from '@temporalio/client/lib/connection';