@calcit/procs 0.13.9 → 0.13.11

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.
Binary file
@@ -0,0 +1,40 @@
1
+ # Improve agent migration convergence
2
+
3
+ Migrating Respo and its dependent modules to stricter Calcit types exposed a
4
+ few CLI and compiler failures that made automated repairs unnecessarily slow or
5
+ unsafe:
6
+
7
+ - `cr edit imports` documented Cirru input but only accepted a single flat rule;
8
+ multi-rule input effectively required JSON.
9
+ - Cirru transaction output expanded quoted empty lists into a shape that did not
10
+ round-trip, blocking safe insertion of zero-argument function definitions.
11
+ - definition revision hashes rejected leaf-shaped examples/tests, so semantic
12
+ queries failed on otherwise valid definition-attached tests.
13
+ - large but finite UI/Markdown dependency graphs overflowed the 16 MiB codegen
14
+ worker stack before diagnostics could identify the actual type errors.
15
+ - several tree command help strings still advertised removed comma-separated
16
+ paths even though the parser requires `@2.1.0` coordinates.
17
+ - concurrent mutation processes can overwrite each other's snapshot changes,
18
+ which was easy to trigger when an agent updated multiple entries in parallel.
19
+
20
+ Changes:
21
+
22
+ - Accept a quoted Cirru `[]` whose child expressions are import rules in
23
+ `cr edit imports`, while preserving JSON compatibility and rejecting
24
+ malformed flat children.
25
+ - Emit inline Cirru for transaction quoted code so empty lists round-trip.
26
+ - Give leaf examples/tests stable revision encodings without changing existing
27
+ list revision hashes.
28
+ - Raise the dedicated codegen worker stack to 64 MiB, which is sufficient for
29
+ the current Respo UI/Markdown graph and still keeps recursion isolated from
30
+ the process main thread.
31
+ - Align all path option help with the dot-separated coordinate parser.
32
+ - Document that writes to one snapshot must be serialized, or grouped in a
33
+ revision-guarded transaction; independent snapshots/worktrees may still run
34
+ in parallel.
35
+
36
+ Real-project validation used local Respo, Router, Markdown, UI, Reel, and Alerts
37
+ snapshots after removing the obsolete Lilac module dependency. UI, Router, Reel,
38
+ Alerts, and all three Markdown entries completed JS codegen. Calcit built-in
39
+ tests passed 35/35 in Respo and 6/6 in Router; no external `calcit-test` runner
40
+ was used.
@@ -0,0 +1,13 @@
1
+ # Release 0.13.10
2
+
3
+ Release the agent migration convergence improvements merged in PR #333:
4
+
5
+ - quoted Cirru import-list input for `cr edit imports`;
6
+ - safe transaction round-tripping for quoted empty lists;
7
+ - revision support for leaf examples and definition-attached tests;
8
+ - a larger codegen worker stack for finite real-world module graphs;
9
+ - corrected tree path help and serialized snapshot mutation guidance.
10
+
11
+ The changes were validated against the Respo dependency chain without Lilac or
12
+ the external `calcit-test` module, in addition to the full Calcit Rust, native,
13
+ JavaScript, agent-interface, and WASM gates.
@@ -0,0 +1,6 @@
1
+ ## Trailing Option parameters
2
+
3
+ - Treat only the continuous `Option<T>` suffix in a typed fixed-arity function schema as omittable; an earlier `Option<T>` does not make later required parameters optional, and rest parameters keep their existing behavior.
4
+ - Fill omitted arguments with the nominal `calcit.core/Option` `%none` value in the native runtime and with the matching `%none` enum value in generated JavaScript.
5
+ - Keep preprocessing arity checks and method-call validation aligned with runtime behavior so accepted calls do not produce false arity diagnostics.
6
+ - Consolidate the end-to-end coverage beside the legacy `?` argument tests, documenting `Option` as the preferred replacement for `?` and `nil` in new typed APIs.
@@ -0,0 +1,5 @@
1
+ ## Review follow-up: core Option identity
2
+
3
+ - Omitted-argument sugar is reserved for source references to `calcit.core/Option`; resolved enum values do not retain a namespace and therefore cannot be safely treated as the core type.
4
+ - A user-defined enum named `Option`, including one with `some` and `none` variants, keeps exact arity and never receives an implicit `%none` argument.
5
+ - Documentation examples use callable enum constructors: `(%none)` and `(%some value)`.
@@ -0,0 +1,5 @@
1
+ ## JS string replacement termination
2
+
3
+ - `&str:replace` must replace each original literal match exactly once; repeatedly replacing until the pattern disappears loops forever when the replacement contains the pattern.
4
+ - Escape the literal pattern and use a global callback replacement so replacement text remains literal too, including `$` sequences.
5
+ - Keep empty-pattern behavior aligned with Rust `str::replace`, and cover self-containing replacements, regex metacharacters, literal replacement text, and empty patterns in the JS runtime regression script.
@@ -0,0 +1,5 @@
1
+ ## Release 0.13.11
2
+
3
+ - Bump the Cargo crate and `@calcit/procs` package together so published artifacts stay version-aligned.
4
+ - This release includes trailing `Option` parameter sugar, stronger typed Option/struct handling, and the terminating JS string replacement fix from the preceding merged PRs.
5
+ - Run the full repository validation before tagging and publishing the release.
@@ -1216,11 +1216,11 @@ export let _$n_set_$o_intersection = (xs, ys) => {
1216
1216
  return xs.intersection(ys);
1217
1217
  };
1218
1218
  export let _$n_str_$o_replace = (x, y, z) => {
1219
- var result = x;
1220
- while (result.indexOf(y) >= 0) {
1221
- result = result.replace(y, z);
1222
- }
1223
- return result;
1219
+ // Use a callback replacement so `$` sequences in `z` remain literal, matching Rust's
1220
+ // `str::replace`. Escaping `y` preserves the proc's literal-pattern contract, while the
1221
+ // global regex completes each original match once even when `z` contains `y`.
1222
+ const literalPattern = y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1223
+ return x.replace(new RegExp(literalPattern, "gu"), () => z);
1224
1224
  };
1225
1225
  export let split = (xs, x) => {
1226
1226
  return new CalcitSliceList(xs.split(x));
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.9",
3
+ "version": "0.13.11",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.9",
3
+ "version": "0.13.11",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",
@@ -1329,11 +1329,11 @@ export let _$n_set_$o_intersection = (xs: CalcitSet, ys: CalcitSet): CalcitSet =
1329
1329
  };
1330
1330
 
1331
1331
  export let _$n_str_$o_replace = (x: string, y: string, z: string): string => {
1332
- var result = x;
1333
- while (result.indexOf(y) >= 0) {
1334
- result = result.replace(y, z);
1335
- }
1336
- return result;
1332
+ // Use a callback replacement so `$` sequences in `z` remain literal, matching Rust's
1333
+ // `str::replace`. Escaping `y` preserves the proc's literal-pattern contract, while the
1334
+ // global regex completes each original match once even when `z` contains `y`.
1335
+ const literalPattern = y.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1336
+ return x.replace(new RegExp(literalPattern, "gu"), () => z);
1337
1337
  };
1338
1338
 
1339
1339
  export let split = (xs: string, x: string): CalcitSliceList => {