mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
This adds a new `skipLifecycleScripts` field to package.json that allows skipping lifecycle scripts for packages where they are unnecessary. This has higher precedence than trustedDependencies and scripts in this list are: 1. Never executed (even if in trustedDependencies) 2. Excluded from the "X postinstall scripts blocked" message Key changes: - Added `skip_lifecycle_scripts` field to Lockfile struct - Created `default-skipped-lifecycle-scripts.txt` with esbuild as default - Added parsing for `skipLifecycleScripts` array in package.json - Updated PackageInstaller to check skip list before blocking or enqueueing scripts - Added test verifying skip behavior and precedence over trustedDependencies This prevents nagging users about packages like esbuild whose postinstall scripts are unnecessary for Bun users and just waste CI time. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>