@vercel/build-utils
Advanced tools
Comparing version 8.7.0 to 8.8.0
# @vercel/build-utils | ||
## 8.8.0 | ||
### Minor Changes | ||
- Add bun detection using bun.lock ([#12740](https://github.com/vercel/vercel/pull/12740)) | ||
## 8.7.0 | ||
@@ -4,0 +10,0 @@ |
@@ -242,3 +242,9 @@ "use strict"; | ||
const { | ||
paths: [yarnLockPath, npmLockPath, pnpmLockPath, bunLockPath], | ||
paths: [ | ||
yarnLockPath, | ||
npmLockPath, | ||
pnpmLockPath, | ||
bunLockTextPath, | ||
bunLockBinPath | ||
], | ||
packageJsonPackageManager | ||
@@ -252,2 +258,3 @@ } = await walkParentDirsMulti({ | ||
"pnpm-lock.yaml", | ||
"bun.lock", | ||
"bun.lockb" | ||
@@ -259,7 +266,8 @@ ] | ||
let cliType; | ||
const [hasYarnLock, packageLockJson, pnpmLockYaml, bunLockBin] = await Promise.all([ | ||
const bunLockPath = bunLockTextPath ?? bunLockBinPath; | ||
const [hasYarnLock, packageLockJson, pnpmLockYaml, bunLock] = await Promise.all([ | ||
Boolean(yarnLockPath), | ||
npmLockPath ? (0, import_read_config_file.readConfigFile)(npmLockPath) : null, | ||
pnpmLockPath ? (0, import_read_config_file.readConfigFile)(pnpmLockPath) : null, | ||
bunLockPath ? import_fs_extra.default.readFile(bunLockPath, "utf8") : null | ||
bunLockPath ? import_fs_extra.default.readFile(bunLockPath) : null | ||
]); | ||
@@ -275,6 +283,6 @@ const rootProjectInfo = readPackageJson ? await readProjectRootInfo({ | ||
) : void 0; | ||
if (bunLockBin && hasYarnLock) { | ||
if (bunLock && hasYarnLock) { | ||
cliType = "bun"; | ||
lockfilePath = bunLockPath; | ||
lockfileVersion = 0; | ||
lockfileVersion = bunLockTextPath ? 1 : 0; | ||
} else if (hasYarnLock) { | ||
@@ -291,6 +299,6 @@ cliType = "yarn"; | ||
lockfileVersion = packageLockJson.lockfileVersion; | ||
} else if (bunLockBin) { | ||
} else if (bunLock) { | ||
cliType = "bun"; | ||
lockfilePath = bunLockPath; | ||
lockfileVersion = 0; | ||
lockfileVersion = bunLockTextPath ? 1 : 0; | ||
} else { | ||
@@ -759,3 +767,3 @@ cliType = detectPackageManagerNameWithoutLockfile( | ||
path: "/bun1", | ||
detectedLockfile: "bun.lockb", | ||
detectedLockfile: lockfileVersion === 0 ? "bun.lockb" : "bun.lock", | ||
detectedPackageManager: "bun@1.x" | ||
@@ -762,0 +770,0 @@ }; |
{ | ||
"name": "@vercel/build-utils", | ||
"version": "8.7.0", | ||
"version": "8.8.0", | ||
"license": "Apache-2.0", | ||
@@ -56,3 +56,3 @@ "main": "./dist/index.js", | ||
"vitest-run": "vitest -c ../../vitest.config.mts", | ||
"vitest-unit": "glob --absolute 'test/unit.*.test.ts'", | ||
"vitest-unit": "glob --absolute 'test/unit.*test.ts'", | ||
"vitest-e2e": "glob --absolute 'test/integration-*.test.ts'", | ||
@@ -59,0 +59,0 @@ "type-check": "tsc --noEmit" |
Sorry, the diff of this file is too big to display
1351185
31115