@contractkit/prettier-plugin 0.9.1 → 0.9.2

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,9 +1,9 @@
1
1
 
2
- > @contractkit/prettier-plugin@0.9.1 build:ci /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
2
+ > @contractkit/prettier-plugin@0.9.2 build:ci /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
3
3
  > eslint --max-warnings=0 && pnpm run build
4
4
 
5
5
 
6
- > @contractkit/prettier-plugin@0.9.1 build /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
6
+ > @contractkit/prettier-plugin@0.9.2 build /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
7
7
  > tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration
8
8
 
9
9
  CLI Building entry: src/index.ts
@@ -11,9 +11,9 @@
11
11
  CLI tsup v8.5.1
12
12
  CLI Target: esnext
13
13
  ESM Build start
14
- ESM dist/index.js 18.13 KB
15
- ESM dist/index.js.map 43.70 KB
16
- ESM ⚡️ Build success in 123ms
14
+ ESM dist/index.js 18.32 KB
15
+ ESM dist/index.js.map 44.20 KB
16
+ ESM ⚡️ Build success in 166ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 3581ms
18
+ DTS ⚡️ Build success in 3922ms
19
19
  DTS dist/index.d.ts 157.00 B
@@ -1,26 +1,26 @@
1
1
 
2
- > @contractkit/prettier-plugin@0.9.1 test:ci /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
2
+ > @contractkit/prettier-plugin@0.9.2 test:ci /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
3
3
  > vitest run --coverage
4
4
 
5
5
 
6
6
   RUN  v4.1.5 /home/runner/work/ContractKit/ContractKit/apps/prettier-plugin
7
7
  Coverage enabled with v8
8
8
 
9
- ✓ tests/print-ck.test.ts (55 tests) 215ms
9
+ ✓ tests/print-ck.test.ts (57 tests) 263ms
10
10
 
11
11
   Test Files  1 passed (1)
12
-  Tests  55 passed (55)
13
-  Start at  18:49:08
14
-  Duration  5.56s (transform 1.50s, setup 0ms, import 4.05s, tests 215ms, environment 0ms)
12
+  Tests  57 passed (57)
13
+  Start at  13:24:20
14
+  Duration  5.57s (transform 1.61s, setup 0ms, import 4.11s, tests 263ms, environment 0ms)
15
15
 
16
16
   % Coverage report from v8
17
17
  -------------------|---------|----------|---------|---------|-------------------
18
18
  File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
19
19
  -------------------|---------|----------|---------|---------|-------------------
20
- All files | 66.02 | 56.81 | 69.23 | 71.87 |
20
+ All files | 66.3 | 58.04 | 70.37 | 72.06 |
21
21
  indent.ts | 100 | 100 | 100 | 100 |
22
22
  print-ck.ts | 89.85 | 80 | 100 | 98.03 | 59
23
- print-contract.ts | 41.93 | 28.57 | 50 | 42.85 | 10,37-68
23
+ print-contract.ts | 41.93 | 30.35 | 50 | 42.85 | 10,37-68
24
24
  ...t-operation.ts | 70.62 | 63.74 | 90 | 80.43 | ...92,200-211,243
25
- print-type.ts | 45.23 | 42.55 | 40 | 47.14 | ...09,132,135-138
25
+ print-type.ts | 47.12 | 46.87 | 45.45 | 48.61 | ...10,139,142-145
26
26
  -------------------|---------|----------|---------|---------|-------------------
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @contractkit/prettier-plugin-contractkit
2
2
 
3
+ ## 0.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 1be6771: Fix prettier printer to re-quote enum values that contain spaces or other non-identifier characters, preventing round-trip parse failures for values like `"Sole Proprietorship"`.
8
+
3
9
  ## 0.9.1
4
10
 
5
11
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1777661353616" clover="3.2.0">
3
- <project timestamp="1777661353616" name="All files">
4
- <metrics statements="288" coveredstatements="207" conditionals="396" coveredconditionals="225" methods="26" coveredmethods="18" elements="710" coveredelements="450" complexity="0" loc="288" ncloc="288" packages="1" files="5" classes="5"/>
2
+ <coverage generated="1777901065783" clover="3.2.0">
3
+ <project timestamp="1777901065783" name="All files">
4
+ <metrics statements="290" coveredstatements="209" conditionals="398" coveredconditionals="231" methods="27" coveredmethods="19" elements="715" coveredelements="459" complexity="0" loc="290" ncloc="290" packages="1" files="5" classes="5"/>
5
5
  <file name="indent.ts" path="/home/runner/work/ContractKit/ContractKit/apps/prettier-plugin/src/indent.ts">
6
6
  <metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
7
7
  <line num="1" count="1" type="stmt"/>
@@ -10,12 +10,12 @@
10
10
  <metrics statements="51" coveredstatements="50" conditionals="75" coveredconditionals="60" methods="4" coveredmethods="4"/>
11
11
  <line num="7" count="1" type="stmt"/>
12
12
  <line num="20" count="5" type="cond" truecount="2" falsecount="0"/>
13
- <line num="24" count="55" type="stmt"/>
14
- <line num="25" count="55" type="stmt"/>
15
- <line num="26" count="55" type="stmt"/>
16
- <line num="27" count="55" type="cond" truecount="8" falsecount="0"/>
17
- <line num="28" count="55" type="cond" truecount="8" falsecount="0"/>
18
- <line num="30" count="55" type="cond" truecount="7" falsecount="0"/>
13
+ <line num="24" count="57" type="stmt"/>
14
+ <line num="25" count="57" type="stmt"/>
15
+ <line num="26" count="57" type="stmt"/>
16
+ <line num="27" count="57" type="cond" truecount="8" falsecount="0"/>
17
+ <line num="28" count="57" type="cond" truecount="8" falsecount="0"/>
18
+ <line num="30" count="57" type="cond" truecount="7" falsecount="0"/>
19
19
  <line num="32" count="7" type="stmt"/>
20
20
  <line num="34" count="7" type="cond" truecount="2" falsecount="0"/>
21
21
  <line num="35" count="3" type="stmt"/>
@@ -45,36 +45,36 @@
45
45
  <line num="75" count="2" type="stmt"/>
46
46
  <line num="76" count="2" type="stmt"/>
47
47
  <line num="77" count="2" type="stmt"/>
48
- <line num="90" count="55" type="cond" truecount="2" falsecount="2"/>
49
- <line num="91" count="55" type="stmt"/>
50
- <line num="94" count="55" type="stmt"/>
51
- <line num="95" count="55" type="cond" truecount="2" falsecount="0"/>
52
- <line num="98" count="55" type="cond" truecount="2" falsecount="2"/>
53
- <line num="99" count="3" type="cond" truecount="1" falsecount="1"/>
54
- <line num="100" count="3" type="stmt"/>
55
- <line num="104" count="55" type="stmt"/>
56
- <line num="105" count="55" type="stmt"/>
57
- <line num="106" count="55" type="cond" truecount="2" falsecount="2"/>
48
+ <line num="90" count="57" type="cond" truecount="2" falsecount="2"/>
49
+ <line num="91" count="57" type="stmt"/>
50
+ <line num="94" count="57" type="stmt"/>
51
+ <line num="95" count="57" type="cond" truecount="2" falsecount="0"/>
52
+ <line num="98" count="57" type="cond" truecount="2" falsecount="2"/>
53
+ <line num="99" count="5" type="cond" truecount="1" falsecount="1"/>
54
+ <line num="100" count="5" type="stmt"/>
55
+ <line num="104" count="57" type="stmt"/>
56
+ <line num="105" count="57" type="stmt"/>
57
+ <line num="106" count="57" type="cond" truecount="2" falsecount="2"/>
58
58
  <line num="107" count="47" type="cond" truecount="2" falsecount="0"/>
59
59
  <line num="108" count="47" type="cond" truecount="6" falsecount="0"/>
60
60
  <line num="109" count="47" type="stmt"/>
61
- <line num="112" count="55" type="stmt"/>
61
+ <line num="112" count="57" type="stmt"/>
62
62
  </file>
63
63
  <file name="print-contract.ts" path="/home/runner/work/ContractKit/ContractKit/apps/prettier-plugin/src/print-contract.ts">
64
- <metrics statements="28" coveredstatements="12" conditionals="56" coveredconditionals="16" methods="2" coveredmethods="1"/>
65
- <line num="7" count="3" type="cond" truecount="3" falsecount="1"/>
66
- <line num="9" count="3" type="cond" truecount="1" falsecount="1"/>
64
+ <metrics statements="28" coveredstatements="12" conditionals="56" coveredconditionals="17" methods="2" coveredmethods="1"/>
65
+ <line num="7" count="5" type="cond" truecount="3" falsecount="1"/>
66
+ <line num="9" count="5" type="cond" truecount="1" falsecount="1"/>
67
67
  <line num="10" count="0" type="stmt"/>
68
- <line num="14" count="3" type="cond" truecount="1" falsecount="1"/>
69
- <line num="15" count="3" type="stmt"/>
70
- <line num="24" count="3" type="cond" truecount="1" falsecount="1"/>
71
- <line num="25" count="3" type="cond" truecount="3" falsecount="1"/>
72
- <line num="26" count="3" type="stmt"/>
73
- <line num="28" count="3" type="stmt"/>
74
- <line num="29" count="3" type="cond" truecount="2" falsecount="2"/>
75
- <line num="30" count="4" type="stmt"/>
76
- <line num="32" count="3" type="stmt"/>
77
- <line num="33" count="3" type="stmt"/>
68
+ <line num="14" count="5" type="cond" truecount="1" falsecount="1"/>
69
+ <line num="15" count="5" type="stmt"/>
70
+ <line num="24" count="5" type="cond" truecount="1" falsecount="1"/>
71
+ <line num="25" count="5" type="cond" truecount="4" falsecount="0"/>
72
+ <line num="26" count="5" type="stmt"/>
73
+ <line num="28" count="5" type="stmt"/>
74
+ <line num="29" count="5" type="cond" truecount="2" falsecount="2"/>
75
+ <line num="30" count="6" type="stmt"/>
76
+ <line num="32" count="5" type="stmt"/>
77
+ <line num="33" count="5" type="stmt"/>
78
78
  <line num="37" count="0" type="stmt"/>
79
79
  <line num="38" count="0" type="cond" truecount="0" falsecount="2"/>
80
80
  <line num="39" count="0" type="stmt"/>
@@ -233,77 +233,79 @@
233
233
  <line num="248" count="7" type="stmt"/>
234
234
  </file>
235
235
  <file name="print-type.ts" path="/home/runner/work/ContractKit/ContractKit/apps/prettier-plugin/src/print-type.ts">
236
- <metrics statements="70" coveredstatements="33" conditionals="94" coveredconditionals="40" methods="10" coveredmethods="4"/>
237
- <line num="7" count="34" type="cond" truecount="3" falsecount="9"/>
238
- <line num="9" count="23" type="stmt"/>
239
- <line num="10" count="23" type="cond" truecount="1" falsecount="1"/>
240
- <line num="12" count="0" type="stmt"/>
241
- <line num="13" count="0" type="cond" truecount="0" falsecount="2"/>
242
- <line num="15" count="23" type="cond" truecount="2" falsecount="0"/>
236
+ <metrics statements="72" coveredstatements="35" conditionals="96" coveredconditionals="45" methods="11" coveredmethods="5"/>
237
+ <line num="8" count="36" type="cond" truecount="3" falsecount="9"/>
238
+ <line num="10" count="23" type="stmt"/>
239
+ <line num="11" count="23" type="cond" truecount="1" falsecount="1"/>
240
+ <line num="13" count="0" type="stmt"/>
241
+ <line num="14" count="0" type="cond" truecount="0" falsecount="2"/>
243
242
  <line num="16" count="23" type="cond" truecount="2" falsecount="0"/>
244
- <line num="17" count="23" type="cond" truecount="1" falsecount="1"/>
245
- <line num="18" count="23" type="cond" truecount="2" falsecount="0"/>
243
+ <line num="17" count="23" type="cond" truecount="2" falsecount="0"/>
244
+ <line num="18" count="23" type="cond" truecount="1" falsecount="1"/>
246
245
  <line num="19" count="23" type="cond" truecount="2" falsecount="0"/>
247
- <line num="22" count="0" type="stmt"/>
248
- <line num="23" count="0" type="cond" truecount="0" falsecount="2"/>
246
+ <line num="20" count="23" type="cond" truecount="2" falsecount="0"/>
247
+ <line num="23" count="0" type="stmt"/>
249
248
  <line num="24" count="0" type="cond" truecount="0" falsecount="2"/>
250
- <line num="25" count="0" type="stmt"/>
251
- <line num="28" count="0" type="stmt"/>
252
- <line num="30" count="0" type="stmt"/>
253
- <line num="32" count="1" type="stmt"/>
254
- <line num="34" count="0" type="cond" truecount="0" falsecount="2"/>
255
- <line num="36" count="0" type="stmt"/>
256
- <line num="38" count="0" type="stmt"/>
257
- <line num="40" count="0" type="stmt"/>
258
- <line num="42" count="10" type="stmt"/>
259
- <line num="44" count="0" type="stmt"/>
260
- <line num="46" count="0" type="stmt"/>
261
- <line num="52" count="0" type="cond" truecount="0" falsecount="2"/>
249
+ <line num="25" count="0" type="cond" truecount="0" falsecount="2"/>
250
+ <line num="26" count="0" type="stmt"/>
251
+ <line num="29" count="0" type="stmt"/>
252
+ <line num="31" count="0" type="stmt"/>
253
+ <line num="33" count="3" type="stmt"/>
254
+ <line num="35" count="0" type="cond" truecount="0" falsecount="2"/>
255
+ <line num="37" count="0" type="stmt"/>
256
+ <line num="39" count="0" type="stmt"/>
257
+ <line num="41" count="0" type="stmt"/>
258
+ <line num="43" count="10" type="stmt"/>
259
+ <line num="45" count="0" type="stmt"/>
260
+ <line num="47" count="0" type="stmt"/>
262
261
  <line num="53" count="0" type="cond" truecount="0" falsecount="2"/>
263
- <line num="54" count="0" type="stmt"/>
264
- <line num="55" count="0" type="cond" truecount="0" falsecount="2"/>
265
- <line num="56" count="0" type="stmt"/>
266
- <line num="57" count="0" type="cond" truecount="0" falsecount="2"/>
267
- <line num="58" count="0" type="stmt"/>
268
- <line num="60" count="0" type="stmt"/>
269
- <line num="65" count="0" type="stmt"/>
262
+ <line num="54" count="0" type="cond" truecount="0" falsecount="2"/>
263
+ <line num="55" count="0" type="stmt"/>
264
+ <line num="56" count="0" type="cond" truecount="0" falsecount="2"/>
265
+ <line num="57" count="0" type="stmt"/>
266
+ <line num="58" count="0" type="cond" truecount="0" falsecount="2"/>
267
+ <line num="59" count="0" type="stmt"/>
268
+ <line num="61" count="0" type="stmt"/>
270
269
  <line num="66" count="0" type="stmt"/>
271
- <line num="73" count="4" type="cond" truecount="3" falsecount="1"/>
272
- <line num="74" count="4" type="cond" truecount="1" falsecount="1"/>
273
- <line num="75" count="4" type="cond" truecount="2" falsecount="0"/>
274
- <line num="76" count="4" type="cond" truecount="2" falsecount="0"/>
275
- <line num="77" count="4" type="cond" truecount="2" falsecount="0"/>
276
- <line num="78" count="4" type="stmt"/>
277
- <line num="79" count="4" type="cond" truecount="1" falsecount="1"/>
278
- <line num="80" count="4" type="cond" truecount="1" falsecount="1"/>
279
- <line num="81" count="4" type="stmt"/>
280
- <line num="85" count="4" type="cond" truecount="3" falsecount="1"/>
281
- <line num="86" count="4" type="stmt"/>
282
- <line num="87" count="4" type="cond" truecount="1" falsecount="1"/>
283
- <line num="88" count="0" type="stmt"/>
284
- <line num="89" count="0" type="cond" truecount="0" falsecount="2"/>
270
+ <line num="67" count="0" type="stmt"/>
271
+ <line num="74" count="6" type="cond" truecount="3" falsecount="1"/>
272
+ <line num="75" count="6" type="cond" truecount="1" falsecount="1"/>
273
+ <line num="76" count="6" type="cond" truecount="2" falsecount="0"/>
274
+ <line num="77" count="6" type="cond" truecount="2" falsecount="0"/>
275
+ <line num="78" count="6" type="cond" truecount="2" falsecount="0"/>
276
+ <line num="79" count="6" type="stmt"/>
277
+ <line num="80" count="6" type="cond" truecount="1" falsecount="1"/>
278
+ <line num="81" count="6" type="cond" truecount="1" falsecount="1"/>
279
+ <line num="82" count="6" type="stmt"/>
280
+ <line num="86" count="6" type="cond" truecount="3" falsecount="1"/>
281
+ <line num="87" count="6" type="stmt"/>
282
+ <line num="88" count="6" type="cond" truecount="1" falsecount="1"/>
283
+ <line num="89" count="0" type="stmt"/>
285
284
  <line num="90" count="0" type="cond" truecount="0" falsecount="2"/>
286
- <line num="93" count="0" type="stmt"/>
287
- <line num="97" count="4" type="stmt"/>
288
- <line num="98" count="4" type="cond" truecount="1" falsecount="1"/>
289
- <line num="99" count="4" type="stmt"/>
290
- <line num="100" count="4" type="cond" truecount="2" falsecount="4"/>
291
- <line num="101" count="0" type="stmt"/>
285
+ <line num="91" count="0" type="cond" truecount="0" falsecount="2"/>
286
+ <line num="94" count="0" type="stmt"/>
287
+ <line num="98" count="6" type="stmt"/>
288
+ <line num="99" count="6" type="cond" truecount="1" falsecount="1"/>
289
+ <line num="100" count="6" type="stmt"/>
290
+ <line num="101" count="6" type="cond" truecount="5" falsecount="1"/>
292
291
  <line num="102" count="0" type="stmt"/>
293
- <line num="104" count="4" type="stmt"/>
294
- <line num="108" count="0" type="cond" truecount="0" falsecount="4"/>
295
- <line num="109" count="0" type="stmt"/>
296
- <line num="116" count="5" type="cond" truecount="4" falsecount="0"/>
297
- <line num="118" count="2" type="cond" truecount="2" falsecount="0"/>
298
- <line num="119" count="1" type="stmt"/>
299
- <line num="131" count="4" type="cond" truecount="1" falsecount="1"/>
300
- <line num="132" count="0" type="stmt"/>
301
- <line num="134" count="4" type="cond" truecount="1" falsecount="1"/>
302
- <line num="135" count="0" type="stmt"/>
303
- <line num="136" count="0" type="cond" truecount="0" falsecount="6"/>
304
- <line num="137" count="0" type="stmt"/>
305
- <line num="138" count="0" type="stmt"/>
306
- <line num="141" count="4" type="stmt"/>
292
+ <line num="103" count="0" type="stmt"/>
293
+ <line num="105" count="6" type="stmt"/>
294
+ <line num="109" count="0" type="cond" truecount="0" falsecount="4"/>
295
+ <line num="110" count="0" type="stmt"/>
296
+ <line num="117" count="9" type="cond" truecount="2" falsecount="0"/>
297
+ <line num="118" count="2" type="stmt"/>
298
+ <line num="123" count="5" type="cond" truecount="4" falsecount="0"/>
299
+ <line num="125" count="2" type="cond" truecount="2" falsecount="0"/>
300
+ <line num="126" count="1" type="stmt"/>
301
+ <line num="138" count="6" type="cond" truecount="1" falsecount="1"/>
302
+ <line num="139" count="0" type="stmt"/>
303
+ <line num="141" count="6" type="cond" truecount="1" falsecount="1"/>
304
+ <line num="142" count="0" type="stmt"/>
305
+ <line num="143" count="0" type="cond" truecount="0" falsecount="6"/>
306
+ <line num="144" count="0" type="stmt"/>
307
+ <line num="145" count="0" type="stmt"/>
308
+ <line num="148" count="6" type="stmt"/>
307
309
  </file>
308
310
  </project>
309
311
  </coverage>