lawspec 0.24.0 → 0.26.0

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.
Files changed (148) hide show
  1. package/CHANGELOG.md +109 -1
  2. package/README.md +34 -26
  3. package/UNICODE-LICENSE.txt +39 -0
  4. package/api.mjs +6 -23
  5. package/bin/lawspec.mjs +148 -65
  6. package/build.json +245 -177
  7. package/builtin-data-names.mjs +73 -0
  8. package/core.wasm +2 -2
  9. package/core_jsffi.js +5 -0
  10. package/examples/native-payments/clojure/lawspec.json +13 -2
  11. package/examples/native-payments/csharp/lawspec.json +13 -2
  12. package/examples/native-payments/elixir/lawspec.json +14 -3
  13. package/examples/native-payments/erlang/lawspec.json +14 -3
  14. package/examples/native-payments/fsharp/lawspec.json +14 -3
  15. package/examples/native-payments/gleam/lawspec.json +14 -3
  16. package/examples/native-payments/go/lawspec.json +14 -3
  17. package/examples/native-payments/groovy/lawspec.json +14 -3
  18. package/examples/native-payments/haskell/lawspec.json +14 -3
  19. package/examples/native-payments/java/lawspec.json +14 -3
  20. package/examples/native-payments/javascript/lawspec.json +14 -3
  21. package/examples/native-payments/kotlin/lawspec.json +14 -3
  22. package/examples/native-payments/python/lawspec.json +14 -3
  23. package/examples/native-payments/rust/lawspec.json +14 -3
  24. package/examples/native-payments/scala/lawspec.json +14 -3
  25. package/examples/native-payments/swift/lawspec.json +14 -3
  26. package/examples/native-payments/typescript/lawspec.json +14 -3
  27. package/examples/packages/orders/lawspec.json +25 -5
  28. package/examples/packages/orders/orders.lawspec +57 -53
  29. package/examples/packages/shop-domain/src/domain.lawspec +36 -33
  30. package/examples/packages/shop-tax-1/src/api.lawspec +1 -0
  31. package/examples/packages/shop-tax-1/src/rates.lawspec +5 -4
  32. package/examples/packages/shop-tax-2/src/api.lawspec +1 -0
  33. package/examples/packages/shop-tax-2/src/rates.lawspec +6 -4
  34. package/examples/rc1/authorization-snapshots.lawspec +113 -0
  35. package/examples/rc1/banner-filenames.lawspec +64 -0
  36. package/examples/rc1/bit-codec.lawspec +57 -0
  37. package/examples/rc1/bounded-witness-search.lawspec +151 -0
  38. package/examples/rc1/conflicting-requirements.lawspec +31 -0
  39. package/examples/rc1/constructive-witnesses.lawspec +120 -0
  40. package/examples/rc1/documentary-review.lawspec +43 -0
  41. package/examples/rc1/empty-domains.lawspec +47 -0
  42. package/examples/rc1/finite-integer-domains.lawspec +76 -0
  43. package/examples/rc1/law-metadata.lawspec +30 -0
  44. package/examples/rc1/native-payments.lawspec +108 -0
  45. package/examples/rc1/nesting/rrr.lawspec +34 -0
  46. package/examples/rc1/nesting/rru.lawspec +57 -0
  47. package/examples/rc1/nesting/rur.lawspec +58 -0
  48. package/examples/rc1/nesting/ruu.lawspec +78 -0
  49. package/examples/rc1/nesting/urr.lawspec +53 -0
  50. package/examples/rc1/nesting/uru.lawspec +73 -0
  51. package/examples/rc1/nesting/uur.lawspec +74 -0
  52. package/examples/rc1/nesting/uuu.lawspec +96 -0
  53. package/examples/rc1/order-workflow.lawspec +127 -0
  54. package/examples/rc1/parcel-measurements.lawspec +93 -0
  55. package/examples/rc1/picture-records.lawspec +52 -0
  56. package/examples/rc1/picture-tuples.lawspec +48 -0
  57. package/examples/rc1/record-payloads.lawspec +57 -0
  58. package/examples/rc1/recursive-records.lawspec +65 -0
  59. package/examples/rc1/refund-conformance.lawspec +45 -0
  60. package/examples/rc1/refund-policy.lawspec +89 -0
  61. package/examples/rc1/requirement-composition.lawspec +90 -0
  62. package/examples/rc1/structural-records.lawspec +54 -0
  63. package/examples/rc1-authoring.lawspec +57 -0
  64. package/examples/specs/abilities.lawspec +67 -65
  65. package/examples/specs/ability_imports.lawspec +58 -57
  66. package/examples/specs/actors.lawspec +23 -22
  67. package/examples/specs/algebra.lawspec +142 -141
  68. package/examples/specs/approvals.lawspec +16 -15
  69. package/examples/specs/async_bindings.lawspec +10 -9
  70. package/examples/specs/async_fetch.lawspec +12 -11
  71. package/examples/specs/atoi_codec.lawspec +16 -15
  72. package/examples/specs/boolean_flags.lawspec +10 -9
  73. package/examples/specs/builtins.lawspec +73 -72
  74. package/examples/specs/canonical_url.lawspec +14 -13
  75. package/examples/specs/collections.lawspec +153 -154
  76. package/examples/specs/composition.lawspec +70 -66
  77. package/examples/specs/concurrent_collections.lawspec +8 -7
  78. package/examples/specs/consistency.lawspec +4 -3
  79. package/examples/specs/contracts.lawspec +80 -79
  80. package/examples/specs/crypto.lawspec +26 -25
  81. package/examples/specs/ctc.lawspec +148 -0
  82. package/examples/specs/currying.lawspec +32 -31
  83. package/examples/specs/data_types.lawspec +50 -49
  84. package/examples/specs/distribution.lawspec +57 -56
  85. package/examples/specs/domain_modeling.lawspec +48 -47
  86. package/examples/specs/durations.lawspec +39 -38
  87. package/examples/specs/equivalent.lawspec +25 -24
  88. package/examples/specs/failures.lawspec +64 -63
  89. package/examples/specs/finite_data.lawspec +32 -31
  90. package/examples/specs/flow_stack.lawspec +64 -63
  91. package/examples/specs/gadt_expressions.lawspec +50 -49
  92. package/examples/specs/generation.lawspec +115 -114
  93. package/examples/specs/handler_bindings.lawspec +42 -40
  94. package/examples/specs/handles.lawspec +2 -1
  95. package/examples/specs/harness.lawspec +45 -43
  96. package/examples/specs/harness_testing.lawspec +18 -13
  97. package/examples/specs/indexed_arithmetic.lawspec +401 -126
  98. package/examples/specs/indexed_families.lawspec +182 -66
  99. package/examples/specs/keywords.lawspec +22 -21
  100. package/examples/specs/limits.lawspec +6 -5
  101. package/examples/specs/list_contracts.lawspec +121 -120
  102. package/examples/specs/list_refinements.lawspec +43 -42
  103. package/examples/specs/lists.lawspec +45 -44
  104. package/examples/specs/matchers.lawspec +79 -78
  105. package/examples/specs/matching.lawspec +43 -42
  106. package/examples/specs/mixed_inputs.lawspec +25 -24
  107. package/examples/specs/models.lawspec +44 -43
  108. package/examples/specs/parse_port.lawspec +28 -27
  109. package/examples/specs/payments.lawspec +55 -54
  110. package/examples/specs/railway.lawspec +59 -58
  111. package/examples/specs/records.lawspec +149 -148
  112. package/examples/specs/records_inner.lawspec +5 -4
  113. package/examples/specs/recursive_refinements.lawspec +30 -29
  114. package/examples/specs/refined_definitions.lawspec +24 -23
  115. package/examples/specs/refinements.lawspec +58 -57
  116. package/examples/specs/resilience.lawspec +159 -158
  117. package/examples/specs/resources.lawspec +61 -60
  118. package/examples/specs/scalar_adapters.lawspec +60 -59
  119. package/examples/specs/scalar_catalog.lawspec +165 -164
  120. package/examples/specs/scalars.lawspec +78 -77
  121. package/examples/specs/scheduling_order.lawspec +8 -7
  122. package/examples/specs/scheduling_overlap.lawspec +5 -4
  123. package/examples/specs/sequences.lawspec +66 -65
  124. package/examples/specs/sessions.lawspec +13 -12
  125. package/examples/specs/slug.lawspec +16 -15
  126. package/examples/specs/sum_refinements.lawspec +42 -41
  127. package/examples/specs/tables.lawspec +29 -28
  128. package/examples/specs/total_functions.lawspec +71 -70
  129. package/examples/specs/workflows.lawspec +101 -100
  130. package/examples-command.mjs +8 -4
  131. package/explain.mjs +114 -0
  132. package/expression-presentation.mjs +333 -0
  133. package/files.mjs +16 -0
  134. package/index.d.ts +406 -11
  135. package/launcher.mjs +9 -2
  136. package/lsp.mjs +235 -0
  137. package/native-evidence.mjs +187 -0
  138. package/native-examples.mjs +8 -1
  139. package/node-events-reporter.mjs +23 -0
  140. package/package.json +8 -1
  141. package/positional-fields.mjs +13 -0
  142. package/proof.d.ts +35 -0
  143. package/proof.mjs +174 -0
  144. package/starter-rc1.lawspec +26 -0
  145. package/starter.lawspec +16 -15
  146. package/templates.mjs +6 -4
  147. package/test-command.mjs +107 -35
  148. package/typed-presentation.mjs +165 -0
package/CHANGELOG.md CHANGED
@@ -6,6 +6,112 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.26.0] - 2026-10-19
10
+
11
+ ### Added
12
+
13
+ - Mandatory named endings for every block, including units, ability law groups,
14
+ harness law groups, let expressions and generator binds. Handler clauses use
15
+ explicit `operation` openers and `end operation` closers.
16
+ - Grammar profile `1.0-rc.2`, shared by compiler and authoring consumers.
17
+
18
+ ### Fixed
19
+
20
+ - Formatter source spans survive wrapping and indentation changes, preserving
21
+ line-scoped generator expressions and phrase names on repeated formatting.
22
+ - Source formatting indents continued applications and expectations, aligns
23
+ record fields and closers, and keeps long phrase declarations together.
24
+ - Both Chapter 6 entry points use the current grammar with readable nested
25
+ cases, conditionals, records and expectation tables.
26
+ - Harness strategies expand parameterized refinements and retain dependent
27
+ predicates during generation and shrinking.
28
+ - Generated Kotlin registrations fit JVM method limits, and Haskell test
29
+ components avoid excessive optimization of large generated test expressions.
30
+ - Large JVM suites share assertion bodies and Scala registration traits retain
31
+ every case without exceeding class-size limits. Haskell boundary helpers
32
+ retain fresh symbol contexts, checked inputs and per-case handler execution.
33
+ - Explicit BEAM harness strategies supply observations alongside finite checks;
34
+ coverage uses actual strategy trials, and known failures cannot bypass their
35
+ strategy validation or coverage checks.
36
+ - Closed record handler initializers preserve distinct local bindings.
37
+ - Indexed generation traverses intervening structural records while preserving
38
+ constructor guards and dependent restrictions.
39
+ - WASM transfers generated JSON directly as UTF-8 and reclaims transport
40
+ buffers between serialized calls; the host queue releases completed responses.
41
+ - Large Groovy and Clojure exports release Java conversion inputs earlier.
42
+ Shared WASM startup uses GHC's in-place compaction within wasm32's address
43
+ limit, preserving the complete generated projects and test domains.
44
+
45
+ ### Removed
46
+
47
+ - Pre-1.0 migration tooling, APIs and compatibility grammars. Active source and
48
+ consumers are updated directly until the API is stable.
49
+
50
+ ## [0.25.0] - 2026-10-18
51
+
52
+ ### Added
53
+
54
+ - Optional case warnings through `lawspec check --warn-matches`, SDK requests
55
+ with `warnMatches: true`, and the VS Code `lawspec.warnMatches` setting.
56
+ Findings retain source spans and remain separate from compiler errors and
57
+ law evidence. An empty warning list does not prove that every branch is reachable.
58
+
59
+ - Checked documentation rejection examples with `reject=<diagnostic-code>`.
60
+ Each fixture requires exactly its expected compiler diagnostic, preserves
61
+ failure context and reports unexpected acceptance after editing.
62
+ - Canonical authoring with `function` and `procedure`, phrase names, explicit
63
+ record and alternative payloads, first-matching cases, readable equality
64
+ wording and nested logical quantifiers.
65
+ - Checked mappings over resolved scalar, record, constructor and collection
66
+ constants. Typed Eq detects duplicate and non-reflexive keys; complete finite
67
+ coverage or an explicit fallback is required. Complete mappings derive
68
+ preimages and, when justified by unique outputs, a Maybe-valued inverse.
69
+ - Formatting, validated project migration from 0.24, four explanation views,
70
+ and compiler-backed editor support. Ordinary interfaces use API schema 5,
71
+ configuration version 2 and the technical language profile `1.0-rc.1`.
72
+ - A canonical Chapter 6 specification, with independent native Python oracles
73
+ for all A-instruction addresses and C-instruction combinations.
74
+ - Scoped native execution evidence shared by the four explanation views,
75
+ including current/stale inputs, actual completions, seeds and failure output.
76
+ Interrupted or undiscovered checks cannot reuse an older successful result;
77
+ sampled model runs remain distinct from proofs.
78
+ - Refund policy and native conformance examples, contradictory requirements
79
+ with concrete refutations, and a stateful order-processing example.
80
+
81
+ ### Changed
82
+
83
+ - Formatting omits optional record-type field commas using the parser's source
84
+ inventory, retaining commas in values, patterns, tuples, comments and text.
85
+ - Formatting preserves line-scoped scenario arguments, including command
86
+ bindings, parallel branches and recovery, while wrapping surrounding code.
87
+ Multiline literal contents retain their whitespace, and block endings after
88
+ a closing quote update the indentation of subsequent declarations.
89
+ - Documentation highlighting now uses the editor's shared TextMate grammar and
90
+ tokenizer. Phrase names end at their delimiter, and canonical function/type
91
+ syntax receives the editor's scopes. Highlighting asset failures preserve
92
+ readable source and compiler interaction.
93
+ - Formatting retains the indentation of abilities, stateful handler operations
94
+ and handled expressions, including conditional initializers.
95
+ - Source formatting covers workflows, models, actors, supervisors, protocols,
96
+ scenarios, resources, wrappers, refinements and harness groups. Paired scenario
97
+ and benchmark names remain indivisible; words inside them do not affect block
98
+ indentation. A top-level `handle` declaration does not open an expression block.
99
+
100
+ - Law verification layers are selected independently and default to none.
101
+ Definition validation and deliberately deferred runtime contracts remain
102
+ mandatory. New-project instructions explicitly select starter law checks.
103
+ - Model checks can be selected independently on all 17 native targets while
104
+ actor and supervisor APIs remain available to ordinary law tests. Native
105
+ manifests register model checks, and runners require their actual completions.
106
+ - Canonical `Set` uses Eq and first-occurrence order; legacy ordered-set uses
107
+ migrate to `SortedSet`. Canonical numeric names distinguish `Whole` and `Nat`.
108
+ - Validated payload transport preserves indexed, GADT and existential metadata.
109
+ Unsupported source, population, dependency and native-binding correspondence
110
+ continues to block migration writes.
111
+ - Java and Groovy structural property checks retain seeded generation and native
112
+ shrinking without exhausting a small domain's JetCheck generation trees.
113
+ Go equality generation handles payload-free alternatives alongside payloads.
114
+
9
115
  ## [0.24.0] - 2026-10-13
10
116
 
11
117
  ### Added
@@ -1634,7 +1740,9 @@ A maintenance release. The language, generated code and API are unchanged from
1634
1740
  machine-sized bindings reject an architecture mismatch. Rust adapters take
1635
1741
  owned values.
1636
1742
 
1637
- [Unreleased]: https://github.com/brain-fuel/lawspec/compare/v0.24.0...HEAD
1743
+ [Unreleased]: https://github.com/brain-fuel/lawspec/compare/v0.26.0...HEAD
1744
+ [0.26.0]: https://github.com/brain-fuel/lawspec/compare/v0.25.0...v0.26.0
1745
+ [0.25.0]: https://github.com/brain-fuel/lawspec/compare/v0.24.0...v0.25.0
1638
1746
  [0.24.0]: https://github.com/brain-fuel/lawspec/compare/v0.23.0...v0.24.0
1639
1747
  [0.23.0]: https://github.com/brain-fuel/lawspec/compare/v0.22.0...v0.23.0
1640
1748
  [0.22.0]: https://github.com/brain-fuel/lawspec/compare/v0.21.0...v0.22.0
package/README.md CHANGED
@@ -5,21 +5,28 @@
5
5
  LawSpec is a specification language for the laws your code must obey. It
6
6
  compiles reusable laws and concrete examples into native property-based tests
7
7
  and implementation adapters for Java, Python, JavaScript, TypeScript, Go,
8
- Haskell, Kotlin and Rust. The compiler is written in Haskell and distributed on
9
- npm as prebuilt WebAssembly, with a Node CLI and a typed JavaScript API.
8
+ Haskell, Kotlin, Rust, C#, F#, Swift, Erlang, Elixir, Gleam, Clojure, Groovy and
9
+ Scala. The compiler is written in Haskell and distributed on npm as prebuilt
10
+ WebAssembly, with a Node CLI and a typed JavaScript API.
11
+
12
+ The canonical authoring examples below target 0.25.0, the minor in preparation
13
+ on `main`.
14
+ Install the development checkout as shown below. For released 0.24.0, use the
15
+ [0.24.0 documentation](https://github.com/brain-fuel/lawspec/tree/v0.24.0).
10
16
 
11
17
  ## Features
12
18
 
13
19
  - **Reusable laws.** A prelude of [round-trip, equivalence and algebraic laws](docs/reference/prelude-algebra.md), and your own generic laws.
14
20
  - **Examples with expected results** that [pin each law down](docs/reference/language/laws-and-examples.md).
15
- - **Native tests** with each target's framework, generators and shrinkers: JetCheck, Hypothesis, fast-check, Rapid, Hedgehog, Kotest and Proptest.
21
+ - **Native tests** with each [target's framework, generators and shrinkers](docs/how-to/targets/index.md).
16
22
  - **A full scalar catalog** with [exact arithmetic](docs/reference/primitives.md) that never wraps.
17
23
  - **Structural data**: [lists, `Maybe`, `Either`, products and sums](docs/reference/language/types-and-data.md).
18
24
  - **Refinements and contracts** with [dependent generation](docs/reference/refinements.md) that constructs valid inputs.
19
- - **Checked total definitions** that are [proved and generated](docs/reference/language/definitions.md) on every target.
25
+ - **Automatic definition checks** for [exhaustiveness, termination, definedness and contracts](docs/reference/language/definitions.md), with deliberately deferred postconditions enforced at runtime.
20
26
  - **Indexed families** such as [length-indexed vectors](docs/reference/language/indexed-families.md), with proved indices.
21
27
  - **Domain modeling** with [wrappers and workflows](docs/reference/language/domain-modeling.md).
22
28
  - **Imports and versioned packages** of [shared laws and types](docs/reference/language/imports-and-packages.md).
29
+ - **Optional Z3 law proofs** through an [explicit solver host](docs/explanation/smt-proof.md), with task identities, limits and outcomes recorded.
23
30
  - **Evidence** for every obligation: [proved, exhaustively checked, property tested, runtime checked or assumed](docs/reference/language/evidence-and-discharge.md).
24
31
  - **Native bindings** to [your existing domain types and generators](docs/how-to/bind-native-types.md).
25
32
  - **Safe regeneration**: [your adapters and build files stay yours](docs/explanation/ownership-and-regeneration.md).
@@ -29,33 +36,33 @@ npm as prebuilt WebAssembly, with a Node CLI and a typed JavaScript API.
29
36
  Node 22+ and the selected target's build tools are required. No Haskell
30
37
  toolchain is needed. The reference platforms are macOS and Linux.
31
38
 
32
- ```sh
33
- npm install --save-dev lawspec@0.24.0
34
- npx lawspec --version
35
- ```
36
-
37
- To try it in a **new, empty directory**, initialize before installing, so that
38
- LawSpec can create `package.json` and its test script:
39
+ The checkout includes the development WASM package. To try it in a **new, empty
40
+ directory**, initialize before installing, so that LawSpec can create
41
+ `package.json` and its test script:
39
42
 
40
43
  ```sh
44
+ git clone https://github.com/brain-fuel/lawspec.git lawspec
41
45
  mkdir lawspec-example
42
46
  cd lawspec-example
43
- npm exec --package=lawspec@0.24.0 -- lawspec init --target javascript
44
- npm install --save-dev lawspec@0.24.0
47
+ node ../lawspec/npm/bin/lawspec.mjs init --target javascript
48
+ npm install --save-dev ../lawspec/npm
49
+ npx lawspec --version
45
50
  npx lawspec check
46
- npx lawspec explain 'example.atoi_codec::itoa and then atoi yields a'
51
+ npx lawspec explain 'example.codec::codec'
47
52
  npx lawspec doctor
48
- npx lawspec generate
49
53
  ```
50
54
 
51
- Implement `src/example/atoi_codec.mjs`, then run `npm test`:
55
+ New projects start with `verification.layers: []`: intrinsic definition checks
56
+ run, and no law verification is selected. Set `verification.layers` to
57
+ `["property", "examples"]` in `lawspec.json`, then run `npx lawspec generate`.
58
+ Implement `src/example/codec.mjs`, then run `npm test`:
52
59
 
53
60
  ```javascript
54
61
  export function itoa(value) { return String(value); }
55
62
  export function atoi(value) { return Number(value); }
56
63
  ```
57
64
 
58
- In an existing project, install LawSpec first, then run
65
+ In an existing project, install the checkout's `npm` directory first, then run
59
66
  `npx lawspec init --target javascript`. Existing build files are preserved;
60
67
  apply the printed setup instructions before generating. See
61
68
  [Install LawSpec and create a project](docs/how-to/install-and-init.md).
@@ -68,19 +75,20 @@ unit example.atoi_codec
68
75
  itoa :: Int32 -> Text
69
76
  atoi :: Text -> Int32
70
77
 
71
- law `round trip` is
72
- definition is
73
- `left inverse` atoi itoa
74
- end
75
- description is
78
+ law "|round trip| is
79
+ definition :
80
+ apply law "|left inverse| atoi itoa
81
+ end definition
82
+ description :
76
83
  "applying {itoa} and then {atoi} recovers the original integer"
77
- end
78
- example `negative integers use a minus sign and round-trip unchanged` is
84
+ end description
85
+ example "|negative integers use a minus sign and round-trip unchanged| :
79
86
  x = -42
80
87
  expect itoa x = "-42"
81
88
  expect atoi (itoa x) = -42
82
- end
83
- end
89
+ end example
90
+ end law
91
+ end unit
84
92
  ```
85
93
 
86
94
  `lawspec explain` shows the final property:
@@ -0,0 +1,39 @@
1
+ UNICODE LICENSE V3
2
+
3
+ COPYRIGHT AND PERMISSION NOTICE
4
+
5
+ Copyright © 1991-2026 Unicode, Inc.
6
+
7
+ NOTICE TO USER: Carefully read the following legal agreement. BY
8
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
9
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
10
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
11
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
12
+
13
+ Permission is hereby granted, free of charge, to any person obtaining a
14
+ copy of data files and any associated documentation (the "Data Files") or
15
+ software and any associated documentation (the "Software") to deal in the
16
+ Data Files or Software without restriction, including without limitation
17
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
18
+ copies of the Data Files or Software, and to permit persons to whom the
19
+ Data Files or Software are furnished to do so, provided that either (a)
20
+ this copyright and permission notice appear with all copies of the Data
21
+ Files or Software, or (b) this copyright and permission notice appear in
22
+ associated Documentation.
23
+
24
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
25
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
27
+ THIRD PARTY RIGHTS.
28
+
29
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
30
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
31
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
32
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
33
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
34
+ FILES OR SOFTWARE.
35
+
36
+ Except as contained in this notice, the name of a copyright holder shall
37
+ not be used in advertising or otherwise to promote the sale, use or other
38
+ dealings in these Data Files or Software without prior written
39
+ authorization of the copyright holder.
package/api.mjs CHANGED
@@ -4,29 +4,12 @@ import {loadCore} from './launcher.mjs';
4
4
  export async function createCompiler() {
5
5
  const call = await loadCore();
6
6
  return {
7
- check: (input) =>
8
- call(
9
- {
10
- schemaVersion: input.nativeBindings === undefined ? 3 : 4,
11
- ...input,
12
- method: 'check',
13
- }
14
- ),
15
- expand: (input) =>
16
- call(
17
- {
18
- schemaVersion: input.nativeBindings === undefined ? 3 : 4,
19
- ...input,
20
- method: 'expand',
21
- }
22
- ),
7
+ format: (input) => call({schemaVersion: 5, ...input, method: 'format'}),
8
+ check: (input) => call({schemaVersion: 5, ...input, method: 'check'}),
9
+ expand: (input) => call({schemaVersion: 5, ...input, method: 'expand'}),
10
+ proofTasks: (input) =>
11
+ call({schemaVersion: 5, ...input, method: 'proofTasks'}),
23
12
  planGeneration: (input) =>
24
- call(
25
- {
26
- schemaVersion: input.nativeBindings === undefined ? 3 : 4,
27
- ...input,
28
- method: 'planGeneration',
29
- }
30
- ),
13
+ call({schemaVersion: 5, ...input, method: 'planGeneration'}),
31
14
  };
32
15
  }