Skip to content

Commit

Permalink
fix: use nodeSpecific PackageUrlFactory
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed May 21, 2024
1 parent bb34da3 commit 57d677f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/builders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ interface BomBuilderOptions {
export class BomBuilder {
toolBuilder: Builders.FromNodePackageJson.ToolBuilder
componentBuilder: Builders.FromNodePackageJson.ComponentBuilder
purlFactory: Factories.PackageUrlFactory
purlFactory: Factories.FromNodePackageJson.PackageUrlFactory

omitDevDependencies: boolean
metaComponentType: ComponentType
Expand Down
4 changes: 2 additions & 2 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
// import sub-modules so to prevent load of unused not-tree-shakable dependencies - like 'AJV'
import { FromNodePackageJson as PJB } from '@cyclonedx/cyclonedx-library/Builders'
import { ComponentType } from '@cyclonedx/cyclonedx-library/Enums'
import { FromNodePackageJson as PJF, LicenseFactory, PackageUrlFactory } from '@cyclonedx/cyclonedx-library/Factories'
import { FromNodePackageJson as PJF, LicenseFactory } from '@cyclonedx/cyclonedx-library/Factories'
import * as Serialize from '@cyclonedx/cyclonedx-library/Serialize'
import { SpecVersionDict, Version as SpecVersion } from '@cyclonedx/cyclonedx-library/Spec'
import { type CommandContext, Configuration, Project } from '@yarnpkg/core'
Expand Down Expand Up @@ -160,7 +160,7 @@ export class MakeSbomCommand extends Command<CommandContext> {
extRefFactory,
new LicenseFactory()
),
new PackageUrlFactory('npm'),
new PJF.PackageUrlFactory('npm'),
{
omitDevDependencies: this.production,
metaComponentType: this.mcType,
Expand Down

0 comments on commit 57d677f

Please sign in to comment.