Skip to content

Commit f448f6d

Browse files
committed
style: bom module processing requires module
1 parent a776d6b commit f448f6d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ indent_size = 2
3939
### Specific files
4040
[{package,bower,lerna}.json]
4141
indent_style = space
42-
indent_size = 2
42+
indent_size = 2

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ export default function rollupPluginSbom(userOptions?: RollupPluginSbomOptions):
5050
new CDX.Serialize.XML.Normalize.Factory(CDX.Spec.SpecVersionDict[options.specVersion]!),
5151
);
5252

53-
function processExternalModuleForBom(context: PluginContext, mod: ExternalModuleInfo | null) {
53+
function processExternalModuleForBom(context: PluginContext, mod: ExternalModuleInfo) {
5454
const dependencyInfo = dependencyInfoRegistry.get(mod.modulePath);
5555
if (!dependencyInfo) {
5656
const logFn = mod.isTransitive ? context.debug : context.warn;
5757
logFn({
58-
message: `Missing dependency info for module ${mod?.modulePath} in registry, this should not happen (ID: ${mod?.moduleId})`,
58+
message: `Missing dependency info for module ${mod.modulePath} in registry, this should not happen (ID: ${mod.moduleId})`,
5959
meta: mod,
6060
});
6161
}
@@ -64,7 +64,7 @@ export default function rollupPluginSbom(userOptions?: RollupPluginSbomOptions):
6464
if (!pkg || !pkg.name || !pkg.version) {
6565
const logFn = mod.isTransitive ? context.debug : context.warn;
6666
logFn({
67-
message: `Missing package data for module ${mod?.modulePath} in registry, this should not happen (ID: ${mod?.moduleId})`,
67+
message: `Missing package data for module ${mod.modulePath} in registry, this should not happen (ID: ${mod.moduleId})`,
6868
meta: mod,
6969
});
7070
return;

0 commit comments

Comments
 (0)