docs: mention the semver ref form for following 1.x

pnpm accepts #semver:^1.0.1 on a git address and resolves it against the repository tags; verified against this repository, where it selected the v1.0.1 commit.
This commit is contained in:
pyh
2026-09-30 14:00:26 +08:00
parent d09920363f
commit 0a452bd21b
+2
View File
@@ -63,6 +63,8 @@ https://gitea.iwake.top/dsh-plugin/session-delete.git#v1.0.1
`#` 后面可以跟标签或提交,用来锁定版本;不写则取默认分支。仓库是公开的,不需要凭据,也不需要改安装源。
想跟随 1.x 的最新版本,可以把后缀写成 `#semver:^1.0.1`——pnpm 会按仓库里的标签挑最高的 1.x(当前即 v1.0.1 那个提交),以后发了 v1.0.2,移除旧版本再装一次就能拿到。
### 2. 本地 tgz
把 [session-delete-1.0.1.tgz](https://gitea.iwake.top/api/packages/dsh-plugin/npm/@dsh-plugin%2Fsession-delete/-/1.0.1/session-delete-1.0.1.tgz) 下载到运行 DSH 的机器上,把它的绝对路径填进上面的输入框。