@contractkit/plugin-csharp 0.1.1 → 0.1.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/.turbo/turbo-build$colon$ci.log +4 -4
- package/.turbo/turbo-test$colon$ci.log +13 -13
- package/CHANGELOG.md +23 -0
- package/dist/codegen-models.d.ts.map +1 -1
- package/dist/index.js +223 -485
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/codegen-models.ts +34 -8
- package/tests/codegen-models.test.ts +15 -0
|
@@ -5,9 +5,9 @@ $ tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly
|
|
|
5
5
|
[34mCLI[39m tsup v8.5.1
|
|
6
6
|
[34mCLI[39m Target: esnext
|
|
7
7
|
[34mESM[39m Build start
|
|
8
|
-
[32mESM[39m [1mdist/index.js [22m[
|
|
9
|
-
[32mESM[39m [1mdist/index.js.map [22m[
|
|
10
|
-
[32mESM[39m ⚡️ Build success in
|
|
8
|
+
[32mESM[39m [1mdist/index.js [22m[32m87.30 KB[39m
|
|
9
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m188.87 KB[39m
|
|
10
|
+
[32mESM[39m ⚡️ Build success in 180ms
|
|
11
11
|
[34mDTS[39m Build start
|
|
12
|
-
[32mDTS[39m ⚡️ Build success in
|
|
12
|
+
[32mDTS[39m ⚡️ Build success in 7420ms
|
|
13
13
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m1.50 KB[39m
|
|
@@ -3,27 +3,27 @@ $ vitest run --coverage
|
|
|
3
3
|
[1m[30m[46m RUN [49m[39m[22m [36mv4.1.5 [39m[90m/home/runner/work/ContractKit/ContractKit/packages/plugin-csharp[39m
|
|
4
4
|
[2mCoverage enabled with [22m[33mv8[39m
|
|
5
5
|
|
|
6
|
-
[32m✓[39m tests/codegen-
|
|
7
|
-
[32m✓[39m tests/
|
|
8
|
-
[32m✓[39m tests/
|
|
9
|
-
[32m✓[39m tests/naming.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m
|
|
10
|
-
[32m✓[39m tests/runtime.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m
|
|
11
|
-
[32m✓[39m tests/scaffold.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m
|
|
12
|
-
[32m✓[39m tests/hoist.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m
|
|
6
|
+
[32m✓[39m tests/codegen-client.test.ts [2m([22m[2m26 tests[22m[2m)[22m[32m 252[2mms[22m[39m
|
|
7
|
+
[32m✓[39m tests/codegen-models.test.ts [2m([22m[2m65 tests[22m[2m)[22m[32m 282[2mms[22m[39m
|
|
8
|
+
[32m✓[39m tests/index.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 207[2mms[22m[39m
|
|
9
|
+
[32m✓[39m tests/naming.test.ts [2m([22m[2m19 tests[22m[2m)[22m[32m 88[2mms[22m[39m
|
|
10
|
+
[32m✓[39m tests/runtime.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 51[2mms[22m[39m
|
|
11
|
+
[32m✓[39m tests/scaffold.test.ts [2m([22m[2m5 tests[22m[2m)[22m[32m 14[2mms[22m[39m
|
|
12
|
+
[32m✓[39m tests/hoist.test.ts [2m([22m[2m10 tests[22m[2m)[22m[32m 67[2mms[22m[39m
|
|
13
13
|
|
|
14
14
|
[2m Test Files [22m [1m[32m7 passed[39m[22m[90m (7)[39m
|
|
15
|
-
[2m Tests [22m [1m[
|
|
16
|
-
[2m Start at [22m
|
|
17
|
-
[2m Duration [22m
|
|
15
|
+
[2m Tests [22m [1m[32m149 passed[39m[22m[90m (149)[39m
|
|
16
|
+
[2m Start at [22m 15:17:08
|
|
17
|
+
[2m Duration [22m 13.50s[2m (transform 5.27s, setup 0ms, import 22.08s, tests 962ms, environment 10ms)[22m
|
|
18
18
|
|
|
19
19
|
[34m % [39m[2mCoverage report from [22m[33mv8[39m
|
|
20
20
|
-------------------|---------|----------|---------|---------|-------------------
|
|
21
21
|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
|
22
22
|
-------------------|---------|----------|---------|---------|-------------------
|
|
23
|
-
All files |
|
|
24
|
-
src | 88.
|
|
23
|
+
All files | 88.04 | 77.07 | 89.59 | 90.82 |
|
|
24
|
+
src | 88.08 | 77.15 | 89.79 | 90.86 |
|
|
25
25
|
...gen-client.ts | 94.61 | 87.12 | 94.91 | 97.59 | ...94-496,513-514
|
|
26
|
-
...gen-models.ts | 91.
|
|
26
|
+
...gen-models.ts | 91.29 | 75.25 | 96.61 | 93.02 | ...05,907,929-932
|
|
27
27
|
codegen-sdk.ts | 100 | 100 | 100 | 100 |
|
|
28
28
|
hoist.ts | 78.66 | 61.9 | 93.1 | 79.06 | ...13-322,350-362
|
|
29
29
|
index.ts | 70.74 | 71.21 | 58.06 | 75.59 | ...25-329,350-369
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @contractkit/plugin-csharp
|
|
2
2
|
|
|
3
|
+
## 0.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ad6b72e: A default on a field whose property shares its enum's name now compiles. `rating?: Rating = neutral`
|
|
8
|
+
generated `public Rating? Rating { get; init; } = Rating.Neutral;`, and inside the record `Rating`
|
|
9
|
+
resolved to the property rather than the type, so the build failed with CS0236. C#'s rule that lets a
|
|
10
|
+
member share its type's name only applies when the member's type is exactly that type, and `Rating?`
|
|
11
|
+
is `Nullable<Rating>`. The initializer is now written from the global namespace whenever a property of
|
|
12
|
+
the same record would shadow the enum.
|
|
13
|
+
|
|
14
|
+
## 0.1.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- b0f3778: Published builds no longer wrap every function in a `__name()` call, so a bundler can drop the
|
|
19
|
+
exports it does not use. The shared tsconfig enabled `emitDecoratorMetadata`, which made tsup compile
|
|
20
|
+
through swc with `keepNames` forced on, and nothing in the repo uses decorators. `@contractkit/core`
|
|
21
|
+
shrinks by about 7%, and anything that bundles it, the VS Code extension included, no longer
|
|
22
|
+
carries core functions it never calls.
|
|
23
|
+
- Updated dependencies [b0f3778]
|
|
24
|
+
- @contractkit/core@0.30.1
|
|
25
|
+
|
|
3
26
|
## 0.1.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen-models.d.ts","sourceRoot":"","sources":["../src/codegen-models.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAa,SAAS,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAElH,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,YAAY,CAAC;AAK3D,MAAM,WAAW,yBAAyB;IACtC,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,gGAAgG;IAChG,eAAe,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAC5C,kGAAkG;IAClG,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,yBAAyB,GAAG,MAAM,CAwBpG;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,EAAE,QAAQ,GAAE,WAAW,CAAC,MAAM,CAAa,GAAG,GAAG,CAAC,MAAM,CAAC,CAG3H;AAID,UAAU,aAAa;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,UAAU,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAA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