Skip to content

Remove unused BB Office development dependencies - #2

Merged
ymichael merged 3 commits into
mainfrom
fix/bb-office-runtime-dependencies
Sep 11, 2026
Merged

ymichael merged 3 commits into
mainfrom
fix/bb-office-runtime-dependencies

Conversation

@ymichael

@ymichael ymichael commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

BB Office declares 16 development dependencies that its source and tests do not use. Remove ten Radix component packages, @pierre/diffs, class-variance-authority, clsx, sonner, tailwind-merge, and vaul, and prune their lockfile entries.

Keep the remaining development dependencies in the plugin package. The final diff changes only plugins/bb-office/package.json and pnpm-lock.yaml; there is no repository restructuring or version bump. Plugin installation reliability is handled separately in get-bb/bb#3529. This cleanup is not required for that BB fix to install the original Office release.

Verification: after restoring the standard plugin development dependency layout, corepack pnpm install --ignore-scripts and corepack pnpm exec turbo run build test typecheck --force passed: all three tasks and 81 tests. git diff --check passed.

AGENT GENERATED

@ymichael ymichael changed the title Fix BB Office installs by keeping development tools at the workspace root Remove unused BB Office development dependencies Sep 11, 2026
@ymichael
ymichael merged commit 92675f1 into main Sep 11, 2026
ymichael added a commit to get-bb/bb that referenced this pull request Sep 11, 2026
…esolver fix (#3529)

## Human comments

## What was wrong

BB delegated plugin installation to whichever npm was on the server's
PATH. npm 10.9.8 reproducibly crashes installing the original BB Office
1.0.0 with `Cannot read properties of null (reading 'edgesOut')`.

The crash reproduces outside BB with just
`{"name":"repro","version":"1.0.0","devDependencies":{"vitest":"4.1.11"}}`
and `npm install --ignore-scripts --omit=dev --omit=optional --no-audit
--no-fund`. It also reproduces without `--omit=dev`; having development
dependencies is not itself an error.

Tracing Arborist shows Vitest 4.1.11 → Vite 8.3.0 → optional
@vitejs/devtools 0.7.3 → optional @vitejs/devtools-vitest 0.7.3 → Vitest
5.0.0. Resolving the circular peer set replaces the Vitest 5 node with
Vitest 4, but npm 10.9.8 continues traversing the detached node and
dereferences its null parent. This is fixed upstream by
npm/cli#8448. Adding only that upstream parent
guard in a process-local diagnostic hook makes the minimal reproduction
pass; npm 11.16.0 also passes unchanged.

Separately, an intentionally restricted-PATH experiment confirmed that
no npm executable means every Git install reaching the npm step fails.
Ayu succeeded normally and failed only in that artificial environment.
This is not an Ayu bug, and neither result has been attributed to the
original reporting user's incident without their full error and
environment.

## What changed

Ship pinned npm 11.16.0, containing the upstream resolver fix, and
invoke its CLI through BB's running Node executable for plugin
dependency installation and build-tool downloads. This makes the npm
version deterministic and removes the external-npm prerequisite. Keep
normal npm `--omit=dev --omit=optional --ignore-scripts` behavior.
Plugin manifests and development dependency declarations are not
rewritten.

Show installation errors persistently in the dialog, and update
CLI/skill/configuration guidance. UI, SDK, and CLI installs and updates
share these server paths. No server/daemon wire contract changed.
Office's independent unused-dependency cleanup is
ymichael/bb-plugins#2 and is not required for
this fix.

## How you verified

- Minimal standalone Vitest 4.1.11 reproduction: npm 10.9.8 fails; the
same npm with only the upstream parent guard succeeds; npm 11.16.0
succeeds. TypeScript-only devDependencies and Vitest 5.0.0 succeed on
npm 10.9.8 as controls.
- Original Office 1.0.0 (b2a8da0c497b9d63d525b061e2d22829686a9c57), with
its complete original devDependencies: exact BB npm command succeeds
with npm 11.16.0, installing one runtime package. Removing Office's
unused dependencies alone still crashes on npm 10.9.8.
- Built and packed the revised BB app into a fresh prefix and launched
with a fresh store. Clicked Install BB Office in the actual catalog UI:
original Office 1.0.0 reached `running`, remained enabled after reload,
and its installed manifest matched the original Git bytes with all 25
devDependencies intact. First-use toolchain download and frontend/server
builds succeeded using shipped npm 11.16.0.
- Turbo build/typecheck passed for server, plugin-build, and bb-app with
their dependencies.
- Server installer tests: 60 passed, including real shipped-npm
invocation, intact development dependency declarations, disabled
lifecycle scripts, and empty PATH. Build-toolchain tests: 5 passed, one
opt-in network test skipped.

> AGENT GENERATED
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant