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
8 changes: 4 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: corepack enable
- uses: calcit-lang/setup-calcit@v1.5.0
with:
version: "0.32.0"
version: "0.32.1"
tools: calcit,caps
caps-version: "0.1.1"
- name: Install dependencies
Expand All @@ -35,15 +35,15 @@ jobs:
- name: Check snapshot and public contracts
run: |
set -euo pipefail
test "$(calcit --version)" = "0.32.0"
test "$(calcit --version)" = "0.32.1"
test ! -e compact.cirru
test ! -e package.cirru
calcit edit format
if ! git diff --exit-code --quiet -- calcit.cirru; then
echo '::error file=calcit.cirru::Snapshot is not canonical. With Calcit 0.32.0, run calcit edit format and inspect definitions through calcit query def.'
echo '::error file=calcit.cirru::Snapshot is not canonical. With Calcit 0.32.1, run calcit edit format and inspect definitions through calcit query def.'
exit 1
fi
calcit --strict-types --warn-dyn-method --check-only --all-defs
calcit --warn-dyn-method --check-only --all-defs
calcit fix --workflow strict --verify --format json | jq -e 'if .data.workflow.status? == "passed" and .diagnostics? == [] then true else ., false end'
calcit analyze weak-types --only deprecated-call --summary-only --format json | jq -e '.data.summary.calls == 0'
- name: Run native and JavaScript arithmetic
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodeLinker: node-modules
npmMinimalAgeGate: 60m
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Arithmetic

复数运算模块,使用 `[实部, 虚部]` 数字列表;不提供前端资源或服务部署。

使用者影响:CLI 与 `@calcit/procs` 配对升级至正式 **0.32.0**,CI 使用同一版本。
使用者影响:CLI 与 `@calcit/procs` 配对升级至正式 **0.32.1**,CI 使用同一版本。
使用者需重新安装依赖并重新生成 JavaScript;模块版本仍为 0.0.1,本 PR 不代表新 tag 或 npm 发布。
本轮通过官方 formatter 更新类型标注;运算逻辑、公开 `List<Number>` 契约、列表长度约束和原八种运算断言不变。
没有前端资源,不添加 COS/CDN 配置;保留原全部类型门禁与 native/JavaScript 回放。
主线已采用当前类型标注,本轮官方 formatter 无需再次改写 Snapshot;运算逻辑、公开 `List<Number>` 契约、列表长度约束和原八种运算断言不变。
没有前端资源,不添加 COS/CDN 配置;保留原全部类型门禁与 native/JavaScript 回放。移除已弃用的 --strict-types 开关,默认严格检查不变。

### Usages

Expand All @@ -30,25 +30,26 @@ Functions:

### Workflow

需要配对的正式 Calcit / `@calcit/procs` 0.32.0、caps 0.1.1、Node.js 24 和 Yarn 4.18.0:
需要配对的正式 Calcit / `@calcit/procs` 0.32.1、caps 0.1.1、Node.js 24 和 Yarn 4.18.0:

```sh
caps --ci --strict
yarn install --immutable
caps verify --toolchain
yarn test
```

`yarn test` 在 native 和生成的 JavaScript 上运行同一组八种运算断言;
定义附属测试使用内置测试入口,不再依赖旧 `calcit-test` 模块。
默认入口为 native,`yarn compile` 显式生成 JS。仅维护 `calcit.cirru` / `deps.cirru`,
`js-out/` 不进入 Git。模块版本仍为 0.0.1,本次 PR 不代表已发布新版本。
`js-out/` 不进入 Git。模块版本仍为 0.0.1,本次 PR 不代表已发布新版本。新解析 npm 包至少发布60分钟,无单包例外;已锁版本按 immutable 安装。

迁移提示:旧 `&+`、`&-`、`&*`、`&/` 分别改为 `add`、`subtract`、`multiply`、`divide`,
调用方需要同步改名。极坐标计算使用跨后端 `cos` / `sin`,不再直接调用 JS Math。
复数运算保留原公式;代码中的 `List<Number>` 契约不证明列表长度,调用方仍需提供有效复数对。

此前 0.30.1 迁移:复数除法的旧 `let-sugar` 改为直接的 `let[]` / `let`,
绑定顺序、原公式与公开 API 不变。CI 显式启用严格类型检查和动态方法警告,
绑定顺序、原公式与公开 API 不变。CI 使用当前默认严格类型检查并显式启用动态方法警告,
检查全部定义及完整 strict,并要求零弃用调用;保留原有八种运算断言和同一组 native/JavaScript 回放。
已有数字列表/数字参数/Unit 入口契约不变,不为迁移添加断言、验证脚本、依赖安全例外或改写规则。
本库没有前端资源,因此不配置 COS/CDN,也没有部署或新 tag 发布操作。
Expand Down
2 changes: 1 addition & 1 deletion deps.cirru
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{} (:calcit-version |0.32.0)
{} (:calcit-version |0.32.1)
:version |0.0.1
:dependencies $ {}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "0.0.1",
"dependencies": {
"@calcit/procs": "0.32.0"
"@calcit/procs": "0.32.1"
},
"scripts": {
"compile": "calcit js",
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.