tslaws 1.0.0 → 1.2.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 (51) hide show
  1. package/README.md +183 -187
  2. package/dist/api.d.ts +86 -0
  3. package/dist/api.js +78 -0
  4. package/dist/badge.d.ts +111 -0
  5. package/dist/badge.js +288 -0
  6. package/dist/browser.d.ts +5 -2
  7. package/dist/browser.js +403 -173
  8. package/dist/browserApi.d.ts +305 -0
  9. package/dist/browserApi.js +456 -0
  10. package/dist/browserServer.d.ts +13 -0
  11. package/dist/browserServer.js +406 -0
  12. package/dist/certificates.js +50 -28
  13. package/dist/chc.d.ts +13 -1
  14. package/dist/chc.js +40 -8
  15. package/dist/check.js +64 -36
  16. package/dist/cli.d.ts +16 -0
  17. package/dist/cli.js +78 -1
  18. package/dist/compile.js +46 -5
  19. package/dist/coverage.d.ts +17 -0
  20. package/dist/coverage.js +297 -24
  21. package/dist/derived.d.ts +2 -0
  22. package/dist/derived.js +9 -4
  23. package/dist/generators.d.ts +5 -1
  24. package/dist/generators.js +50 -4
  25. package/dist/githubCli.js +88 -15
  26. package/dist/isolate.d.ts +5 -0
  27. package/dist/isolate.js +1 -1
  28. package/dist/lawHost.d.ts +2 -0
  29. package/dist/lawHost.js +32 -21
  30. package/dist/lawRuntime.d.ts +6 -0
  31. package/dist/lawRuntime.js +86 -7
  32. package/dist/nativeZ3.d.ts +11 -0
  33. package/dist/nativeZ3.js +162 -0
  34. package/dist/plan.d.ts +7 -0
  35. package/dist/plan.js +11 -0
  36. package/dist/pluginHooks.d.ts +4 -0
  37. package/dist/pluginHooks.js +13 -4
  38. package/dist/proofCache.d.ts +24 -0
  39. package/dist/proofCache.js +135 -0
  40. package/dist/property.d.ts +2 -2
  41. package/dist/property.js +33 -8
  42. package/dist/propertyWorker.js +14 -8
  43. package/dist/sandbox.d.ts +1 -1
  44. package/dist/sandbox.js +48 -8
  45. package/dist/seal.js +47 -8
  46. package/dist/smt.d.ts +16 -2
  47. package/dist/smt.js +241 -31
  48. package/dist/symbolic.d.ts +38 -3
  49. package/dist/symbolic.js +504 -47
  50. package/dist/types.d.ts +9 -0
  51. package/package.json +7 -7
package/dist/types.d.ts CHANGED
@@ -83,6 +83,10 @@ export interface CheckOptions {
83
83
  browserPauseMs?: number;
84
84
  /** The engine that runs browser laws. Default chromium, or `TSLAWS_BROWSER_ENGINE`. */
85
85
  browser?: 'chromium' | 'firefox' | 'webkit';
86
+ /** Isolation mode for browser laws: `'page'` (top-level BrowserContext, default) or `'iframe'`. */
87
+ browserIsolation?: 'page' | 'iframe';
88
+ /** Launch browser laws in a visible window for interactive debugging (`--headed`). */
89
+ headed?: boolean;
86
90
  /** Flags the person gave on the command line, which beat `tslaws.json`: `runs`, `property-timeout`. */
87
91
  explicit?: ('runs' | 'property-timeout')[];
88
92
  /**
@@ -102,6 +106,11 @@ export interface CheckOptions {
102
106
  regressionExamples?: string[];
103
107
  /** Check only the laws with these names; the others are skipped without a result or an event. */
104
108
  only?: string[];
109
+ /**
110
+ * Check only the laws with these keys (`file::name`), and leave the coverage analysis out: the run is a partial one. Set
111
+ * by `github merge`, which needs the outcome of the laws the lock does not record yet and nothing else.
112
+ */
113
+ onlyKeys?: string[];
105
114
  /** Told as the check proceeds: which laws there are, which is running, each result, and frames of a browser page. */
106
115
  onEvent?: (event: LawEvent) => void;
107
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tslaws",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "description": "Runs and checks `law` declarations compiled by tsc-laws: property tests, SMT proofs, tamper lock.",
5
5
  "bin": {
6
6
  "tslaws": "bin/tslaws.js"
@@ -63,7 +63,7 @@
63
63
  },
64
64
  "scripts": {
65
65
  "build": "tsc -p tsconfig.json",
66
- "test": "node --test --test-concurrency=1 test/*.test.ts",
66
+ "test": "node --test --test-concurrency=3 --import ./test/setup.ts test/*.test.ts",
67
67
  "check": "node bin/tslaws.js check",
68
68
  "laws": "node bin/tslaws.js check laws/core.laws.ts",
69
69
  "check:watch": "node bin/tslaws.js check --watch"
@@ -89,11 +89,11 @@
89
89
  }
90
90
  },
91
91
  "optionalDependencies": {
92
- "tslaws-compiler-darwin-arm64": "1.0.0",
93
- "tslaws-compiler-darwin-x64": "1.0.0",
94
- "tslaws-compiler-linux-arm64-gnu": "1.0.0",
95
- "tslaws-compiler-linux-x64-gnu": "1.0.0",
96
- "tslaws-compiler-win32-x64-msvc": "1.0.0"
92
+ "tslaws-compiler-darwin-arm64": "1.2.0",
93
+ "tslaws-compiler-darwin-x64": "1.2.0",
94
+ "tslaws-compiler-linux-arm64-gnu": "1.2.0",
95
+ "tslaws-compiler-linux-x64-gnu": "1.2.0",
96
+ "tslaws-compiler-win32-x64-msvc": "1.2.0"
97
97
  },
98
98
  "publishConfig": {
99
99
  "access": "public"