Skip to content

Commit 7611c17

Browse files
43081jmrstork
andauthored
chore: remove locate-path (#6578)
* chore: remove locate-path Removes the `locate-path` dependency, since we can achieve the same with a very, very basic loop. * chore: drop from package json * fix: use existsSync * chore: use find() for manifest path --------- Co-authored-by: Mateusz Bocian <[email protected]>
1 parent e97b2a5 commit 7611c17

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/build/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"indent-string": "^5.0.0",
9090
"is-plain-obj": "^4.0.0",
9191
"keep-func-props": "^6.0.0",
92-
"locate-path": "^7.0.0",
9392
"log-process-errors": "^11.0.0",
9493
"map-obj": "^5.0.0",
9594
"memoize-one": "^6.0.0",

packages/build/src/plugins/manifest/path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { locatePath } from 'locate-path'
1+
import fsSync from 'node:fs'
22

33
import { addErrorInfo } from '../../error/info.js'
44

@@ -7,7 +7,7 @@ export const getManifestPath = async function ({ pluginDir, packageDir, packageN
77
const dirs = [pluginDir, packageDir]
88
.filter(Boolean)
99
.flatMap((dir) => MANIFEST_FILENAMES.map((filename) => `${dir}/${filename}`))
10-
const manifestPath = await locatePath(dirs)
10+
const manifestPath = dirs.find((dir) => fsSync.existsSync(dir))
1111
validateManifestExists(manifestPath, packageName)
1212
return manifestPath
1313
}

0 commit comments

Comments
 (0)