From 4124ee5f3a59d98998580d24eceb60da47159fc9 Mon Sep 17 00:00:00 2001 From: Shevchik Igor Date: Mon, 29 Jun 2026 16:34:53 +0000 Subject: [PATCH] fix(module): avoid unhead v2-only hookOnce in colors plugin Port of upstream nuxt/ui e4ca579 (#6658). In the colors plugin's SPA-hydration branch, `hookOnce` only exists on unhead v2's `Hookable`; under unhead v3 `hooks` is a `HookableCore` exposing only `hook`. Replace it with a self-unhooking `hook` so the once-semantics work on both versions. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01JS8ypVfQSFzYVZzkTHhURb --- ...4ca5798118d8073d04eb208136d1f34334bf1b7.md | 40 +++++++++++++++++++ .sync/nuxt-ui.json | 10 ++++- src/runtime/plugins/colors.ts | 8 +++- 3 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 .sync/log/e4ca5798118d8073d04eb208136d1f34334bf1b7.md diff --git a/.sync/log/e4ca5798118d8073d04eb208136d1f34334bf1b7.md b/.sync/log/e4ca5798118d8073d04eb208136d1f34334bf1b7.md new file mode 100644 index 00000000..70ca32cc --- /dev/null +++ b/.sync/log/e4ca5798118d8073d04eb208136d1f34334bf1b7.md @@ -0,0 +1,40 @@ +# Port: fix(module): avoid unhead v2-only `hookOnce` in colors plugin (#6658) + +**Upstream:** `e4ca5798118d8073d04eb208136d1f34334bf1b7` (nuxt/ui) +**Decision:** port + +## Upstream change +`src/runtime/plugins/colors.ts`: the SPA-hydration branch removed its temporary +colors `