@calcit/procs 0.13.40 → 0.13.42

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
@@ -7,7 +7,7 @@
7
7
 
8
8
  在不掩盖现有运行时行为的前提下,让类型系统逐步阻止业务代码依赖 `nil`:
9
9
 
10
- - 无业务返回值使用 `Unit`(运行时暂仍由 `nil` 承载);
10
+ - 无业务返回值使用 `Unit`,新代码以独立的 `&unit` 值表示;
11
11
  - 正常的“可能缺失”最终使用名义类型 `Option<T>`;
12
12
  - 可恢复失败使用 `Result<T, E>`;
13
13
  - JavaScript `null`/`undefined` 只通过 `JsNullish<T>` 进入类型系统;
@@ -64,7 +64,7 @@
64
64
 
65
65
  ### Unit
66
66
 
67
- `Unit` 只用于副作用操作或明确没有有意义返回值的表达式,例如写文件、注册 watcher。运行时目前仍由 `nil` 承载 Unit,但源码不应因此显式返回 `nil` `;nil`:空函数体直接声明 `Unit`,有副作用的函数让最后一个 Unit effect 自然成为返回项。只有语法必须提供占位节点时才保留 `;nil`,业务代码不得把它当缺失值容器。
67
+ `Unit` 只用于副作用操作或明确没有有意义返回值的表达式,例如写文件、注册 watcher。新代码显式返回 `&unit`;它与 `nil` 不相等、不会通过 `nil?`,JavaScript 后端生成 `void 0`(而 `nil` 仍生成 `null`)。为了兼容既有代码,标注为 `Unit` 的位置仍可接受旧的 `nil`,而 `;nil` 也保留为旧的兼容宏;新业务代码不得把两者当 Unit 标记或缺失值容器。
68
68
 
69
69
  ### Optional<T>(遗留内部表示)
70
70
 
@@ -237,7 +237,7 @@ defstruct NodeProbe
237
237
  ```
238
238
 
239
239
  当前 probe 使用 `Map<Tag, Dynamic>`,应迁移成命名 Struct。Storage mutation、console、
240
- timer registration 等只有副作用的 wrapper 应显式以 `nil` 收尾并声明返回 `Unit`,不因
240
+ timer registration 等只有副作用的 wrapper 应显式以 `&unit` 收尾并声明返回 `Unit`,不因
241
241
  JavaScript 返回 `undefined` 就暴露 `Dynamic`。
242
242
 
243
243
  ## 类型表达案例目录
@@ -0,0 +1,14 @@
1
+ # Explicit Unit literal
2
+
3
+ - Added `&unit` as a distinct runtime `Calcit::Unit` value. It is intentionally
4
+ not a bare `unit` identifier, so existing programs can continue to bind a
5
+ local named `unit`.
6
+ - `&unit` has its own equality, hashing, display, parser/data conversion and
7
+ `type-of` result. JavaScript emits `void 0`, whereas legacy `nil` continues
8
+ to emit `null`.
9
+ - Unit schemas accept both `&unit` and legacy `nil` to preserve existing source
10
+ compatibility. JSON refuses to encode `&unit` so it cannot silently become
11
+ a nullable application value.
12
+ - Updated JS, IR and WASM code generation plus data-shape validation and
13
+ documentation. The parser/codegen tests cover the literal and the backend
14
+ suite passes.
@@ -0,0 +1,5 @@
1
+ # Release 0.13.41
2
+
3
+ - Published the explicit `&unit` literal added in PR #402.
4
+ - Kept the Cargo crate and `@calcit/procs` package versions aligned so projects
5
+ can compile and run code that returns the distinct Unit value.
@@ -0,0 +1,10 @@
1
+ # Skip transitive copies of the project package
2
+
3
+ - A project's direct dependency can reintroduce that same package through a
4
+ transitive dependency. Current namespace collision checks then rejected the
5
+ project source during normal compile and static-analysis commands.
6
+ - Added a project-level merge path that drops only namespaces belonging to the
7
+ root package before applying the existing strict module merge. Direct module
8
+ conflict checks remain unchanged.
9
+ - Added a regression test and verified the real respo-markdown project against
10
+ the current Respo dependency graph.
@@ -0,0 +1,6 @@
1
+ # Release 0.13.42
2
+
3
+ - Publish the project-module merge fix from PR #404.
4
+ - This permits a library to validate itself when a direct dependency includes
5
+ the same package transitively, while preserving strict cross-package module
6
+ conflicts.
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calcit/procs",
3
- "version": "0.13.40",
3
+ "version": "0.13.42",
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.40",
3
+ "version": "0.13.42",
4
4
  "main": "./lib/calcit.procs.mjs",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.7.0",