Skip to content

v0.2.0

Choose a tag to compare

@sj817 sj817 released this 15 Aug 16:00
e6ee7f1

本版亮点 / Highlights

  • 完成快照 fork 的目录重组:产品代码移出 Source/,建立可追踪的 upstream-sync/ 偏离与同步流程。
  • 对齐 2026-08-14 WebKit 上游快照,并修复 Windows arm64、Linux 与 macOS 的端口兼容问题。
  • 发布归档改为版本化下载文件名与稳定的无版本解压目录;Windows 延迟加载 icuin,归档减少约 2.86 MiB。

# ShotKit v0.2.0 **Turn HTML into PNG / WebP — without a browser.** [![npm](https://img.shields.io/npm/v/@shotkit/node?logo=npm&label=%40shotkit%2Fnode)](https://www.npmjs.com/package/@shotkit/node) [![docs](https://img.shields.io/badge/docs-README-blue)](https://github.com/sj817/shotkit#readme) [![中文](https://img.shields.io/badge/文档-简体中文-red)](https://github.com/sj817/shotkit/blob/v0.2.0/README.zh-CN.md)
## Install ```bash npm install @shotkit/node ``` > [!TIP] > npm resolves exactly one prebuilt runtime for your platform. No node-gyp, no > compiler, and no post-install download.
Other ways to run it ```bash # One-off, no install npx @shotkit/node --url https://example.com --out shot.png # Global CLI — installs as `sk`, with `shotkit` as an equivalent alias npm install -g @shotkit/node sk --html page.html --out page.png --full-page # Node.js API node -e "const {launch}=require('@shotkit/node');launch().then(async s=>{await s.screenshotURL('https://example.com',{outputPath:'a.png'});await s.close()})" ```
## Prebuilt runtimes Standalone archives for the CLI, the C ABI, and non-Node languages. Extract completely before use — each one unpacks into a version-free `shotkit--/` directory. | Platform | Arch | npm package | Archive | Size | SHA-256 | |---|---|---|---|--:|---| | Windows | x64 | `@shotkit/win32-x64` | [`shotkit-0.2.0-windows-x64.tar.xz`](https://github.com/sj817/shotkit/releases/download/v0.2.0/shotkit-0.2.0-windows-x64.tar.xz) | 11.5 MB | `a313e1c716cdf114…` | | Windows | arm64 | `@shotkit/win32-arm64` | [`shotkit-0.2.0-windows-arm64.tar.xz`](https://github.com/sj817/shotkit/releases/download/v0.2.0/shotkit-0.2.0-windows-arm64.tar.xz) | 10.7 MB | `dc93a8d51a61f533…` | | Linux | x64 | `@shotkit/linux-x64` | [`shotkit-0.2.0-linux-x64.tar.xz`](https://github.com/sj817/shotkit/releases/download/v0.2.0/shotkit-0.2.0-linux-x64.tar.xz) | 9.2 MB | `23eabce9fe6da321…` | | Linux | arm64 | `@shotkit/linux-arm64` | [`shotkit-0.2.0-linux-arm64.tar.xz`](https://github.com/sj817/shotkit/releases/download/v0.2.0/shotkit-0.2.0-linux-arm64.tar.xz) | 8.3 MB | `af23edc42f9feafa…` | | macOS | x64 (Intel) | `@shotkit/darwin-x64` | [`shotkit-0.2.0-macos-x64.tar.xz`](https://github.com/sj817/shotkit/releases/download/v0.2.0/shotkit-0.2.0-macos-x64.tar.xz) | 9.7 MB | `89510186607b2501…` | | macOS | arm64 (Apple silicon) | `@shotkit/darwin-arm64` | [`shotkit-0.2.0-macos-arm64.tar.xz`](https://github.com/sj817/shotkit/releases/download/v0.2.0/shotkit-0.2.0-macos-arm64.tar.xz) | 8.2 MB | `c2283c01a3252031…` |
Verify a download ```bash # Linux / macOS sha256sum -c shotkit-0.2.0-linux-x64.tar.xz.sha256 # Windows (PowerShell) (Get-FileHash shotkit-0.2.0-windows-x64.tar.xz -Algorithm SHA256).Hash ``` Layout differs by platform: Windows archives are flat — `shotcli.exe`, `shot.dll`, `include/shot.h`, and a `manifest.json` listing every file with its own SHA-256. Linux and macOS use `bin/`, `lib/`, `include/`, plus a `DEPENDENCIES.txt`.
## Verified in CI Every runtime in this release passed, on its own platform and architecture: - [x] PNG and WebP screenshot smoke tests - [x] Page scripts are never fetched or executed - [x] Exactly 10 `shot_*` C ABI exports - [x] Relocatable CLI (`$ORIGIN/../lib` / `@loader_path/../lib`) - [x] Release archive within its size budget Published to npm through [Trusted Publishing (OIDC)](https://docs.npmjs.com/trusted-publishers) — no long-lived token is involved. ---
🇨🇳 简体中文 ### 安装 ```bash npm install @shotkit/node ``` npm 只会为当前平台装下唯一匹配的预编译运行时——不需要 node-gyp,不需要编译器,也没有安装后下载。 ```bash # 不安装,直接跑一次 npx @shotkit/node --url https://example.com --out shot.png # 全局 CLI —— 命令为 `sk`,同时提供等价别名 `shotkit` npm install -g @shotkit/node sk --html page.html --out page.png --full-page ``` ### 预编译运行时 上面的归档表供 CLI、C ABI 和非 Node 语言直接使用,**请完整解压后再运行**。 每个归档解压出的目录都是不带版本号的 `shotkit--/`。 布局按平台不同:Windows 是平铺的 `shotcli.exe`、`shot.dll`、`include/shot.h`, 外加一份逐文件带 SHA-256 的 `manifest.json`;Linux 与 macOS 则是 `bin/`、`lib/`、 `include/`,另有 `DEPENDENCIES.txt`。 校验下载: ```bash # Linux / macOS sha256sum -c shotkit-0.2.0-linux-x64.tar.xz.sha256 ``` ### CI 验证项 本次发布的每个运行时,都在其对应的平台与架构上通过了:PNG/WebP 截图冒烟测试、 页面脚本零请求零执行、10 个 `shot_*` C ABI 导出、可重定位 CLI、以及发布归档体积闸门。 npm 侧通过 Trusted Publishing(OIDC)发布,全程不涉及长期有效的 token。
**Full changelog**: https://github.com/sj817/shotkit/compare/v0.1.2...v0.2.0