ihimnm 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -56,7 +56,7 @@ if (allFoundDeps.size) {
|
|
|
56
56
|
function crawlDependencies(pkgJsonPath, parentDepNames, isRoot = false) {
|
|
57
57
|
let found = false
|
|
58
58
|
const pkgJsonContent = fs.readFileSync(pkgJsonPath, 'utf8')
|
|
59
|
-
const pkgJson = JSON.parse(pkgJsonContent)
|
|
59
|
+
const pkgJson = JSON.parse(pkgJsonContent.trim()) // trim to remove BOM if any
|
|
60
60
|
const pkgDependencies = Object.keys(pkgJson.dependencies || {})
|
|
61
61
|
|
|
62
62
|
if (isRoot) {
|