لإضافة حزمة npm كتبعية نظيرة، استخدم العلم --peer.
sh
bun add @types/bun --peerسيضيف هذا الحزمة إلى peerDependencies في package.json.
json
{
"peerDependencies": {
"@types/bun": "^1.3.3"
}
}سيقوم تشغيل bun install بتثبيت التبعيات النظيرة افتراضيًا، ما لم يتم تحديدها كاختيارية في peerDependenciesMeta.
json
{
"peerDependencies": {
"@types/bun": "^1.3.3"
},
"peerDependenciesMeta": {
"@types/bun": {
"optional": true
}
}
}راجع الوثائق > مدير الحزم للحصول على الوثائق الكاملة لمدير الحزم الخاص بـ Bun.