-
Notifications
You must be signed in to change notification settings - Fork 0
Target Bun
Mopsgamer edited this page Aug 23, 2026
·
2 revisions
The makeBun() target emulates Bun's native package packing engine (bun pm pack).
-
Our Implementation:
src/targets/bun.ts - Original Bun Engine: oven-sh/bun (Rust package manager packer)
Bun's native implementation of bun pm pack mimics NPM's packing behavior but with subtle differences:
- Validates the manifest (
package.json). - Enforces hardcoded inclusions (
package.json, standard documentation likeREADME,LICENSE,COPYING, andbinfile paths). - Excludes lockfiles (
bun.lock,bun.lockb,package-lock.json,yarn.lock,pnpm-lock.yaml) and system environments by default. - Processes
.npmignoreand fallback.gitignorefiles.
- Reads
package.jsonto extractbinconfigurations and package entrypoints. - Enforces specific hardcoded defaults mapped inside Bun's Rust packer engine.
- Matches ignore manifests and handles lockfile exclusions.
To verify view-ignored results against native Bun on your system:
bun pm pack --dry-runDiagnostic CLI command:
vign-diff bunimport * as vign from "view-ignored"
import { makeBun } from "view-ignored/targets"
const ctx = await vign.scan({
target: makeBun(),
})
console.log(ctx.paths.has("package.json")) // true
console.log(ctx.paths.has("bun.lockb")) // false