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

@jake-gao/delta-updater

v1.1.23

Published

True delta updater for windows

Readme

@jake-gao/delta-updater

基于 electron-updater 的增量更新模块 — 下载 .delta 补丁文件替代全量安装包,大幅节省带宽。

License

特性

  • 启动时展示 splash 窗口,实时显示更新进度
  • 自动下载增量补丁(.delta 文件),节省 70%+ 下载流量
  • SHA256 校验确保补丁完整性
  • 支持自定义 splash 窗口 logo
  • 增量下载失败时自动 fallback 到全量安装包
  • 支持通用 S3/GitHub/Generic 等多种更新源

安装

npm install @jake-gao/delta-updater

使用

const DeltaUpdater = require("@jake-gao/delta-updater");
const { app } = require("electron");
const path = require("path");

app.whenReady().then(async () => {
  const deltaUpdater = new DeltaUpdater({
    // 更新源地址
    hostURL: "https://example.com/updates/windows/",
    // 可选:日志实例
    logger: require("electron-log"),
    // 可选:splash 窗口自定义 logo(支持本地图片路径或 data URI)
    logo: path.join(app.getAppPath(), "public/images/logo.png"),
  });

  try {
    await deltaUpdater.boot();
  } catch (error) {
    // 更新失败不阻塞应用启动
    logger.error(error);
  }

  createMainWindow();
});

API

new DeltaUpdater(options)

| 参数 | 类型 | 必填 | 说明 | | ------------- | -------- | ---- | ---------------------------------------------------------------------- | | hostURL | string | 是 | 更新服务器根地址 | | logger | object | 否 | 日志实例,默认 console | | autoUpdater | object | 否 | electron-updater 实例,默认自动获取 | | logo | string | 否 | splash 窗口 logo,支持本地文件路径或 data URI。未传时显示默认更新 icon | | keepDeltaCount| number | 否 | 增量更新文件保留数量,默认 3。清理时会保留最新 N 个文件 |

deltaUpdater.boot({ splashScreen })

| 参数 | 类型 | 默认值 | 说明 | | -------------- | --------- | ------ | -------------------- | | splashScreen | boolean | true | 是否显示启动闪屏窗口 |

deltaUpdater.setFeedURL(url)

手动设置更新 feed URL(覆盖 hostURL 自动拼接的路径)。

工作原理

启动 → 显示 splash → 检查更新 → 发现新版本
  → 拉取 delta-win.json
  → 下载 .delta 补丁文件(SHA256 校验)
  → 应用补丁 → 重启

Splash 窗口

不传 logo 时,splash 默认显示更新下载图标:

默认 splash

传入自定义 logo 后,splash 窗口 header 将显示你的应用图标。

许可证

MIT © Jake Gao