惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
爱范儿
爱范儿
D
Docker
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
D
DataBreaches.Net
月光博客
月光博客
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Visual Studio Blog
MyScale Blog
MyScale Blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
L
LangChain Blog
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
docs: add shrinkwrap and release performance report · ope...
steipete · 2026-05-29 · via Recent Commits to openclaw:main
1+

---

2+

summary: "Plain-English and technical explanation of npm shrinkwrap in OpenClaw releases"

3+

read_when:

4+

- You want to know what npm shrinkwrap means in an OpenClaw release

5+

- You are reviewing package lockfiles, dependency changes, or supply-chain risk

6+

- You are validating root or plugin npm packages before publishing

7+

title: "npm shrinkwrap"

8+

---

9+10+

OpenClaw source checkouts use `pnpm-lock.yaml`. Published OpenClaw npm

11+

packages use `npm-shrinkwrap.json`, npm's publishable dependency lockfile, so

12+

package installs use the dependency graph reviewed during release.

13+14+

## The easy version

15+16+

Shrinkwrap is a receipt for the dependency tree that ships with an npm package.

17+

It tells npm which exact transitive package versions to install.

18+19+

For OpenClaw releases, that means:

20+21+

- the published package does not ask npm to invent a fresh dependency graph at

22+

install time;

23+

- dependency changes become easier to review because they appear in a lockfile;

24+

- release validation can test the same graph users will install;

25+

- package-size or native-dependency surprises are easier to spot before

26+

publishing.

27+28+

Shrinkwrap is not a sandbox. It does not make a dependency safe by itself, and

29+

it does not replace host isolation, `openclaw security audit`, package

30+

provenance, or install smoke tests.

31+32+

The short mental model:

33+34+

| File | Where it matters | What it means |

35+

| --------------------- | ------------------------ | --------------------------------- |

36+

| `pnpm-lock.yaml` | OpenClaw source checkout | Maintainer dependency graph |

37+

| `npm-shrinkwrap.json` | Published npm package | npm install graph for users |

38+

| `package-lock.json` | Local npm apps | Not the OpenClaw publish contract |

39+40+

## Why OpenClaw uses it

41+42+

OpenClaw is a gateway, plugin host, model router, and agent runtime. A default

43+

install can affect startup time, disk use, native package downloads, and

44+

supply-chain exposure.

45+46+

Shrinkwrap gives release review a stable boundary:

47+48+

- reviewers can see transitive dependency movement;

49+

- package validators can reject unexpected lockfile drift;

50+

- package acceptance can test installs with the graph that will ship;

51+

- plugin packages can carry their own locked dependency graph instead of

52+

relying on the root package to own plugin-only dependencies.

53+54+

The goal is not "more lockfiles." The goal is reproducible release installs

55+

with clear ownership.

56+57+

## Technical details

58+59+

The root `openclaw` npm package and OpenClaw-owned npm plugin packages include

60+

`npm-shrinkwrap.json` when they publish. Suitable OpenClaw-owned plugin

61+

packages can also publish with explicit `bundledDependencies`, so their runtime

62+

dependency files are carried in the plugin tarball instead of depending only on

63+

install-time resolution.

64+65+

Maintain the boundary like this:

66+67+

```bash

68+

pnpm deps:shrinkwrap:generate

69+

pnpm deps:shrinkwrap:check

70+

```

71+72+

The generator resolves npm's publishable lock format but rejects generated

73+

package versions that are not already present in `pnpm-lock.yaml`. That keeps

74+

the pnpm dependency age, override, and patch-review boundary intact.

75+76+

Use root-only commands only when intentionally refreshing the root package

77+

without touching plugin packages:

78+79+

```bash

80+

pnpm deps:shrinkwrap:root:generate

81+

pnpm deps:shrinkwrap:root:check

82+

```

83+84+

Review these files as security-sensitive:

85+86+

- `pnpm-lock.yaml`

87+

- `npm-shrinkwrap.json`

88+

- bundled plugin dependency payloads

89+

- any `package-lock.json` diff

90+91+

OpenClaw package validators require shrinkwrap in new root package tarballs.

92+

The plugin npm publish path checks plugin-local shrinkwrap, installs

93+

package-local bundled dependencies, and then packs or publishes. Package

94+

validators reject `package-lock.json` for published OpenClaw packages.

95+96+

To inspect a published root package:

97+98+

```bash

99+

npm pack openclaw@<version> --json --pack-destination /tmp/openclaw-pack

100+

tar -tf /tmp/openclaw-pack/openclaw-<version>.tgz | grep '^package/npm-shrinkwrap.json$'

101+

```

102+103+

To inspect an OpenClaw-owned plugin package:

104+105+

```bash

106+

npm pack @openclaw/discord@<version> --json --pack-destination /tmp/openclaw-plugin-pack

107+

tar -tf /tmp/openclaw-plugin-pack/openclaw-discord-<version>.tgz | grep '^package/npm-shrinkwrap.json$'

108+

tar -tf /tmp/openclaw-plugin-pack/openclaw-discord-<version>.tgz | grep '^package/node_modules/'

109+

```

110+111+

Background: [npm-shrinkwrap.json](https://docs.npmjs.com/cli/v11/configuring-npm/npm-shrinkwrap-json).