Skip to content

chore(ui-components): drop unused runtime dependencies - #9235

Open
ovflowd wants to merge 1 commit into
mainfrom
chore/ui-components-deps
Open

ovflowd wants to merge 1 commit into
mainfrom
chore/ui-components-deps

Conversation

@ovflowd

@ovflowd ovflowd commented Oct 25, 2026

Copy link
Copy Markdown
Member

Description

This PR stops @node-core/ui-components from installing two packages it doesn't need at runtime:

  • @vcarl/remark-headings was only imported for its Heading type (in TableOfContents and MetaBar), so that type now lives in #ui/types. Every consumer was installing it, including @doc-kit/generator-react and nodejs/node's tools/doc, and it's a 2022 release from a single maintainer with no provenance. apps/site keeps its own copy for the remark plugin.
  • @orama/orama is only used by the Search Storybook story, so it moves to devDependencies.

This came out of a dependency audit of doc-kit (nodejs/doc-kit#1178), where @node-core/ui-components accounts for most of @doc-kit/generator-react's runtime tree.

Validation

  • packages/ui-components: node --run lint:types and ESLint on the changed files are clean, and node --run test passes (43/43).
  • apps/site: tsc --noEmit passes with no errors, so the headings the site passes in still type-check. I couldn't run next typegen or pnpm build locally since they need the generated public/blog-data.json.
  • Prettier is clean on the changed files, and the lockfile only changes the ui-components importer entries.

Related Issues

Refs: nodejs/doc-kit#1178

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run pnpm format to ensure the code follows the style guide.
  • I have run pnpm test to check if all tests are passing.
  • I have run pnpm build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

`@vcarl/remark-headings` was only imported for its `Heading` type, so
that type now lives in `#ui/types` and the package stops installing it
for every consumer. `@orama/orama` is only used by a Storybook story,
so it moves to devDependencies.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@ovflowd
ovflowd requested review from a team as code owners October 25, 2026 17:04
Copilot AI balanced review requested due to automatic review settings October 25, 2026 17:04
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nodejs-org Ready Ready Preview Oct 25, 2026 5:04pm UTC

Request Review

@ovflowd

ovflowd commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

cc @nodejs/nodejs-website requesting fast-track

@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.07%. Comparing base (85a1407) to head (8ceb6b9).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ges/ui-components/src/Containers/MetaBar/index.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9235      +/-   ##
==========================================
- Coverage   86.09%   86.07%   -0.02%     
==========================================
  Files          87       87              
  Lines        6150     6149       -1     
  Branches      369      370       +1     
==========================================
- Hits         5295     5293       -2     
- Misses        851      852       +1     
  Partials        4        4              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The dependency changes match existing usage, the local type preserves component requirements, and no blocking issues remain.

No open issues 🎉

1 file not reviewed
  • pnpm-lock.yaml: Generated file
What changed in this PR

Reduces the runtime dependency footprint of @node-core/ui-components for downstream consumers such as doc-kit, without changing component behavior.

Changes:

  • Replaces the type-only dependency on @vcarl/remark-headings with a local Heading type.
  • Moves the Storybook-only @orama/orama dependency to development dependencies.
  • Updates the lockfile and adds a patch changeset.
File Description
pnpm-lock.yaml Updates dependency classifications and adds deprecation metadata.
packages/​ui-components/​src/​types.ts Defines the local Heading type.
packages/​ui-components/​src/​Containers/​MetaBar/​index.tsx Imports Heading from local types.
packages/​ui-components/​src/​Common/​TableOfContents/​index.tsx Imports Heading from local types.
packages/​ui-components/​package.json Removes the remark dependency and moves Orama to development dependencies.
.changeset/​ui-components-runtime-deps.md Documents the dependency cleanup for a patch release.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

📦 Build Size Comparison

Summary

Metric Value
Old Total First Load JS 7.20 MB
New Total First Load JS 7.20 MB
Delta 0 B (0.00%)

This branch was successfully deployed

2 active deployments
Preview — 8ceb6b97 Deployed Oct 25, 2026 by vercel[bot]
Storybook — 8ceb6b97 Deployed Oct 25, 2026 by ovflowd via Chromatic #2331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track Fast Tracking PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants