Skip to content

Commit

Permalink
fix: moved the known tools list out of function scope
Browse files Browse the repository at this point in the history
  • Loading branch information
xenobytezero authored and janbiasi committed May 3, 2024
1 parent 85d8daf commit 49238e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { getCorrespondingPackageFromModuleId } from "./helpers";

const require = createRequire(import.meta.url);

const knownTools = ["rollup-plugin-sbom", "vite", "rollup"];

export function registerPackageUrlOnComponent(
component: Models.Component | undefined,
factory: Factories.FromNodePackageJson.PackageUrlFactory,
Expand All @@ -29,8 +31,6 @@ export async function registerTools(bom: Models.Bom, builder: Builders.FromNodeP
}
}

const knownTools = ["rollup-plugin-sbom", "vite", "rollup"];

for (const pkgName of knownTools) {
await registerTool(pkgName);
}
Expand Down

0 comments on commit 49238e4

Please sign in to comment.