@calcit/procs 0.25.1 → 0.27.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.
package/README.md CHANGED
@@ -60,6 +60,8 @@ Installed binaries:
60
60
  - `calcit`, the runtime and JS compiler
61
61
  - `caps`, for downloading dependencies declared in `deps.cirru`
62
62
 
63
+ 从首次包含该资产的版本起,Ubuntu 22.04 x86_64 的低资源机器可下载 Release 中的 `calcit-ubuntu22.04-x86_64-no-wasm`,无需在本机编译;安装与功能边界见 [无 WASM 构建](docs/installation/no-wasm-build.md)。源码构建可用 `cargo build --release --no-default-features --bin calcit` 关闭 WASM/WASI 代码生成依赖,native 运行与 JS 编译仍可使用。
64
+
63
65
  When developing Calcit core from source, install its runtime locally and install caps from its own release:
64
66
 
65
67
  ```bash
@@ -1148,7 +1148,7 @@ export let _$n_number_$o_fits_$q_ = (value, target) => {
1148
1148
  }
1149
1149
  };
1150
1150
  export let round_$q_ = (a) => {
1151
- return a === Math.round(a);
1151
+ return Number.isInteger(a);
1152
1152
  };
1153
1153
  export let _$n_str_$o_concat = (a, b) => {
1154
1154
  // Optimize string concatenation by avoiding unnecessary toString calls
@@ -1363,7 +1363,16 @@ export let _$n_str_$o_slice = (xs, m, n) => {
1363
1363
  return xs.slice(start, end);
1364
1364
  };
1365
1365
  export let _$n_str_$o_find_index = (x, y) => {
1366
- return x.indexOf(y);
1366
+ const index = x.indexOf(y);
1367
+ if (index <= 0 || !/[\uD800-\uDBFF]/.test(x))
1368
+ return index;
1369
+ // Count only the matched prefix, without allocating a character array.
1370
+ // Lone host surrogates retain the same one-unit behavior as stringScalarOffset.
1371
+ let scalar = 0;
1372
+ for (let offset = 0; offset < index; scalar += 1) {
1373
+ offset += x.codePointAt(offset) > 0xffff ? 2 : 1;
1374
+ }
1375
+ return scalar;
1367
1376
  };
1368
1377
  export let _$n_parse_float = (x) => {
1369
1378
  if (!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(x)) {
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.25.1",
3
+ "version": "0.27.0",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "files": [
6
6
  "lib/",
@@ -21,7 +21,7 @@
21
21
  "test-rs": "cargo test -q",
22
22
  "test-fail": "cargo test -q --bin calcit type_fail_",
23
23
  "test-snippets": "cargo test -q snippets::tests",
24
- "check-js-runtime": "node scripts/check-js-runtime-identity.mjs && cargo build --bin calcit && node scripts/check-string-unicode.mjs && node scripts/check-helper-inference.mjs",
24
+ "check-js-runtime": "node scripts/check-js-runtime-identity.mjs && cargo build --bin calcit && node scripts/check-string-unicode.mjs && node scripts/check-numeric-predicate.mjs && node scripts/check-nil-predicate.mjs && node scripts/check-helper-inference.mjs",
25
25
  "check-js-ffi-source": "cargo build --bin calcit && node scripts/check-js-ffi-source.mjs",
26
26
  "check-literal-paths": "cargo run --bin calcit -- calcit/bench-literal-paths.cirru && cargo run --bin calcit -- --emit-path target/literal-path-js calcit/bench-literal-paths.cirru js && node scripts/bench-literal-paths.mjs",
27
27
  "check-typed-method-rem": "cargo run --bin calcit -- calcit/fibo.cirru && cargo run --bin calcit -- --emit-path target/typed-method-rem-js calcit/fibo.cirru js && node scripts/bench-typed-method-rem.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.25.1",
3
+ "version": "0.27.0",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "files": [
6
6
  "lib/",
@@ -21,7 +21,7 @@
21
21
  "test-rs": "cargo test -q",
22
22
  "test-fail": "cargo test -q --bin calcit type_fail_",
23
23
  "test-snippets": "cargo test -q snippets::tests",
24
- "check-js-runtime": "node scripts/check-js-runtime-identity.mjs && cargo build --bin calcit && node scripts/check-string-unicode.mjs && node scripts/check-helper-inference.mjs",
24
+ "check-js-runtime": "node scripts/check-js-runtime-identity.mjs && cargo build --bin calcit && node scripts/check-string-unicode.mjs && node scripts/check-numeric-predicate.mjs && node scripts/check-nil-predicate.mjs && node scripts/check-helper-inference.mjs",
25
25
  "check-js-ffi-source": "cargo build --bin calcit && node scripts/check-js-ffi-source.mjs",
26
26
  "check-literal-paths": "cargo run --bin calcit -- calcit/bench-literal-paths.cirru && cargo run --bin calcit -- --emit-path target/literal-path-js calcit/bench-literal-paths.cirru js && node scripts/bench-literal-paths.mjs",
27
27
  "check-typed-method-rem": "cargo run --bin calcit -- calcit/fibo.cirru && cargo run --bin calcit -- --emit-path target/typed-method-rem-js calcit/fibo.cirru js && node scripts/bench-typed-method-rem.mjs",