npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bit-ark/dsh-update

v0.1.0

Published

DSH version badge with read-only remote update check in the sidebar footer

Downloads

73

Readme

dsh-update

DSH 版本检查插件:只读地对比本地 checkout 与远端分支头,在设置页「版本与更新」 行显示状态徽标;发现新版本时通过 dsh-notify 的 toast 提醒(可选依赖)。

  • 状态行:设置 → 版本与更新。徽标 = 状态点 + 当前版本号。
    • 绿点 = 已是最新;绿色呼吸点 = 发现新版本;灰点 = 无法连接。
  • 详情弹窗:点击徽标展开——最新版本 / 当前版本 / 手动更新指引。 本插件只提醒,不自动更新(不执行任何会改状态的命令)。
  • 新版本 toast:若同时装载了 dsh-notify,检查发现新版本时弹顶部通知, 点击直达详情弹窗(同一远端 sha 只提醒一次)。
  • 宿主端点GET /updater/status(60s 缓存 + 并发合并)、 POST /updater/recheck(强制重查)。

结构

index.js    宿主半:/updater/status | /recheck(只读 git 检查)
client.js   客户端半:settings.general.item 行 + 详情弹窗 + toast 提醒
cordis.patch.yml  自带组合层:插入 dsh-update 行(config: remote/branch)

行配置

config:
  remote: origin   # 对比的 git remote 名
  branch: master   # 对比的远端分支

构建 / 安装

纯 JS 插件无需构建。安装(已完成则跳过;插件已发布到 npm,按名安装即可):

pnpm dsh plugin --profile web add @bit-ark/dsh-update

生效方式

  • 宿主半改动:重启 pnpm dsh web
  • 客户端半改动:刷新页面即可(重启更稳妥)。dev:web watcher 不覆盖树外插件。

通用性说明

  • 只读:宿主半仅执行 rev-parse HEAD / ls-remote / remote get-url / raw 拉取远端 package.json,绝不 spawn 会改状态的命令。
  • 远端版本尽力而为:raw.githubusercontent.com 不可达时 remoteVersion 为 null, 弹窗仍给出远端 sha 与手动指引。
  • 对 dsh-notify 的消费是可选、特性探测的:notifier 缺席时仅无 toast, 其余功能不变。