diff --git a/.github/workflows/upload.yaml b/.github/workflows/upload.yaml index ce72927..872e6ed 100644 --- a/.github/workflows/upload.yaml +++ b/.github/workflows/upload.yaml @@ -13,14 +13,14 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 15 steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/checkout@v7.0.1 with: persist-credentials: false - - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 + - uses: actions/setup-node@v6.5.0 with: node-version: 24 package-manager-cache: false - - uses: calcit-lang/setup-calcit@ca701be5a471759e442aa053cd100720bbe1f09f # v1.5.0 + - uses: calcit-lang/setup-calcit@v1.5.0 with: tools: calcit,caps caps-version: "0.1.1" @@ -53,7 +53,7 @@ jobs: base_url="./" fi yarn vite build --base="$base_url" - - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + - uses: actions/upload-artifact@v7.0.2 with: name: client-dist path: dist/ @@ -70,7 +70,7 @@ jobs: cancel-in-progress: false queue: max steps: - - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 + - uses: actions/download-artifact@v8.0.2 with: name: client-dist path: dist/ @@ -85,7 +85,7 @@ jobs: secret-id: ${{ secrets.COS_SECRET_ID }} secret-key: ${{ secrets.COS_SECRET_KEY }} - name: Deploy to original server path - uses: Pendect/action-rsyncer@8e05ffa5c93e5d9c9b167796b26044d2c616b2b9 # v2.0.0 + uses: Pendect/action-rsyncer@v2.0.0 env: DEPLOY_KEY: ${{ secrets.rsync_private_key }} with: diff --git a/.yarnrc.yml b/.yarnrc.yml index 3186f3f..4a19046 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1 +1,3 @@ nodeLinker: node-modules + +npmMinimalAgeGate: 60m diff --git a/README.md b/README.md index 1412abc..fd5ce94 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,16 @@ ClojureScript, beginners' home page > No offending. I'm just trying to explore if such a page is meaningful for beginners. +### Calcit 0.32.1:使用者影响 + +CLI 与 `@calcit/procs` 配对正式 **0.32.1**,需重新安装完整图、生成 JS 并完整刷新。严格安装已发布 Respo **0.17.1**、Reel **0.7.0**、Markdown **0.5.0**、UI **0.9.0**、JS FFI **0.2.9**;UI 固定的传递 Router 仍为精确 **0.9.0-alpha.4**,不混入本地候选或 hash。导航、展示内容、高亮、启动随机选择、存档恢复顺序及 JS HUD 保持;`content/*.cljs` 仍是展示示例,不作为 Calcit 源码改写。 + +官方 format 规范化九处旧类型写法;32 个应用定义的代码/schema/metadata/原测试与 main 经官方 format 归一后的完整查询视图相同。原完整 strict、all-defs、两项业务测试和零弃用调用/动态方法门禁保留,不增加强转、预算、校验脚本或测试框架。Actions 使用已核对原 SHA 的精确正式 tag;包等待期按维护者明确的一小时策略显式为 60m,COS 内置 verify 和原部署路径不变。 + +精确官方 0.32.1、真实已发布六模块 Caps 图、307/307 定义、完整 strict(diagnostics=[])、原两项测试、零动态方法/弃用调用、canonical dry-run、immutable、工具链配对与构建通过。实际隔离 IAB 中 Logo 将展示从 Thread macros 切到 Data manipulation、再到 EDN,语法高亮和刷新正常,warning/error 为空。保留原大 bundle 提示,不调整阈值;未点击复制、访问外部工具或操作真实存档,未重验坏存档、HMR 和移动端。精确 PR CI 结果在迁移 PR 更新,不将本地验收当作生产部署成功。 + +历史 Git Snapshot 的旧类型暂不能由 program-diff 加载([Calcit #2503](https://github.com/calcit-lang/calcit/issues/2503));本轮对历史 blob 隔离副本仅经官方 format,再查询全部定义对照,不绕过原门禁。下方 0.31 说明为历史记录。 + ### Workflow 使用者影响:应用使用精确配套正式 Calcit / `@calcit/procs` **0.31.0**,以及 @@ -51,7 +61,7 @@ runs the two attached updater/hydration tests, and builds the frontend. 旧 alpha.5 曾完成真实浏览器渲染、高亮、展示切换与刷新验收;这不替代本轮正式图的 CI 和实际浏览器证据。保留已有两项 updater/hydration 测试,不新增验证脚本或预算。 -Yarn 使用默认 Git 审批与包等待期,不保留 procs 预批准、不通配批准任意 Git 仓库或关闭包等待期。 +Yarn 保留默认 Git 审批;包等待期按维护者确认的一小时策略显式为 60m,不保留 procs 预批准、不通配批准任意 Git 仓库或关闭包等待期。 Main/master deployment uploads frontend resources through `worktools/cos-upload-action` with built-in public checksum verification. The diff --git a/calcit.cirru b/calcit.cirru index e22c7f1..8635033 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -33,8 +33,7 @@ comp-footer when dev? $ comp-reel (>> states :reel) (reel-view/view-data reel) ({}) :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] $ :: 'reel.typed/State 'app.schema/Action 'app.schema/Store + :schema $ quote $ Fn (reel.typed/State app.schema/Action app.schema/Store) (-> respo.schema/Component) 'comp-footer $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-footer () div @@ -50,8 +49,7 @@ :target |_blank <> "|Site built with Calcit & Respo." :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] + :schema $ quote $ Fn (-> respo.schema/Component) 'comp-header $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-header () div @@ -63,10 +61,9 @@ {} :style $ .merge ui/row-center $ {} (:cursor |pointer) :on-click $ fn (e d!) - hint-fn $ {} (:return 'Unit) - :args $ [] (:: 'Map 'Tag 'Dynamic) - :: 'Fn $ {} (:rest 'Dynamic) (:return 'Unit) - :args $ [] 'Dynamic + hint-fn $ Fn (Map Tag Dynamic) + Fn Dynamic & Dynamic $ -> Unit + -> Unit d! $ :: :pick-case $ rand-int 10 div $ {} $ :style {} @@ -83,8 +80,7 @@ :text-decoration |none div $ {} :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] + :schema $ quote $ Fn (-> respo.schema/Component) 'comp-resources $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-resources () div @@ -92,8 +88,7 @@ comp-md-block (inline |resource.md) {} $ :class-name |content :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] + :schema $ quote $ Fn (-> respo.schema/Component) 'comp-tool-card $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-tool-card (info) div @@ -127,8 +122,7 @@ :height |40px (:none) nil :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] 'app.schema/ToolInfo + :schema $ quote $ Fn app.schema/ToolInfo (-> respo.schema/Component) 'comp-tools $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-tools () div @@ -152,8 +146,7 @@ comp-tool-card $ ToolInfo :name |shadow-cljs :logo (Option :some |http://cdn.tiye.me/logo/shadow-cljs.png) :url |http://shadow-cljs.org :description "|ClojureScript compilation made easy." comp-tool-card $ ToolInfo :name |figwheel-main :logo (Option :none) :url |https://figwheel.org :description "|Figwheel Main builds your ClojureScript code and hot loads it as you are coding!" :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] + :schema $ quote $ Fn (-> respo.schema/Component) :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.comp.container :require @@ -198,8 +191,7 @@ :style $ {} (:background-color |transparent) (:font-family ui/font-code) (:color |white) (:padding |8px) (:margin |auto) :highlight highlighter :examples $ [] - :schema $ :: 'Fn $ {} (:return 'respo.schema/Component) - :args $ [] 'Number + :schema $ quote $ Fn Number (-> respo.schema/Component) 'showcases $ %{} 'CodeEntry (:doc |) :code $ quote $ def showcases {} @@ -214,7 +206,7 @@ 8 $ Showcase :code (inline |atom.cljs) :text |Atom :url |https://clojuredocs.org/clojure.core/atom 9 $ Showcase :code (inline |edn.cljs) :text |EDN :url |https://learnxinyminutes.com/docs/edn/ :examples $ [] - :schema $ :: 'Map 'Number 'app.schema/Showcase + :schema $ quote $ Map Number app.schema/Showcase :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.comp.showcase :require @@ -231,17 +223,17 @@ 'Site $ %{} 'CodeEntry (:doc |) :code $ quote $ defstruct Site (:dev-ui 'String) (:release-ui 'String) (:cdn-url 'String) (:title 'String) (:icon 'String) (:storage-key 'String) :examples $ [] - :schema $ :: 'StructDef + :schema $ quote StructDef 'dev? $ %{} 'CodeEntry (:doc |) :code $ quote $ def dev? = |dev $ .unwrap-or (get-env |mode) |release :examples $ [] - :schema $ :: 'Bool + :schema $ quote Bool 'site $ %{} 'CodeEntry (:doc |) :code $ quote $ def site Site :dev-ui |http://localhost:8100/main.css :release-ui |http://cdn.tiye.me/favored-fonts/main.css :cdn-url |http://cdn.tiye.me/clojure-script-org/ :title "|ClojureScript, beginners' home page" :icon |http://cdn.tiye.me/logo/cljs.png :storage-key |clojure-script.org :examples $ [] - :schema $ :: 'app.config/Site + :schema $ quote app.config/Site :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.config 'app.main $ %{} 'FileEntry @@ -249,7 +241,7 @@ '*reel $ %{} 'CodeEntry (:doc |) :code $ quote $ defref *reel (typed-reel/new-reel schema/store) :examples $ [] - :schema $ :: 'Ref $ :: 'reel.typed/State 'app.schema/Action 'app.schema/Store + :schema $ quote $ Ref (reel.typed/State app.schema/Action app.schema/Store) 'dispatch! $ %{} 'CodeEntry :doc "|One checked Respo event boundary: legacy anonymous enums normalize to typed Reel controls or nominal application Actions. Dynamic remains only because Respo render! owns an open dispatcher contract; business updater/store are concrete." :code $ quote $ defn dispatch! (input) @@ -264,8 +256,7 @@ raise "|Expected one action enum" , &unit :examples $ [] - :schema $ :: 'Fn $ {} (:return 'Unit) - :args $ [] 'Dynamic + :schema $ quote $ Fn Dynamic (-> Unit) 'main! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn main! () println "|Running mode:" $ if config/dev? |dev |release @@ -280,53 +271,43 @@ (:none) &unit render-app! add-watch! *reel :changes $ fn (r p) - hint-fn $ {} (:return 'Unit) - :args $ [] (:: 'reel.typed/State 'app.schema/Action 'app.schema/Store) (:: 'reel.typed/State 'app.schema/Action 'app.schema/Store) + hint-fn $ Fn (reel.typed/State app.schema/Action app.schema/Store) (reel.typed/State app.schema/Action app.schema/Store) (-> Unit) render-app! listen-devtools! |a dispatch! browser/add-event-listener! |beforeunload $ fn (event) - hint-fn $ {} (:return 'Unit) - :args $ [] 'js-ffi.browser/EventHost + hint-fn $ Fn js-ffi.browser/EventHost $ -> Unit save-store! dispatch! $ :: :pick-case $ rand-int 10 println "|App started." :examples $ [] - :schema $ :: 'Fn $ {} (:return 'Unit) - :args $ [] - :features $ #{} :js-ffi + :schema $ quote $ Fn (-> Unit) (:features :js-ffi) 'mount-target $ %{} 'CodeEntry (:doc |) :code $ quote $ defn mount-target () let document-host $ js-cast js/document 'respo.dom/DomDocument document-host .query-selector |.app :examples $ [] - :schema $ :: 'Fn $ {} - :args $ [] - :features $ #{} :js-ffi - :return $ :: 'JsNullish 'respo.dom/DomElement + :schema $ quote $ Fn + -> $ JsNullish respo.dom/DomElement + :features :js-ffi 'reload! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn reload! () if (js-nullish? build-errors) do (remove-watch! *reel :changes) (clear-cache!) add-watch! *reel :changes $ fn (reel prev) - hint-fn $ {} (:return 'Unit) - :args $ [] (:: 'reel.typed/State 'app.schema/Action 'app.schema/Store) (:: 'reel.typed/State 'app.schema/Action 'app.schema/Store) + hint-fn $ Fn (reel.typed/State app.schema/Action app.schema/Store) (reel.typed/State app.schema/Action app.schema/Store) (-> Unit) render-app! reset! *reel $ typed-reel/refresh updater @*reel schema/store hud! |ok~ |Ok hud! |error build-errors , &unit :examples $ [] - :schema $ :: 'Fn $ {} (:return 'Unit) - :args $ [] - :features $ #{} :js-ffi + :schema $ quote $ Fn (-> Unit) (:features :js-ffi) 'render-app! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn render-app! () render! (mount-target) (comp-container @*reel) dispatch! :examples $ [] - :schema $ :: 'Fn $ {} (:return 'Unit) - :args $ [] - :features $ #{} :js-ffi + :schema $ quote $ Fn (-> Unit) (:features :js-ffi) 'save-store! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn save-store! () let @@ -337,8 +318,7 @@ :content $ :content store :case-idx $ :case-idx store :examples $ [] - :schema $ :: 'Fn $ {} (:return 'Unit) - :args $ [] + :schema $ quote $ Fn (-> Unit) :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.main :require @@ -360,38 +340,40 @@ :defs $ {} 'Action $ %{} 'CodeEntry (:doc |) :code $ quote $ defenum Action - :states (:: 'List 'Dynamic) 'Dynamic + :states + quote $ List Dynamic + , 'Dynamic :content 'String :pick-case 'Number :hydrate-storage 'app.schema/Store :examples $ [] - :schema $ :: 'EnumDef + :schema $ quote EnumDef 'DispatchOp $ %{} 'CodeEntry (:doc "|Respo 入口事件合同,容纳应用和 Reel 控制事件;代表值不发送。") :code $ quote $ def DispatchOp (:: :unhandled) :examples $ [] - :schema $ :: 'Enum + :schema $ quote Enum 'Showcase $ %{} 'CodeEntry (:doc |) :code $ quote $ defstruct Showcase (:code 'String) (:text 'String) (:url 'String) :examples $ [] - :schema $ :: 'StructDef + :schema $ quote StructDef 'Store $ %{} 'CodeEntry :doc "|Application fields are concrete. Only the Respo component-state tree retains its existing heterogeneous payload contract; hydrate and updates must pass a runtime decoder." :code $ quote $ defstruct Store - :states $ :: 'Map 'Tag 'Dynamic + :states $ quote $ Map Tag Dynamic :content 'String :case-idx 'Number :examples $ [] - :schema $ :: 'StructDef + :schema $ quote StructDef 'ToolInfo $ %{} 'CodeEntry (:doc |) :code $ quote $ defstruct ToolInfo (:name 'String) (:url 'String) (:description 'String) - :logo $ :: 'Option 'String + :logo $ quote $ Option String :examples $ [] - :schema $ :: 'StructDef + :schema $ quote StructDef 'store $ %{} 'CodeEntry (:doc |) :code $ quote $ def store Store :states ({}) :content | :case-idx 0 :examples $ [] - :schema $ :: 'app.schema/Store + :schema $ quote app.schema/Store :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.schema 'app.updater $ %{} 'FileEntry @@ -411,8 +393,7 @@ Action :hydrate-storage $ decode-map-as data 'app.schema/Store _ $ raise "|Unknown application action" :examples $ [] - :schema $ :: 'Fn $ {} (:return 'app.schema/Action) - :args $ [] 'Enum + :schema $ quote $ Fn Enum (-> app.schema/Action) :tests $ [] $ %{} 'TestEntry (:name |restores-legacy-store-map) :code $ quote $ let action $ decode-action $ :: :hydrate-storage @@ -438,8 +419,7 @@ (:pick-case c) (assoc store :case-idx c) (:hydrate-storage d) d :examples $ [] - :schema $ :: 'Fn $ {} (:return 'app.schema/Store) - :args $ [] 'app.schema/Store 'app.schema/Action 'String 'Number + :schema $ quote $ Fn app.schema/Store app.schema/Action String Number (-> app.schema/Store) :tests $ [] $ %{} 'TestEntry (:name |updates-concrete-store) :code $ quote $ let original $ Store :states ({}) :content | :case-idx 0 @@ -459,20 +439,16 @@ :defs $ {} 'HighlightHost $ %{} 'CodeEntry (:doc |) :code $ quote $ deftrait HighlightHost - .highlight $ :: 'Fn $ {} - :args $ [] 'app.util/HighlightHost 'String 'JsObject - :return 'JsObject - .register-language! $ :: 'Fn $ {} - :args $ [] 'app.util/HighlightHost 'String 'Fn - :return 'Unit + .highlight $ quote $ Fn app.util/HighlightHost String JsObject (-> JsObject) + .register-language! $ quote $ Fn app.util/HighlightHost String Fn (-> Unit) :examples $ [] :ffi $ {} (:backend :js) (:kind :external-object) - :schema $ :: 'Trait + :schema $ quote Trait 'HighlightResult $ %{} 'CodeEntry (:doc |) :code $ quote $ deftrait HighlightResult (:value 'String) :examples $ [] :ffi $ {} (:backend :js) (:kind :external-object) - :schema $ :: 'Trait + :schema $ quote Trait 'highlighter $ %{} 'CodeEntry (:doc |) :code $ quote $ defn highlighter (code lang) let @@ -486,17 +462,14 @@ escape-html code if (string? html) html $ raise "|Markdown highlighter expected HTML String" :examples $ [] - :schema $ :: 'Fn $ {} (:return 'String) - :args $ [] 'String 'String - :features $ #{} :js-ffi + :schema $ quote $ Fn String String (-> String) (:features :js-ffi) 'inline $ %{} 'CodeEntry (:doc |) :code $ quote $ defmacro inline (path) read-file $ str |content/ path :examples $ [] - :schema $ :: 'Macro $ {} - :capabilities $ #{} :fs-read - :expansion $ :: 'Expr 'String - :required $ [] 'Syntax + :schema $ quote $ Macro Syntax + -> $ Expr String + :capabilities :fs-read 'register-language! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn register-language! (name language) let @@ -504,13 +477,11 @@ registry .register-language! name language , &unit :examples $ [] - :schema $ :: 'Fn $ {} (:return 'Unit) - :args $ [] 'String 'Fn - :features $ #{} :js-ffi + :schema $ quote $ Fn String Fn (-> Unit) (:features :js-ffi) 'supported-langs $ %{} 'CodeEntry (:doc |) :code $ quote $ def supported-langs (&{} |clojure |clojure) :examples $ [] - :schema $ :: 'Map 'String 'String + :schema $ quote $ Map String String :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.util :require (|escape-html :default escape-html) (|highlight.js :default hljs) diff --git a/deps.cirru b/deps.cirru index 8cffb1a..52fe348 100644 --- a/deps.cirru +++ b/deps.cirru @@ -1,7 +1,7 @@ -{} (:calcit-version |0.31.0) (:version |0.1.0) +{} (:calcit-version |0.32.1) (:version |0.1.0) :dependencies $ {} - |Respo/respo.calcit |0.17.0-alpha.4 - |Respo/reel.calcit |0.7.0-alpha.4 - |Respo/respo-markdown.calcit |0.5.0-alpha.4 - |Respo/respo-ui.calcit |0.9.0-alpha.4 - |calcit-lang/js-ffi |0.2.7 + |Respo/respo.calcit |0.17.1 + |Respo/reel.calcit |0.7.0 + |Respo/respo-markdown.calcit |0.5.0 + |Respo/respo-ui.calcit |0.9.0 + |calcit-lang/js-ffi |0.2.9 diff --git a/package.json b/package.json index 5451cda..1416f25 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "vite": "8.3.3" }, "dependencies": { - "@calcit/procs": "0.31.0", + "@calcit/procs": "0.32.1", "@calcit/std": "^0.0.2", "cirru-color": "^0.2.4", "copy-text-to-clipboard": "^3.2.2", diff --git a/yarn.lock b/yarn.lock index 21e6b91..15c57d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,15 +12,15 @@ __metadata: languageName: node linkType: hard -"@calcit/procs@npm:0.31.0": - version: 0.31.0 - resolution: "@calcit/procs@npm:0.31.0" +"@calcit/procs@npm:0.32.1": + version: 0.32.1 + resolution: "@calcit/procs@npm:0.32.1" dependencies: "@calcit/finger-vec": "npm:0.1.1" "@calcit/ternary-tree": "npm:0.0.26" "@cirru/parser.ts": "npm:0.0.10" "@cirru/writer.ts": "npm:^0.1.9" - checksum: 10c0/daa73d722acd302be00f5f83eb91f742025a5323fac01b84222bed0fffef688761c1285637f9d672b74c2b1bb4513b170d4b5dfcc51bd65f1396390bd526ac77 + checksum: 10c0/54c505396a4653e643d24eaa71bf9a029b48034cabcd68ce47b2b40b565cf04a4693ac47c7feb34b8e84936621a397802743bffd3134ddeb37b08d23ef113923 languageName: node linkType: hard @@ -229,7 +229,7 @@ __metadata: version: 0.0.0-use.local resolution: "clojure-script-org@workspace:." dependencies: - "@calcit/procs": "npm:0.31.0" + "@calcit/procs": "npm:0.32.1" "@calcit/std": "npm:^0.0.2" bottom-tip: "npm:^0.1.5" cirru-color: "npm:^0.2.4"