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

@html-schema/web-update-checker

v0.1.1

Published

Browser-only、framework-agnostic 的 Web 静态资源升级检测包。当前由 `apps/web` 通过 `app.config.json` 注入运行时配置后接入。

Readme

@html-schema/web-update-checker

Browser-only、framework-agnostic 的 Web 静态资源升级检测包。当前由 apps/web 通过 app.config.json 注入运行时配置后接入。

核心规则

  • 只接受相同 environment 的 manifest;prod/test/dev 更新通道互相隔离。
  • 优先比较 buildId,缺失时才用 appVersion 兜底。
  • 不依赖 Vue、Element Plus、Pinia 或 Vue Router。
  • Browser API 通过 adapter 懒访问,Node 测试导入不会访问 window
  • prompt 支持按 environment/buildId 去重和 remindAfterMs 稍后提醒。
  • force 支持按 environment/buildId 记录 reload guard,避免同一版本无限刷新。

配置

{
  policy: "off" | "prompt" | "force",
  checkUrl: "./app-update.json",
  checkIntervalMs: 60000,
  startupDelayMs: 10000,
  requestTimeoutMs: 8000,
  remindAfterMs: 300000,
  forceDelayMs: 3000,
  reloadQueryKey: "__web_build"
}

主要 API

  • createWebUpdateChecker(...):创建轮询检测器。
  • createBrowserWebUpdateAdapter(...):浏览器 fetch/timer adapter。
  • normalizeWebUpdateManifest(...) / compareWebUpdateBuild(...):manifest 校验和构建比较。
  • buildWebUpdateReloadUrl(...):生成带 build query 的刷新地址。
  • createWebUpdateDecisionStore(...):prompt/force 去重与刷新保护。
  • isChunkLoadError(...):识别动态 import/chunk 加载失败。

命令

pnpm --filter @html-schema/web-update-checker test
pnpm --filter @html-schema/web-update-checker typecheck
pnpm --filter @html-schema/web-update-checker build