@calcit/procs 0.13.10 → 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.
- package/.yarn/install-state.gz +0 -0
- package/history/202608111550-trailing-option-parameters.md +6 -0
- package/history/202608111610-review-core-option-identity.md +5 -0
- package/history/202608111624-js-string-replace-termination.md +5 -0
- package/history/202608111650-release-0.13.11.md +5 -0
- package/lib/calcit.procs.mjs +5 -5
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/ts-src/calcit.procs.mts +5 -5
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -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.
|
package/lib/calcit.procs.mjs
CHANGED
|
@@ -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
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
}
|
|
1223
|
-
return
|
|
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
package/package.json
CHANGED
package/ts-src/calcit.procs.mts
CHANGED
|
@@ -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
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
}
|
|
1336
|
-
return
|
|
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 => {
|