@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.
- package/.yarn/install-state.gz +0 -0
- package/RFCs/08-05-systematic-nil-reduction-rfc.md +2 -2
- package/RFCs/08-18-calcit-typed-js-ffi-boundary-rfc.md +1 -1
- package/editing-history/202608241218-explicit-unit-literal.md +14 -0
- package/editing-history/202608241240-release-01341.md +5 -0
- package/editing-history/202608241335-skip-transitive-self-modules.md +10 -0
- package/editing-history/202608241345-release-01342.md +6 -0
- package/lib/package.json +1 -1
- package/package.json +1 -1
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
在不掩盖现有运行时行为的前提下,让类型系统逐步阻止业务代码依赖 `nil`:
|
|
9
9
|
|
|
10
|
-
- 无业务返回值使用 `Unit
|
|
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
|
|
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 应显式以 `
|
|
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,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.
|
package/lib/package.json
CHANGED