Skip to content

Commit d09eb7c

Browse files
authored
chore(ui-components): drop unused runtime dependencies (#9235)
`@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>
1 parent 85a1407 commit d09eb7c

6 files changed

Lines changed: 18 additions & 12 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@node-core/ui-components': patch
3+
---
4+
5+
Stop installing `@vcarl/remark-headings` and `@orama/orama` at runtime. The `Heading` type now comes from `#ui/types`, and `@orama/orama` is only used by Storybook.

‎packages/ui-components/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
},
5151
"dependencies": {
5252
"@heroicons/react": "^2.2.0",
53-
"@orama/orama": "^3.1.18",
5453
"@orama/ui": "^1.5.4",
5554
"@radix-ui/react-avatar": "^1.2.3",
5655
"@radix-ui/react-dialog": "^1.1.20",
@@ -60,13 +59,13 @@
6059
"@radix-ui/react-separator": "^1.1.12",
6160
"@radix-ui/react-tabs": "^1.1.18",
6261
"@radix-ui/react-tooltip": "^1.2.13",
63-
"@vcarl/remark-headings": "~0.1.0",
6462
"classnames": "catalog:",
6563
"react": "catalog:"
6664
},
6765
"devDependencies": {
6866
"@eslint-react/eslint-plugin": "~5.8.6",
6967
"@orama/core": "^1.2.19",
68+
"@orama/orama": "^3.1.18",
7069
"@storybook/addon-a11y": "~10.6.0",
7170
"@storybook/addon-styling-webpack": "~3.0.2",
7271
"@storybook/addon-themes": "~10.6.0",

‎packages/ui-components/src/Common/TableOfContents/index.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import classNames from 'classnames';
33

44
import { CODE_LIKE_TYPES } from '#ui/constants';
55

6-
import type { LinkLike } from '#ui/types';
7-
import type { Heading } from '@vcarl/remark-headings';
6+
import type { Heading, LinkLike } from '#ui/types';
87
import type { ComponentProps, FC } from 'react';
98

109
import styles from './index.module.css';

‎packages/ui-components/src/Containers/MetaBar/index.tsx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { Fragment, useMemo } from 'react';
33

44
import { CODE_LIKE_TYPES } from '#ui/constants';
55

6-
import type { LinkLike } from '#ui/types';
7-
import type { Heading } from '@vcarl/remark-headings';
6+
import type { Heading, LinkLike } from '#ui/types';
87
import type { FC, HTMLAttributes } from 'react';
98

109
import styles from './index.module.css';

‎packages/ui-components/src/types.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ export type SimpleLocaleConfig = {
2323
name: string;
2424
hrefLang: string;
2525
};
26+
27+
export type Heading = {
28+
depth: number;
29+
value: string;
30+
data?: { id?: string; type?: string } & Record<string, unknown>;
31+
};

‎pnpm-lock.yaml‎

Lines changed: 4 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)