Skip to content

Commit

Permalink
fix(tree): properly handle root level hoisting conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
imsnif committed Aug 2, 2019
1 parent 6fef69c commit 9a7eec9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
29 changes: 1 addition & 28 deletions test/fixtures/bundled-deps-yarn/.package-lock-snapshot.json
Expand Up @@ -232,33 +232,6 @@
"version": "5.0.1",
"resolved": "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"dependencies": {
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
}
}
}
2 changes: 1 addition & 1 deletion util/traverse.js
Expand Up @@ -59,7 +59,7 @@ module.exports = {
if (prev && (prev[next] || (prev.dependencies && prev.dependencies[next]))) {
return prev[next] || prev.dependencies[next]
} else {
return tree
return { dependencies: tree }
}
}, tree)
},
Expand Down

0 comments on commit 9a7eec9

Please sign in to comment.