Skip to content

Commit a922a86

Browse files
os-zhuangclaude
andauthored
docs(plugin-spec): the migration example no longer teaches the retired onUpgrade hook (#4300)
The page carries a warn Callout stating the onInstall/onEnable/onDisable/ onUninstall/onUpgrade family never existed and was retired (#4212) — and then, 600 lines down, its CHANGELOG example told the reader "the `onUpgrade` lifecycle hook runs automatically when the package is upgraded to v2.0.0 and renames the field on existing records." A reader who copies the example writes a hook that never runs, which is the exact failure #4212 set out to end. Replaced with the mechanism the same page already documents 320 lines above: upgrade applies metadata migrations (ADR-0087), and no plugin code runs at install/uninstall/upgrade. Claude-Session: https://claude.ai/code/session_01HrRNgrWaRtggzmrHpbomyh Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2e836de commit a922a86

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
---
3+
4+
docs: fix the plugin-spec CHANGELOG example that still taught the retired
5+
`onUpgrade` hook as running automatically (#4212 family). Releases nothing.

content/docs/protocol/kernel/plugin-spec.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ Always include migration guide in CHANGELOG.md for major versions.
859859
- `account.owner` field (use `account.owner_id` instead)
860860

861861
### Migration
862-
The `onUpgrade` lifecycle hook runs automatically when the package is upgraded
863-
to v2.0.0 and renames the field on existing records.
862+
Upgrading to v2.0.0 applies the metadata migration that renames the field on
863+
existing records (ADR-0087). No plugin code runs at upgrade.
864864
```
865865

866866
### 3. Pin Core Dependencies

0 commit comments

Comments
 (0)