@contractkit/plugin-typescript 0.16.1 → 0.17.1

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.
@@ -1,35 +1,19 @@
1
-
2
- 
3
- > @contractkit/plugin-typescript@0.16.0 build:ci /Users/robert/projects/contractkit/packages/plugin-typescript
4
- > eslint --max-warnings=0 && pnpm run build
5
-
6
- =============
7
-
8
-
9
- WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
10
-
11
-
12
- * @typescript-eslint/typescript-estree version: 8.57.2
13
- * Supported TypeScript versions: >=4.8.4 <6.0.0
14
- * Your TypeScript version: 6.0.2
15
-
16
-
17
- Please only submit bug reports when using the officially supported version.
18
-
19
-
20
- =============
21
-
22
- > @contractkit/plugin-typescript@0.16.0 build /Users/robert/projects/contractkit/packages/plugin-typescript
23
- > tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration
24
-
25
- CLI Building entry: src/index.ts
26
- CLI Using tsconfig: tsconfig.json
27
- CLI tsup v8.5.1
28
- CLI Target: esnext
29
- ESM Build start
30
- ESM dist/index.js 123.76 KB
31
- ESM dist/index.js.map 267.25 KB
32
- ESM ⚡️ Build success in 156ms
33
- DTS Build start
34
- DTS ⚡️ Build success in 702ms
35
- DTS dist/index.d.ts 3.44 KB
1
+
2
+ > @contractkit/plugin-typescript@0.17.1 build:ci /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript
3
+ > eslint --max-warnings=0 && pnpm run build
4
+
5
+
6
+ > @contractkit/plugin-typescript@0.17.1 build /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript
7
+ > tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration
8
+
9
+ CLI Building entry: src/index.ts
10
+ CLI Using tsconfig: tsconfig.json
11
+ CLI tsup v8.5.1
12
+ CLI Target: esnext
13
+ ESM Build start
14
+ ESM dist/index.js 124.43 KB
15
+ ESM dist/index.js.map 269.86 KB
16
+ ESM ⚡️ Build success in 395ms
17
+ DTS Build start
18
+ DTS ⚡️ Build success in 5140ms
19
+ DTS dist/index.d.ts 3.44 KB
@@ -1,81 +1,36 @@
1
-
2
- 
3
- > @contractkit/plugin-typescript@0.16.0 test:ci /Users/robert/projects/contractkit/packages/plugin-typescript
4
- > vitest run --coverage
5
-
6
- [?25l
7
-  RUN  v4.1.5 /Users/robert/projects/contractkit/packages/plugin-typescript
8
- Coverage enabled with v8
9
-
10
- [?2026h
11
-  ❯ tests/codegen-operation.test.ts [queued]
12
-
13
-  Test Files 0 passed (6)
14
-  Tests 0 passed (0)
15
-  Start at 08:51:09
16
-  Duration 206ms
17
- [?2026l[?2026h
18
-  tests/codegen-contract.test.ts [queued]
19
-  ❯ tests/codegen-operation.test.ts [queued]
20
-  ❯ tests/codegen-plain-types.test.ts [queued]
21
-  tests/codegen-sdk.test.ts [queued]
22
-  ❯ tests/codegen-server.test.ts [queued]
23
-  tests/pipeline.test.ts [queued]
24
-
25
-  Test Files 0 passed (6)
26
-  Tests 0 passed (0)
27
-  Start at 08:51:09
28
-  Duration 481ms
29
- [?2026l[?2026h
30
-  ❯ tests/codegen-contract.test.ts [queued]
31
-  tests/codegen-operation.test.ts [queued]
32
-  tests/codegen-plain-types.test.ts [queued]
33
-  tests/codegen-sdk.test.ts [queued]
34
-  tests/codegen-server.test.ts [queued]
35
-  tests/pipeline.test.ts [queued]
36
-
37
-  Test Files 0 passed (6)
38
-  Tests 0 passed (0)
39
-  Start at 08:51:09
40
-  Duration 928ms
41
- [?2026l[?2026h
42
-  ❯ tests/codegen-contract.test.ts [queued]
43
-  ❯ tests/codegen-operation.test.ts [queued]
44
-  ❯ tests/codegen-plain-types.test.ts [queued]
45
-  ❯ tests/codegen-sdk.test.ts [queued]
46
-  ❯ tests/codegen-server.test.ts [queued]
47
-  ❯ tests/pipeline.test.ts 0/25
48
-
49
-  Test Files 0 passed (6)
50
-  Tests 0 passed (25)
51
-  Start at 08:51:09
52
-  Duration 1.13s
53
- [?2026l ✓ tests/codegen-plain-types.test.ts (58 tests) 8ms
54
- ✓ tests/codegen-contract.test.ts (120 tests) 11ms
55
- ✓ tests/codegen-server.test.ts (15 tests) 10ms
56
- ✓ tests/codegen-operation.test.ts (86 tests) 28ms
57
- ✓ tests/pipeline.test.ts (25 tests) 47ms
58
- ✓ tests/codegen-sdk.test.ts (123 tests) 13ms
59
-
60
-  Test Files  6 passed (6)
61
-  Tests  427 passed (427)
62
-  Start at  08:51:09
63
-  Duration  1.31s (transform 1.99s, setup 0ms, import 4.86s, tests 118ms, environment 0ms)
64
-
65
-  % Coverage report from v8
66
- -------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------
67
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
68
- -------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------
69
- All files  |  77.37 |  73.85 |  82.17 |  79.25 |  
70
-  src  |  77.05 |  73.45 |  81.57 |  78.88 |  
71
-  codegen-contract.ts  |  87.38 |  81.19 |  90.16 |  88.24 | 102,259,348-349,414-416,418,420,432-434,439,494,595,642-646,654-658,664-674,724-726,730,739-755,796-797,807-816,830-831,898,964-969,974-975,980-981
72
-  codegen-operation.ts  |  78.18 |  74.26 |  78.08 |  79.69 | 30,44-77,85-94,164,172-173,312,387,423-426,500-502,511-514,577-597,618,632-646,651-652,668-679,684-685 
73
-  codegen-plain-types.ts |  87.5 |  76.76 |  92.85 |  91.66 | 50-55,91,111,185,199,211,217,269 
74
-  codegen-sdk.ts  |  88.75 |  83.6 |  85 |  91.49 | 23,308-309,578-585,594-599,606-623,678,712-729 
75
-  index.ts  |  23.35 |  19.51 |  33.33 |  25.69 | 136,139,175-375,391,394,397,415,418,421 
76
-  path-utils.ts  |  23.47 |  18.84 |  58.33 |  23.71 | 24-25,51,54-55,80-187 
77
-  ts-render.ts  |  82.19 |  85.39 |  72.22 |  87.09 | 56,90,126,157-165 
78
-  tests  |  90.38 |  90.9 |  89.28 |  93.47 |  
79
-  helpers.ts  |  90.38 |  90.9 |  89.28 |  93.47 | 110-118 
80
- -------------------------|---------|----------|---------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------
81
- [?25h
1
+
2
+ > @contractkit/plugin-typescript@0.17.1 test:ci /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript
3
+ > vitest run --coverage
4
+
5
+
6
+  RUN  v4.1.5 /home/runner/work/ContractKit/ContractKit/packages/plugin-typescript
7
+ Coverage enabled with v8
8
+
9
+ ✓ tests/codegen-operation.test.ts (88 tests) 253ms
10
+ ✓ tests/codegen-contract.test.ts (122 tests) 275ms
11
+ ✓ tests/codegen-sdk.test.ts (123 tests) 313ms
12
+ ✓ tests/codegen-plain-types.test.ts (58 tests) 34ms
13
+ ✓ tests/codegen-server.test.ts (15 tests) 23ms
14
+ ✓ tests/pipeline.test.ts (25 tests) 97ms
15
+
16
+  Test Files  6 passed (6)
17
+  Tests  431 passed (431)
18
+  Start at  17:30:30
19
+  Duration  6.90s (transform 4.12s, setup 0ms, import 14.10s, tests 995ms, environment 1ms)
20
+
21
+  % Coverage report from v8
22
+ -------------------|---------|----------|---------|---------|-------------------
23
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
24
+ -------------------|---------|----------|---------|---------|-------------------
25
+ All files | 77.47 | 74.06 | 82.02 | 79.41 |
26
+ src | 77.16 | 73.68 | 81.4 | 79.06 |
27
+ ...n-contract.ts | 87.57 | 81.63 | 89.91 | 88.57 | ...1025,1030-1031
28
+ ...-operation.ts | 78.18 | 74.26 | 78.08 | 79.69 | ...68-679,684-685
29
+ ...lain-types.ts | 87.5 | 76.76 | 92.85 | 91.66 | ...99,211,217,269
30
+ codegen-sdk.ts | 88.75 | 83.6 | 85 | 91.49 | ...23,678,712-729
31
+ index.ts | 23.35 | 19.51 | 33.33 | 25.69 | ...97,415,418,421
32
+ path-utils.ts | 23.47 | 18.84 | 58.33 | 23.71 | ...1,54-55,80-187
33
+ ts-render.ts | 82.19 | 85.39 | 72.22 | 87.09 | 56,90,126,157-165
34
+ tests | 90.38 | 90.9 | 89.28 | 93.47 |
35
+ helpers.ts | 90.38 | 90.9 | 89.28 | 93.47 | 110-118
36
+ -------------------|---------|----------|---------|---------|-------------------
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @contractkit/contractkit-plugin-typescript
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [876696f]
8
+ - @contractkit/core@0.12.0
9
+
10
+ ## 0.17.0
11
+
12
+ ### Minor Changes
13
+
14
+ - b3f7da9: Fix `ref & ref` type alias intersections generating `ZodIntersection` instead of `ZodObject`
15
+
16
+ Contracts like `contract Foo: A & B` (two model refs, no inline fields) previously emitted `A.and(B)`, producing a `ZodIntersection`. This broke `.strict()` calls on the result and caused each strict schema to reject the other's keys at runtime.
17
+
18
+ All three rendering paths (`renderIntersection`, `renderInputType`, `renderQueryType`) now emit `.extend(B.shape)` chains for any `ref & (ref | inlineObject)*` intersection, matching the pattern already used for multi-base model inheritance.
19
+
3
20
  ## 0.16.1
4
21
 
5
22
  ### Patch Changes