Skip to content

fix(release): publish through npm staging when direct publish needs 2FA - #182

Merged
EF1874 merged 18 commits into
MemTensor:testfrom
EF1874:test
Oct 28, 2026
Merged

EF1874 merged 18 commits into
MemTensor:testfrom
EF1874:test

Conversation

@EF1874

@EF1874 EF1874 commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 本地 pnpm publish:* 先尝试直接发布;token 需要双因素认证或只能暂存时,改为暂存包并显示浏览器批准链接,批准结果由发布者自行确认。
  • 确认提示改为 y/n。发布命令失败后不再等待 npm 可见性检查。pnpm 11 的原生可执行文件不再交给 Node 执行,并兼容 npm 12 的 npm view --json 数组结果。
  • 版本文件更新为已发布的 @memtensor/memos-cloud-dsh-plugin@0.1.2-beta.0 和待发布的 @memtensor/memos-cloud-openclaw-plugin@0.2.0-beta.0。

Test plan

  • node --test test/command-runtime.test.mjs test/release-package-operations.test.mjs test/release-package.test.mjs test/plugin-command-config.test.mjs
  • 在干净工作区执行 pnpm publish:dsh:beta 或 pnpm publish:openclaw:beta,确认提示为 [y/n]
  • 直接发布被拒绝时,终端只显示浏览器批准链接并正常退出
  • 在 npm Staged Packages 页面批准后,确认对应 dist-tag 指向目标版本

Made with Cursor

lee and others added 18 commits October 28, 2026 15:07
npm view --json wraps one dist-tag version in an array, which stopped beta publishes before they reached npm.

Co-authored-by: Cursor <cursoragent@cursor.com>
Direct publish is rejected without a bypass token, so local releases stage the package and approve it after a single y and the registry 2FA prompt.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stage and approve only after the registry rejects a direct publish for 2FA or an existing staged version.

Co-authored-by: Cursor <cursoragent@cursor.com>
The confirmation line showed the version token first, so it was easy to type that phrase instead of y.

Co-authored-by: Cursor <cursoragent@cursor.com>
The direct publish attempt hid its logs and could wait on a 2FA prompt the terminal never displayed.

Co-authored-by: Cursor <cursoragent@cursor.com>
…rompt

The release script already checks the worktree, so pnpm's default main-only publish branch was only hiding a prompt and then waiting on a package that was never uploaded.

Co-authored-by: Cursor <cursoragent@cursor.com>
A failed upload no longer waits on the registry, and the branch question stays visible so it can be answered with y.

Co-authored-by: Cursor <cursoragent@cursor.com>
The version is confirmed once up front, and pnpm's branch prompt is not shown again before the staged approval.

Co-authored-by: Cursor <cursoragent@cursor.com>
The direct publish error was only read from stderr, so the staged approval never started.

Co-authored-by: Cursor <cursoragent@cursor.com>
npm does not prompt for a code with this token, so the approve request never included one.

Co-authored-by: Cursor <cursoragent@cursor.com>
The access token can stage a package but cannot complete approval in the terminal, so the script prints the staged-packages page and exits when the dist-tag is live.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The approval URL was buried in the publish log, so it was easy to miss that the release stays staged until that page is approved.

Co-authored-by: Cursor <cursoragent@cursor.com>
A non-interactive OTP refusal was treated as a hard failure, so the browser approval step never started.

Co-authored-by: Cursor <cursoragent@cursor.com>
The script no longer waits on or fails a registry check it cannot complete from the terminal.

Co-authored-by: Cursor <cursoragent@cursor.com>
The extra closing line made the required link harder to see, so the script now prints only the approval block and exits.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EF1874
EF1874 merged commit 27be8a0 into MemTensor:test Oct 28, 2026
4 checks passed
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