@cyclonedx/cdxgen 8.4.10 → 8.4.11

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1287,7 +1287,7 @@ const createJavaBom = async (path, options) => {
1287
1287
  const parsedList = utils.parseGradleDep(cmdOutput, sp);
1288
1288
  const dlist = parsedList.pkgList;
1289
1289
  // Do not overwrite the parentComponent in multi-project mode
1290
- if (!parentComponent) {
1290
+ if (!parentComponent || !Object.keys(parentComponent).length) {
1291
1291
  parentComponent = dlist.splice(0, 1)[0];
1292
1292
  }
1293
1293
  if (
@@ -1400,7 +1400,7 @@ const createJavaBom = async (path, options) => {
1400
1400
  const cmdOutput = Buffer.from(stdout).toString();
1401
1401
  const parsedList = utils.parseGradleDep(cmdOutput);
1402
1402
  const dlist = parsedList.pkgList;
1403
- if (!parentComponent) {
1403
+ if (!parentComponent || !Object.keys(parentComponent).length) {
1404
1404
  parentComponent = dlist.splice(0, 1)[0];
1405
1405
  }
1406
1406
  if (parsedList.dependenciesList && parsedList.dependenciesList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cdxgen",
3
- "version": "8.4.10",
3
+ "version": "8.4.11",
4
4
  "description": "Creates CycloneDX Software Bill-of-Materials (SBOM) from source or container image",
5
5
  "homepage": "http://github.com/cyclonedx/cdxgen",
6
6
  "author": "Prabhu Subramanian <prabhu@appthreat.com>",