Repository navigation
Conversation
`@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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
cc @nodejs/nodejs-website requesting fast-track |
Codecov Report❌ Patch coverage is
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. |
There was a problem hiding this comment.
🟢 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-headingswith a localHeadingtype. - Moves the Storybook-only
@orama/oramadependency 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
📦 Build Size ComparisonSummary
|
Description
This PR stops
@node-core/ui-componentsfrom installing two packages it doesn't need at runtime:@vcarl/remark-headingswas only imported for itsHeadingtype (inTableOfContentsandMetaBar), so that type now lives in#ui/types. Every consumer was installing it, including@doc-kit/generator-reactand nodejs/node'stools/doc, and it's a 2022 release from a single maintainer with no provenance.apps/sitekeeps its own copy for the remark plugin.@orama/oramais only used by the Search Storybook story, so it moves todevDependencies.This came out of a dependency audit of doc-kit (nodejs/doc-kit#1178), where
@node-core/ui-componentsaccounts for most of@doc-kit/generator-react's runtime tree.Validation
packages/ui-components:node --run lint:typesand ESLint on the changed files are clean, andnode --run testpasses (43/43).apps/site:tsc --noEmitpasses with no errors, so the headings the site passes in still type-check. I couldn't runnext typegenorpnpm buildlocally since they need the generatedpublic/blog-data.json.ui-componentsimporter entries.Related Issues
Refs: nodejs/doc-kit#1178
Check List
pnpm formatto ensure the code follows the style guide.pnpm testto check if all tests are passing.pnpm buildto check if the website builds without errors.