@temporalio/common 1.11.6 → 1.11.8

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.
@@ -13,7 +13,7 @@ export type Decoded<T> = ReplaceNested<T, Payload, DecodedPayload>;
13
13
  export type EncodedProtoFailure = Encoded<ProtoFailure>;
14
14
  export type DecodedProtoFailure = Decoded<ProtoFailure>;
15
15
  /** An object T with any nested values of type ToReplace replaced with ReplaceWith */
16
- export type ReplaceNested<T, ToReplace, ReplaceWith> = T extends (...args: any[]) => any ? T : [keyof T] extends [never] ? T : T extends {
16
+ export type ReplaceNested<T, ToReplace, ReplaceWith> = T extends (...args: any[]) => any ? T : [keyof T] extends [never] ? T : T extends Record<string, string> ? T : T extends {
17
17
  [k: string]: ToReplace;
18
18
  } ? {
19
19
  [P in keyof T]: ReplaceNested<T[P], ToReplace, ReplaceWith>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/common",
3
- "version": "1.11.6",
3
+ "version": "1.11.8",
4
4
  "description": "Common library for code that's used across the Client, Worker, and/or Workflow",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "author": "Temporal Technologies Inc. <sdk@temporal.io>",
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@temporalio/proto": "1.11.6",
15
+ "@temporalio/proto": "1.11.8",
16
16
  "long": "^5.2.3",
17
17
  "ms": "^3.0.0-canary.1",
18
18
  "proto3-json-serializer": "^2.0.0"
@@ -36,5 +36,5 @@
36
36
  "src",
37
37
  "lib"
38
38
  ],
39
- "gitHead": "7b0543ade19c5432fd6013877489df28f96d9be0"
39
+ "gitHead": "0a757c370012d89babb668fbd799d83b55c83a1b"
40
40
  }
@@ -23,12 +23,14 @@ export type ReplaceNested<T, ToReplace, ReplaceWith> = T extends (...args: any[]
23
23
  ? T
24
24
  : [keyof T] extends [never]
25
25
  ? T
26
- : T extends { [k: string]: ToReplace }
27
- ? {
28
- [P in keyof T]: ReplaceNested<T[P], ToReplace, ReplaceWith>;
29
- }
30
- : T extends ToReplace
31
- ? ReplaceWith | Exclude<T, ToReplace>
32
- : {
26
+ : T extends Record<string, string> // Special exception for nexusHeader.
27
+ ? T
28
+ : T extends { [k: string]: ToReplace }
29
+ ? {
33
30
  [P in keyof T]: ReplaceNested<T[P], ToReplace, ReplaceWith>;
34
- };
31
+ }
32
+ : T extends ToReplace
33
+ ? ReplaceWith | Exclude<T, ToReplace>
34
+ : {
35
+ [P in keyof T]: ReplaceNested<T[P], ToReplace, ReplaceWith>;
36
+ };