Files
bun.sh/test/regression/issue
Claude Bot 0adcd694e0 fix(install): exclude optional peers resolved against dev deps in --prod
When running `bun install --production`, optional peer dependencies of
production packages (e.g. typescript as an optional peer of @prisma/client)
were incorrectly installed if they also appeared in the root devDependencies.

During the `.resolvable` tree-building phase, optional peers get resolved
against any matching dependency in the tree, including dev deps. In the
subsequent `.filter` phase, the root dev dependency is correctly filtered
out, but the optional peer retains its resolved package ID and passes
through the filter since remote_package_features.peer_dependencies is true.

The fix adds a check in the filter phase: when an optional peer dependency
from a non-root package matches a root dev dependency and dev_dependencies
are disabled (--prod mode), it is filtered out.

Closes #26837

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-09 21:13:18 +00:00
..
2025-08-06 06:44:46 -07:00
2025-01-28 17:23:57 -08:00
2025-06-03 13:23:12 -07:00
2025-06-03 23:41:37 -07:00
2025-01-17 22:08:07 -08:00
2024-06-14 01:50:36 -07:00
2025-03-03 21:38:05 -08:00
2025-05-26 21:18:22 -07:00
2025-07-03 01:06:22 -07:00
2025-07-23 22:31:42 -07:00
2025-10-20 14:07:31 -07:00
2025-11-05 22:04:14 -08:00
2025-11-05 22:04:14 -08:00
2025-11-19 21:17:51 -08:00
2026-01-13 22:38:31 -08:00
2025-07-20 23:02:10 -07:00