Skip to content

Commit a69f920

Browse files
msluszniakclaude
andauthored
chore: silence docs yarn install warnings (#1084)
## Summary Three warnings that `yarn` printed on every install inside the `docs` workspace: - `YN0002` — `@mdx-js/react` peer `@types/react` not provided. - `YN0002` — `@swmansion/t-rex-ui` peer `react-icons` not provided. - `YN0060` (×2) — `@signalwire/docusaurus-theme-llms-txt@1.0.0-alpha.9` declares `react`/`react-dom` `^18.0.0`, but docs uses React 19. ## Changes - Add `react-icons@^5.5.0` to `docs/package.json` dependencies. `@swmansion/t-rex-ui`'s icon-rendering components need it at runtime. - Add `@types/react@~19.2.0` to `docs/package.json` devDependencies. Legitimate either way since `docs` runs `tsc` for typecheck. - Add a per-package `logFilters` entry in [.yarnrc.yml](.yarnrc.yml) scoped to `@signalwire/docusaurus-theme-llms-txt`. Its declared peer range is stale — the plugin works with React 19, and its latest published alpha (`1.0.0-alpha.9`) doesn't fix the range. `packageExtensions` can't widen an existing peer range in Yarn Berry, so `logFilters` with a package-name pattern is the minimal non-global suppression. Comment includes a TODO to remove the filter once upstream publishes a fix. Before: ``` ➤ YN0060: react is listed by your project with version 19.2.3, which doesn't satisfy what @signalwire/docusaurus-theme-llms-txt ... request (^18.0.0) ➤ YN0060: react-dom is listed by your project with version 19.2.3, which doesn't satisfy what @signalwire/docusaurus-theme-llms-txt ... request (^18.0.0) ➤ YN0002: docs@workspace:. doesn't provide @types/react, requested by @mdx-js/react ➤ YN0002: docs@workspace:. doesn't provide react-icons, requested by @swmansion/t-rex-ui ➤ YN0086: Some peer dependencies are incorrectly met ``` After: `yarn` in `docs/` completes without warning lines. ## Test plan - [ ] `yarn` inside `docs/` completes without `YN0002` / `YN0060` / `YN0086` warnings - [ ] `yarn typecheck` (workspace-wide) passes - [ ] Filter is scoped to signalwire's package name — other `YN0060` warnings (e.g., from future peer mismatches) would still surface Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 648d96b commit a69f920

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

.yarnrc.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,19 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7+
# Workaround for @signalwire/docusaurus-theme-llms-txt@1.0.0-alpha.9:
8+
# the package declares `react`/`react-dom` ^18 as peerDependencies, but
9+
# docs runs React 19. At runtime it works fine — the peer range is just
10+
# stale in the published alpha. Yarn prints two YN0060 warnings on every
11+
# install; the pattern below silences only those two lines, scoped to
12+
# this package (not a global YN0060 mute).
13+
#
14+
# TODO: when a newer @signalwire/docusaurus-theme-llms-txt ships with
15+
# a React 19-compatible peer range, bump it in docs/package.json and
16+
# remove this filter — we'd rather follow upstream than carry a local
17+
# suppression.
18+
logFilters:
19+
- pattern: '*@signalwire/docusaurus-theme-llms-txt*'
20+
level: discard
21+
722
yarnPath: .yarn/releases/yarn-4.1.1.cjs

docs/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@
3737
"prism-react-renderer": "^2.1.0",
3838
"react": "^19.2.3",
3939
"react-dom": "^19.2.3",
40+
"react-icons": "^5.5.0",
4041
"swiper": "^12.1.2"
4142
},
4243
"devDependencies": {
4344
"@docusaurus/module-type-aliases": "^3.9.2",
4445
"@docusaurus/tsconfig": "^3.9.2",
46+
"@types/react": "~19.2.0",
4547
"docusaurus-plugin-typedoc": "^1.4.2",
4648
"typedoc": "^0.28.17",
4749
"typedoc-plugin-markdown": "^4.10.0",

docs/yarn.lock

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4507,6 +4507,15 @@ __metadata:
45074507
languageName: node
45084508
linkType: hard
45094509

4510+
"@types/react@npm:~19.2.0":
4511+
version: 19.2.14
4512+
resolution: "@types/react@npm:19.2.14"
4513+
dependencies:
4514+
csstype: "npm:^3.2.2"
4515+
checksum: 10/fbff239089ee64b6bd9b00543594db498278b06de527ef1b0f71bb0eb09cc4445a71b5dd3c0d3d0257255c4eed94406be40a74ad4a987ade8a8d5dd65c82bc5f
4516+
languageName: node
4517+
linkType: hard
4518+
45104519
"@types/retry@npm:0.12.2":
45114520
version: 0.12.2
45124521
resolution: "@types/retry@npm:0.12.2"
@@ -6503,12 +6512,14 @@ __metadata:
65036512
"@signalwire/docusaurus-plugin-llms-txt": "npm:2.0.0-alpha.7"
65046513
"@signalwire/docusaurus-theme-llms-txt": "npm:1.0.0-alpha.9"
65056514
"@swmansion/t-rex-ui": "npm:^1.3.2"
6515+
"@types/react": "npm:~19.2.0"
65066516
clsx: "npm:^2.1.0"
65076517
copy-text-to-clipboard: "npm:^3.2.2"
65086518
docusaurus-plugin-typedoc: "npm:^1.4.2"
65096519
prism-react-renderer: "npm:^2.1.0"
65106520
react: "npm:^19.2.3"
65116521
react-dom: "npm:^19.2.3"
6522+
react-icons: "npm:^5.5.0"
65126523
swiper: "npm:^12.1.2"
65136524
typedoc: "npm:^0.28.17"
65146525
typedoc-plugin-markdown: "npm:^4.10.0"

0 commit comments

Comments
 (0)