温馨提示:本站仅提供公开网络链接索引服务,不存储、不篡改任何第三方内容,所有内容版权归原作者所有
AI智能索引来源:http://www.bun.com/docs/pm/lockfile
点击访问原文链接

Lockfile - Bun

Lockfile - BunSkip to main contentBun home pageSearch...⌘KInstall BunSearch...NavigationAdvanced ConfigurationLockfileRuntimePackage ManagerBundlerTest RunnerGuidesReferenceBlogFeedbackdiv:first-child]:!hidden peer-[.is-custom]:[&>div:first-child]:sm:!hidden peer-[.is-custom]:[&>div:first-child]:md:!hidden peer-[.is-custom]:[&>div:first-child]:lg:!hidden peer-[.is-custom]:[&>div:first-child]:xl:!hidden">Core Commandsbun installbun addbun removebun updatebunxPublishing & Analysisbun publishbun outdatedbun whybun auditbun infoWorkspace ManagementWorkspacesCatalogsbun linkbun pmAdvanced Configurationbun patchbun --filterGlobal cacheIsolated installsLockfileLifecycle scriptsScopes and registriesOverrides and resolutionsSecurity Scanner API.npmrc supportOn this pageShould it be committed to git?Generate a lockfile without installing?Can I opt out?Text-based lockfileAutomatic lockfile migrationAdvanced ConfigurationLockfileCopy pagespan]:line-clamp-1 overflow-hidden group flex items-center py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border px-3 border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5" aria-label="More actions" type="button" id="radix-_R_2shjinpfd9rqaabsnpfdb_" aria-haspopup="menu" aria-expanded="false" data-state="closed">*]:[overflow-wrap:anywhere]">Bun’s lockfile format and configuration

Copy pagespan]:line-clamp-1 overflow-hidden group flex items-center py-0.5 gap-1 text-sm text-gray-950/50 dark:text-white/50 group-hover:text-gray-950/70 dark:group-hover:text-white/70 rounded-none rounded-r-xl border px-3 border-gray-200 aspect-square dark:border-white/[0.07] bg-background-light dark:bg-background-dark hover:bg-gray-600/5 dark:hover:bg-gray-200/5" aria-label="More actions" type="button" id="radix-_R_5hjinpfd9rqaabsnpfdb_" aria-haspopup="menu" aria-expanded="false" data-state="closed">Running bun install will create a lockfile called bun.lock. ​Should it be committed to git? Yes ​Generate a lockfile without installing? To generate a lockfile without installing to node_modules you can use the --lockfile-only flag. The lockfile will always be saved to disk, even if it is up-to-date with the package.json(s) for your project. terminalCopybun install --lockfile-only Using --lockfile-only will still populate the global install cache with registry metadata and git/tarball dependencies. ​Can I opt out? To install without creating a lockfile: terminalCopybun install --no-save To install a Yarn lockfile in addition to bun.lock. terminalbunfig.tomlCopybun install --yarn ​Text-based lockfile Bun v1.2 changed the default lockfile format to the text-based bun.lock. Existing binary bun.lockb lockfiles can be migrated to the new format by running bun install --save-text-lockfile --frozen-lockfile --lockfile-only and deleting bun.lockb. More information about the new lockfile format can be found on our blogpost. ​Automatic lockfile migration When running bun install in a project without a bun.lock, Bun automatically migrates existing lockfiles: yarn.lock (v1) package-lock.json (npm) pnpm-lock.yaml (pnpm) The original lockfile is preserved and can be removed manually after verification.

Was this page helpful?

YesNoSuggest editsRaise issueIsolated installsPreviousLifecycle scriptsNext⌘IxgithubdiscordyoutubePowered by

智能索引记录