Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/upload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ jobs:
calcit fix --workflow strict --verify --format json | jq -e '.data.workflow.status == "passed" and .diagnostics == []'
calcit --check-only --ns app.comp.button --ns app.comp.container --ns app.config --ns app.main --ns app.schema --ns app.updater --summary-only
calcit calcit.cirru test --require-match
calcit calcit.cirru analyze quality --baseline config/calcit-quality.cirru
calcit analyze weak-types --only coverage --coverage-level none,partial --format json |
jq -e '.data.definitions == []'
calcit analyze weak-types --format json |
jq -e 'all(.data.definitions[];
.id == "app.schema/store" and
(.occurrences | length <= 1 and all(.[]; .kind == "code-nil" and .intent == "unresolved")))'
calcit analyze weak-types --only deprecated-call --summary-only --format json |
jq -e '.data.summary.calls == 0'

- name: Select CDN asset path
id: asset-path
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ _TODO_

### 使用者影响

升级到 Calcit **0.40.0** 后,请重新安装依赖、生成 JS 并刷新页面。原存档可以继续打开,
升级到 Calcit **0.41.0** 后,请重新安装依赖、生成 JS 并刷新页面。原存档可以继续打开,
Run、文本输入、复制、错误 HUD 和开发模式的 Reel 面板沿用原有行为。

Reel 使用 `State<Op, Store>`,按钮和文本框通过 Respo 的类型化事件派发具名 `Op`。应用派发使用 `Op | reel.typed/Control`,旧面板事件只在渲染入口解码。按钮路径使用 `CoordKey` union,局部状态使用 `Map Tag Bool`。
复制边界以 `CopyScalar` 表示 String、Number、Bool、Tag、Symbol,空值仍复制为空字符串,
复合数据仍会报错。`Store.data` 保留对任意旧存档数据的支持,恢复成功后才启用自动保存。
复合数据仍会报错。新输出操作只接收 `String`,包括 Run 的格式化结果和输出文本框输入。`Store.data` 保留对任意旧存档数据的支持,恢复成功后才启用自动保存。

配对正式 `@calcit/procs` **0.40.0**、Respo **0.19.5**、Reel **0.11.0**、UI **0.15.2**、
配对正式 `@calcit/procs` **0.41.0**、Respo **0.19.5**、Reel **0.11.0**、UI **0.15.2**、
JS-FFI **0.2.13**,传递依赖 Router **0.12.2**。

### 开发

使用 Node 24、Yarn 4.18.0、Caps 0.1.1 和配对 Calcit 0.40.0:
使用 Node 24、Yarn 4.18.0、Caps 0.1.1 和配对 Calcit 0.41.0:

```sh
caps --strict --ci
Expand All @@ -29,11 +29,12 @@ caps verify --toolchain
calcit --check-only --all-defs
calcit fix --workflow strict --verify
calcit test --require-match
calcit analyze quality --baseline config/calcit-quality.cirru
yarn build
node --test scripts/former-regression.test.mjs
```

CI 使用 `analyze weak-types` 执行原质量上限。仅初始 Store 允许一处未解决的 nil,其余项目代码的弱类型、覆盖缺口和弃用调用上限为零。

Use only `calcit.cirru` and `deps.cirru`; do not restore retired
`compact.cirru` and `package.cirru` snapshots. CI uploads and publicly verifies
only frontend `dist/` at `https://cos-sh.tiye.me/Cirru/data-former/`, with a
Expand Down
30 changes: 13 additions & 17 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
:examples $ []
:schema $ quote $ Fn respo.schema/States String
Fn respo.schema/RespoEvent
Fn app.schema/Op $ -> Unit
Fn Op $ -> Unit
-> Unit
-> respo.schema/Component
:features :js-ffi
Expand Down Expand Up @@ -106,10 +106,10 @@
-> Unit
d! $ Op :data $ input-text e
if dev?
Option :some $ reel.comp.reel/comp-typed-reel (>> states :reel) reel ({}) on-control
Option :none
Some $ reel.comp.reel/comp-typed-reel (>> states :reel) reel ({}) on-control
, None
:examples $ []
:schema $ quote $ Fn (reel.typed/State app.schema/Op app.schema/Store)
:schema $ quote $ Fn (reel.typed/State Op Store)
Fn reel.typed/Control $ -> Unit
-> respo.schema/Component
:features :js-ffi
Expand Down Expand Up @@ -183,9 +183,9 @@
:defs $ {}
'*reel $ %{} 'CodeEntry (:doc |)
:code $ quote $ defref *reel
reel.typed/State :base schema/store :store schema/store :records ([]) :pointer (Option :none) :stopped? false :display? false :merged? false
reel.typed/State :base schema/store :store schema/store :records ([]) :pointer None :stopped? false :display? false :merged? false
:examples $ []
:schema $ quote $ Ref (reel.typed/State app.schema/Op app.schema/Store)
:schema $ quote $ Ref (reel.typed/State schema/Op schema/Store)
'dispatch! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn dispatch! (op)
when config/dev? $ println |Dispatch: op
Expand All @@ -195,7 +195,7 @@
reel.typed/record-op updater @*reel action (generate-id!) (js-ffi.shared/now-ms)
, &unit
:examples $ []
:schema $ quote $ Fn app.schema/ResolvedOp (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn schema/ResolvedOp (-> Unit) (:features :js-ffi)
'main! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn main! ()
println "|Running mode:" $ if config/dev? |dev |release
Expand Down Expand Up @@ -272,7 +272,7 @@
:code $ quote $ defenum Op
:states (List respo.schema/CoordKey) (Map Tag Bool)
:content String
:data Dynamic
:data String
:hydrate-storage app.schema/Store
:examples $ []
:schema $ quote EnumDef
Expand Down Expand Up @@ -301,7 +301,7 @@
raise "|Expected Data Former Store"
decode-map-as data 'app.schema/Store
:examples $ []
:schema $ quote $ Fn T (-> app.schema/Store) (:generics T)
:schema $ quote $ Fn T (-> Store) (:generics T)
:tests $ [] $ %{} 'TestEntry (:name |legacy-map-and-store-roundtrip)
:code $ quote $ let
legacy $ {}
Expand Down Expand Up @@ -330,7 +330,7 @@
:code $ quote $ def store
Store :states ({}) :content | :data nil
:examples $ []
:schema $ quote app.schema/Store
:schema $ quote Store
:ns $ %{} 'NsEntry (:doc |)
:code $ quote $ ns app.schema
'app.updater $ %{} 'FileEntry
Expand All @@ -346,19 +346,15 @@
(:data data) (assoc store :data data)
(:hydrate-storage data) data
:examples $ []
:schema $ quote $ Fn app.schema/Store app.schema/Op String Number (-> app.schema/Store)
:schema $ quote $ Fn Store Op String Number (-> Store)
:tests $ [] $ %{} 'TestEntry (:name |nominal-store-operations)
:code $ quote $ let
initial $ Store :states ({}) :content | :data nil
content-store $ updater initial (Op :content |hello) |content-op 1
data-store $ updater content-store
Op :data $ {} $ :ok true
, |data-op 2
data-store $ updater content-store (Op :data |formatted) |data-op 2
hydrated $ Store :states ({}) :content |restored :data 42
assert= (assoc initial :content |hello) content-store
assert=
assoc content-store :data $ {} $ :ok true
, data-store
assert= (assoc content-store :data |formatted) data-store
assert= hydrated $ updater data-store (Op :hydrate-storage hydrated) |hydrate-op 3
:ns $ %{} 'NsEntry (:doc |)
:code $ quote $ ns app.updater
Expand Down
21 changes: 0 additions & 21 deletions config/calcit-quality.cirru

This file was deleted.

2 changes: 1 addition & 1 deletion deps.cirru
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

{} (:calcit-version |0.40.0)
{} (:calcit-version |0.41.0)
:version |0.1.2
:dependencies $ {} (|Respo/reel.calcit |0.11.0)
|Respo/respo-ui.calcit |0.15.2
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"vite": "8.3.3"
},
"dependencies": {
"@calcit/procs": "0.40.0",
"@calcit/procs": "0.41.0",
"copy-text-to-clipboard": "^3.1.0",
"feather-icons": "^4.29.0",
"shortid": "^2.2.16"
Expand Down
3 changes: 3 additions & 0 deletions scripts/former-regression.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ test('typed hydrate-storage operation preserves the exact Store', () => {
const wire = c.parse_cirru_edn(c.format_cirru_edn(saved));
assert.ok(c._$e_(restore_store(wire), saved));
assert.ok(c._$e_(restore_store(map(t.states, states, t.content, 'saved', t.data, field(saved, t.data))), saved));
const legacyData = map(t.value, c._$L_(1, false));
const legacyStore = restore_store(map(t.states, states, t.content, 'saved', t.data, legacyData));
assert.ok(c._$e_(field(legacyStore, t.data), legacyData));
assert.throws(() => restore_store(map(t.states, map(), t.content, 42, t.data, 'saved')));
assert.ok(c._$e_(updater(store, c._PCT__$o__$o_(Op, c.newTag('hydrate-storage'), saved), 'hydrate', 1), saved));
});
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.