Skip to content

fix: resolve yarn install peer dependency warnings#297

Merged
ujiro99 merged 4 commits intomainfrom
copilot/resolve-yarn-install-warnings
Feb 28, 2026
Merged

fix: resolve yarn install peer dependency warnings#297
ujiro99 merged 4 commits intomainfrom
copilot/resolve-yarn-install-warnings

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

yarn install produced ~30 peer dependency warnings due to outdated packages and misplaced dependencies across the monorepo.

Root cause areas

  • vite-plugin-macro@0.2.0 declares vite@^2 peer dep — no newer release exists
  • Hub React RC (19.0.0-rc-65a56d0e-20241020) didn't satisfy ^19.0.0 peer dep patterns in next, cmdk, @next/third-parties
  • @testing-library/react at root had no react, react-dom, or @testing-library/dom peers declared at that level
  • @vitejs/plugin-react in hub had no vite peer available

Changes

Extension — replace vite-plugin-macro with custom plugin

Dropped the unmaintained vite-plugin-macro (stuck at vite@^2) and replaced its single-use importIf macro with a custom Vite plugin:

// src/lib/vite-plugin-import-if.ts
// Provides @import-if virtual module + compile-time transform:
// importIf("production", "./lib/sentry/initialize")
// → import "./lib/sentry/initialize"  (when mode matches)
// → (removed)                         (when mode doesn't match)

Deleted macros/importIfProvider.ts accordingly.

Extension — move @testing-library/react from root

Moved @testing-library/react from root devDependencies into packages/extension, where react and @testing-library/dom peers already exist.

Hub — upgrade React and related packages

Package Before After
react / react-dom 19.0.0-rc-65a56d0e-20241020 ^19.0.0
cmdk 1.0.0 ^1.1.1 (React 19 peer dep updated)
next / eslint-config-next / @next/eslint-plugin-next 15.0.0 ^15.1.0 (first version supporting React 19 stable)
@vitejs/plugin-react ^5.0.0 ^5.1.4
vite (missing) ^6.0.0 (peer dep for @vitejs/plugin-react)

@types/react/@types/react-dom remain at ^18 in hub to avoid conflicting type installations across the monorepo (hub was already running React 19 RC against @types/react@18 without issue).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.google-analytics.com
    • Triggering command: /opt/hostedtoolcache/node/24.13.1/x64/bin/node /opt/hostedtoolcache/node/24.13.1/x64/bin/node --conditions node --conditions development /home/REDACTED/work/selection-command/selection-command/node_modules/tinypool/dist/entry/process.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>yarn installでの警告を解消する</issue_title>
<issue_description>yarn install時、依存性に関する警告が多数でるので、これを解消する。

> yarn install
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[###############################################################-------------------------] 795/1110(node:21740) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[4/5] Linking dependencies...
warning " > @testing-library/react@16.3.0" has unmet peer dependency "@testing-library/dom@^10.0.0".
warning " > @testing-library/react@16.3.0" has unmet peer dependency "react@^18.0.0 || ^19.0.0".
warning " > @testing-library/react@16.3.0" has unmet peer dependency "react-dom@^18.0.0 || ^19.0.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/extension > vite-plugin-macro@0.2.0" has incorrect peer dependency "vite@^2".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > @next/third-parties@15.4.6" has incorrect peer dependency "react@^18.2.0 || 19.0.0-rc-de68d2f4-20241204 || ^19.0.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk@1.0.0" has incorrect peer dependency "react@^18.0.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk@1.0.0" has incorrect peer dependency "react-dom@^18.0.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > @vitejs/plugin-react@5.0.0" has unmet peer dependency "vite@^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog@1.0.5" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog@1.0.5" has incorrect peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-primitive@1.0.3" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-primitive@1.0.3" has incorrect peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-compose-refs@1.0.1" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-context@1.0.1" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-dismissable-layer@1.0.5" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-dismissable-layer@1.0.5" has incorrect peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-focus-guards@1.0.1" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-focus-scope@1.0.4" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-focus-scope@1.0.4" has incorrect peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-id@1.0.1" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-portal@1.0.4" has incorrect peer dependency "react@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-portal@1.0.4" has incorrect peer dependency "react-dom@^16.8 || ^17.0 || ^18.0".
warning "workspace-aggregator-422fa98c-99a0-4391-b467-dca0035be583 > @selection-command/hub > cmdk > @radix-ui/react-dialog > @radix-ui/react-presenc...

</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes ujiro99/selection-command#296

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

- Extension: vite-plugin-macro を独自 vite プラグイン (vite-plugin-import-if) に置き換え
- Extension: @testing-library/react を root から extension devDeps に移動
- Hub: react/react-dom を RC版から安定版 ^19.0.0 にアップグレード
- Hub: cmdk を ^1.1.1 にアップグレード(React 19 対応)
- Hub: next/eslint-config-next/@next/eslint-plugin-next を ^15.1.0 にアップグレード
- Hub: @vitejs/plugin-react を ^5.1.4 に更新し vite を devDeps に追加
- Root: @testing-library/react を削除(extension へ移動)

Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix warnings during yarn install process fix: resolve yarn install peer dependency warnings Feb 27, 2026
@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 1.56250% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.03%. Comparing base (2a03f7f) to head (a02d724).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
...ackages/extension/src/lib/vite-plugin-import-if.ts 2.70% 36 Missing ⚠️
packages/hub/src/app/[lang]/page.tsx 0.00% 14 Missing ⚠️
packages/hub/src/app/[lang]/layout.tsx 0.00% 11 Missing ⚠️
packages/extension/vite.config.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #297      +/-   ##
==========================================
- Coverage   19.03%   19.03%   -0.01%     
==========================================
  Files         312      312              
  Lines       28829    28845      +16     
  Branches     1321     1322       +1     
==========================================
+ Hits         5489     5490       +1     
- Misses      23340    23355      +15     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ujiro99 ujiro99 marked this pull request as ready for review February 28, 2026 20:55
@ujiro99 ujiro99 merged commit 9f3f13e into main Feb 28, 2026
5 of 7 checks passed
@ujiro99 ujiro99 deleted the copilot/resolve-yarn-install-warnings branch February 28, 2026 20:55
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.

2 participants