We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04d6910 commit d185c9bCopy full SHA for d185c9b
workspaces/config/lib/index.js
@@ -669,11 +669,11 @@ class Config {
669
}
670
671
if (this.localPrefix && hasPackageJson) {
672
- const rpj = require('read-package-json-fast')
+ const pkgJson = require('@npmcli/package-json')
673
// if we already set localPrefix but this dir has a package.json
674
// then we need to see if `p` is a workspace root by reading its package.json
675
// however, if reading it fails then we should just move on
676
- const pkg = await rpj(resolve(p, 'package.json')).catch(() => false)
+ const { content: pkg } = await pkgJson.normalize(p).catch(() => ({ content: {} }))
677
if (!pkg) {
678
continue
679
0 commit comments