Files
bun.sh/src
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-10-16 21:52:22 -04:00
2025-10-04 02:17:55 -07:00
2025-07-29 19:35:46 -07:00
2025-09-09 20:41:10 -07:00
2025-10-23 17:52:13 -07:00
2025-09-11 23:29:53 -07:00
2025-10-25 00:05:28 -07:00
2025-09-09 20:41:10 -07:00