.LOCKB

LOCKB-fil

Bun Binary Lockfile
Stil et spørgsmål
HURTIGT SVAR

En .lockb-fil er Bun's binære installations-lockfile, næsten altid navngivet bun.lockb. Bun skriver den, når du kører bun install for at fastlåse de præcise versioner og integritetshashes for hver afhængighed, så installationer er reproducerbare. Den er ikke beregnet til at blive åbnet manuelt. For at læse den skal du køre bun bun.lockb i projektmappen, hvilket udskriver en tekstvisning i yarn.lock-stil, eller åbne projektet i en editor med Bun installeret.

Udvikler: Oven (Bun) Kategori: Udviklerfiler MIME: application/octet-stream
ÅBNER PÅ Windows macOS Linux
Relateret: .DO · .MD · .HEX · .XSD

På denne side

19k+ filtyper indekseret
Sidst gennemset Aug 26, 2026

Er du ikke sikker på, hvad din fil er?

Træk en fil over i vores identifikator - vi læser kun de første bytes for at navngive formatet.

Identificer en fil

Hvad er LOCKB-filformatet?

En .lockb-fil er den binære lockfile oprettet af Bun, JavaScript- og TypeScript-pakkehåndteringen og runtime fra Oven. Den hedder næsten altid bun.lockb og ligger i roden af et projekt. Bun skriver den, når du kører bun install, og registrerer den komplette løste afhængighedsgraf: hver pakke, dens præcise version, dens metadata, dens underafhængigheder og integritetshashes. Fastlåsning af alt dette lader alle teammedlemmer og CI-jobs installere det samme træ.

Oven byggede formatet som binært for hastighedens skyld. Det gemmer data i lineære arrays, refererer til pakker via indeks eller via et hash af pakkenavnet og fjerner dubletter af lange strenge. Filen åbner med ASCII-headeren bun-lockfile-format-v0. Ulempen er, at en binær lockfile er svær at gennemse og ikke vises i Git-diffs, hvilket er grunden til, at Bun v1.1.39 tilføjede en tekst-lockfile, og Bun v1.2 gjorde bun.lock til standard for nye projekter. Eksisterende bun.lockb-filer fungerer stadig.

Sikkerhed og tryghed

RISIKO: LOW

A bun.lockb file is generated data, not an executable, so opening or committing it is safe. Bun can 'run' the file only in the sense that bun ./bun.lockb prints its contents; it does not execute arbitrary code from the file. The only real caution is supply-chain trust: the lockfile pins specific package versions and their sources, so review dependency changes as you would any lockfile update. Never edit it by hand, since a corrupted binary lockfile will fail to parse.

Formatdetaljer

kort fortalt
FULDSTÆNDIGT NAVNBun Binary Lockfileogså kendt som bun.lockb, Bun lockfile
UDVIKLEROven (Bun)siden 2022
MIME-TYPEapplication/octet-stream
TYPEBinary
MAGIC BYTES · FILSIGNATUR
OFFSET
000102030405060708090a0b0c0d0e0f101112131415
HEX
62756E2D6C6F636B66696C652D666F726D61742D7630
ASCII
bun-lockfile-format-v0
Files begin with the ASCII header string 'bun-lockfile-format-v0' identifying the binary lockfile format version. The rest of the file is a serialized struct-of-arrays dump and has no line structure.

Programmer der åbner LOCKB-filer

Windows3 apps
Bun (CLI) Open-source Run bun bun.lockb in the project directory to print the lockfile as readable yarn.lock-style text, or bun install to use it.
Visual Studio Code with the bun.lockb extension Gratis Install Bun, then open the project so the editor can show a readable view of bun.lockb.
@hyrious/bun.lockb parser Open-source Use this JavaScript library or its web tool to parse bun.lockb and print its contents without installing Bun.
macOS3 apps
Bun (CLI) Open-source Run bun bun.lockb to print the lockfile as readable text, or bun install to reinstall from it.
Visual Studio Code with the bun.lockb extension Gratis Install Bun, then open the folder to view bun.lockb as text inside the editor.
@hyrious/bun.lockb parser Open-source Parse and print bun.lockb contents in Node or the browser without Bun installed.
Linux3 apps
Bun (CLI) Open-source Run bun bun.lockb for a readable text dump, or bun install to install dependencies from it.
Visual Studio Code with the bun.lockb extension Gratis With Bun installed, open the project to inspect bun.lockb as readable text.
Git with textconv Open-source Configure git config diff.lockb.textconv bun so git diff shows bun.lockb changes as readable text.

Tekniske detaljer

dyb specifikation
EncodingBinary (serialized struct-of-arrays memory dump)
Byte orderLittle-endian (native to the machine that wrote it)
ContainerFlat custom binary format, not a standard container
CompressionNone; long strings over 88 characters are deduplicated to save space
Typical sizeA few KB to a few hundred KB depending on dependency count
StructureA header/magic string followed by linear arrays: package list, string buffer, dependency slices, resolutions, and hoisting trees. Packages are referenced by an auto-incrementing index or a hash of the package name rather than by repeated name strings.
IntegrityStores npm-style integrity hashes for each resolved package; the format itself is version-tagged via the header string
PlatformsWindows, macOS, Linux
NotesDesigned for fast reads and memory mapping. It is not human-readable and does not render in Git or GitHub diffs without a textconv helper. Superseded as the default by the text-based bun.lock (JSONC) in Bun v1.2, but still supported.
Human ReadableNo
Udgivet2022
Seneste versionbun-lockfile-format-v0
Specifikationgithub.com

LOCKB-konverteringer

Fællesskabets Q&A

spurgt af brugere
Stil et hurtigt spørgsmål
Få hjælp fra folk, der arbejder med LOCKB-filer. Vær specifik - medtag dit system og din softwareversion.
Ingen konto nødvendig · svar normalt inden for en dag

Ingen spørgsmål endnu - vær den første til at spørge om LOCKB-filer.

Ofte stillede spørgsmål

Hvordan åbner jeg en bun.lockb-fil?
Åbn en terminal i projektmappen og kør bun bun.lockb. Bun udskriver lockfilen som læsbar tekst i yarn.lock-stil. Du skal have Bun installeret for at gøre dette.
Hvorfor er bun.lockb binær i stedet for tekst?
Oven valgte et binært format, så lockfilen indlæses og gemmes meget hurtigere end JSON eller YAML. Kompromiset er, at den ikke kan læses eller sammenlignes (diff) uden et hjælpeværktøj, hvilket er grunden til, at Bun senere tilføjede den tekstbaserede bun.lock.
Bør jeg committe bun.lockb til Git?
Ja. Lockfilen fastlåser de præcise afhængighedsversioner, så hver maskine og CI-kørsel installerer det samme træ. Commit den ligesom enhver anden lockfile. For at se læsbare diffs kan du konfigurere en Git textconv, der kører Bun på filen.
Hvordan konverterer jeg bun.lockb til den nye bun.lock?
Kør bun install --save-text-lockfile --frozen-lockfile --lockfile-only, og slet derefter den gamle bun.lockb. Bun v1.2 bruger den tekstbaserede bun.lock som standard for nye projekter.
Kan jeg redigere en bun.lockb-fil manuelt?
Nej. Det er en serialiseret binær struktur, ikke tekst. Skift afhængigheder i package.json og kør bun install for at regenerere lockfilen. Redigering af den binære fil direkte vil ødelægge den.
Er bun.lockb stadig understøttet i nyere Bun-versioner?
Ja. Selvom bun.lock (tekst) er standard siden Bun v1.2, læser og installerer Bun stadig fra eksisterende bun.lockb-filer uden at gennemtvinge migrering.

Referencer

1Bun docs - Lockfilebun.com
2Bun Blog - Bun's new text-based lockfilebun.com

Udforsk mere

på tværs af databasen

Populære filtyper i denne uge

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.PARTPartial Download File
4.MDMarkdown Document
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Relaterede filtyper

.DOStata Do-File
.MDMarkdown Document
.HEXIntel HEX File
.XSDXML Schema Definition
.MAPSource Map (JavaScript / CSS)
.CONFIGConfiguration File

Gratis filværktøjer

En fil-identifikator og billedkonverter direkte i browseren - alt kører på din enhed.

Åbn værktøjskassen

Gennemse filtyper A-Å