Files
bun.sh/test/regression/issue
Claude Bot a60131ebb4 fix: don't create empty node_modules when no dependencies exist
Fixes #5392

When running `bun install` on a package.json with no dependencies, an empty `node_modules` folder was being created. This change adds checks in both hoisted and isolated install strategies to skip node_modules creation when there are no packages to install.

The fix preserves node_modules creation when using filters like `--production` that may result in zero packages after filtering but had packages in the original lockfile.

Changes:
- Check both filtered and original dependency counts in hoisted install
- Check both store entries and lockfile packages in isolated install
- Return early with empty Summary if truly no dependencies
- Add regression test that verifies no node_modules created when empty

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 03:24:28 +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-07-20 23:02:10 -07:00