Skip to content

release: 0.5.1 — concurrent commands stop failing on Windows - #5

Merged
Vieeeeeee merged 1 commit into
mainfrom
release/0.5.1
Aug 27, 2026
Merged

Vieeeeeee merged 1 commit into
mainfrom
release/0.5.1

Conversation

@Vieeeeeee

Copy link
Copy Markdown
Owner

0.5.0 之后唯一的用户可见变化就是这一条 Windows 修复,所以是 patch 版。

修了什么

每条命令跑完都会重建 registry.json,而这一步在 override 锁释放之后。两个并发的 describe 就会撞在这一次 rename 上:

EPERM: operation not permitted, rename '...tmp' -> 'registry.json'

POSIX 直接换 inode 永远成功;Windows 不允许 rename 到一个被别的进程打开着的文件。结果是写其实成功了,命令却报失败。近 12 次 CI 里挂过 2 次,属于长期存在的间歇性问题。

改法是有上限的短重试。没有加锁——registry.json 是可重建的缓存,真正不可重建的 overrides.json 早就有锁了。

顺带

这是第一个会自己建 GitHub Release 的版本(#3 加的那一步)。0.3.0 / 0.4.0 / 0.5.0 三个标签当时都只推了标签没建 Release,导致仓库首页有三天挂着 0.2.0 当最新版。

验证

  • npm test 98/98
  • npm pack --dry-run:27 个文件 / 104.5 kB,与 0.5.0 同量级
  • package.json 与 CLI 都报 0.5.1
  • 发布流程要用的 CHANGELOG 抽取逻辑对 0.5.1 小节实测抽出 12 行非空内容(抽不到会让发布步骤失败)

🤖 Generated with Claude Code

The only user-visible change since 0.5.0. Every command rebuilds registry.json
after releasing the override lock, so two concurrent `describe` calls raced on
that rename. Windows refuses to rename onto a file another process holds open,
and the command reported failure for a write that had already succeeded — CI
caught it on 2 of 12 runs before it was tracked down.

This release is also the first to cut its own GitHub Release, so the repository
page stops advertising a version three behind the one on npm.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Vieeeeeee
Vieeeeeee merged commit b52e13d into main Aug 27, 2026
9 checks passed
@Vieeeeeee
Vieeeeeee deleted the release/0.5.1 branch August 27, 2026 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant