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
Euan Robertson committed Apr 30, 2024
1 parent edf5102 commit f097e9f
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 f097e9f

Please sign in to comment.