From 112f9c06d03fd26134e83909a6d76b2861dd9d45 Mon Sep 17 00:00:00 2001 From: Alexander Khrushkov Date: Wed, 5 Aug 2026 01:06:07 +0300 Subject: [PATCH 1/2] fix(packaging): declare @dnd-kit/utilities peer, add ./announcements subpath dist/index.js statically imports @tanstack/react-table, @dnd-kit/core, @dnd-kit/sortable and @dnd-kit/utilities. The last one was declared nowhere in the manifest -- neither dependencies nor peerDependencies -- so the package imported a specifier it never asked consumers to provide. It only ever resolved because every consumer so far happened to depend on it directly. Two fixes: 1. Add "@dnd-kit/utilities": "^3.2.2" to peerDependencies, next to its siblings. The range is the one sphere, sphere-backoffice and sphere-dev-portal already carry. 2. Give the announcement centre its own entry point, following the existing ./forms, ./canvas, ./panels, ./hooks and ./analytics pattern: a new tsup entry plus the matching "./announcements" exports block. The announcement surface only needs react, lucide-react, react-markdown and remark-gfm, so an app that wants a notification bell no longer has to install a data table and a drag-and-drop stack. The main barrel still re-exports the announcement components unchanged, so existing root imports keep working. This adds a narrower door without closing the wide one. --- package.json | 5 +++++ tsup.config.ts | 3 +++ 2 files changed, 8 insertions(+) diff --git a/package.json b/package.json index 79abc6e..e1f1547 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,10 @@ "./analytics": { "import": "./dist/analytics/index.js", "types": "./dist/analytics/index.d.ts" + }, + "./announcements": { + "import": "./dist/announcements/index.js", + "types": "./dist/announcements/index.d.ts" } }, "files": [ @@ -54,6 +58,7 @@ "peerDependencies": { "@dnd-kit/core": "^6.0.0", "@dnd-kit/sortable": "^8.0.0 || ^10.0.0", + "@dnd-kit/utilities": "^3.2.2", "@tanstack/react-query": "^5.0.0", "@tanstack/react-table": "^8.0.0", "react": "^19.0.0", diff --git a/tsup.config.ts b/tsup.config.ts index 973b0c4..ef4e650 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -8,6 +8,9 @@ export default defineConfig({ 'panels/index': 'src/panels/index.ts', 'hooks/index': 'src/hooks/index.ts', 'analytics/index': 'src/analytics/index.ts', + // Standalone entry so a consumer that only needs the announcement centre + // does not pull in the table / drag-and-drop peers of the main barrel. + 'announcements/index': 'src/components/announcements/index.ts', }, format: ['esm'], dts: true, From ee4b7f137858deac144f7feca5512b9442a0817b Mon Sep 17 00:00:00 2001 From: Alexander Khrushkov Date: Wed, 5 Aug 2026 01:08:15 +0300 Subject: [PATCH 2/2] fix(packaging): widen the @dnd-kit/utilities peer to the range the library builds against MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The peer was pinned to ^3.2.2, the version the three consuming apps happen to carry today. The library itself builds and tests against ^3.0.0 (its own devDependency), and every other peer here states the minimum supported major rather than whatever a consumer currently has installed — @dnd-kit/core is ^6.0.0 while the apps carry ^6.3.1. Stating a floor higher than the real one makes installs fail for consumers the library actually supports. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e1f1547..e7b8240 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "peerDependencies": { "@dnd-kit/core": "^6.0.0", "@dnd-kit/sortable": "^8.0.0 || ^10.0.0", - "@dnd-kit/utilities": "^3.2.2", + "@dnd-kit/utilities": "^3.0.0", "@tanstack/react-query": "^5.0.0", "@tanstack/react-table": "^8.0.0", "react": "^19.0.0",