Skip to content

Commit

Permalink
Merge pull request #240 from vojtechszocs/fix-dep-value-empty-string
Browse files Browse the repository at this point in the history
Disallow empty string dependency values in DynamicRemotePlugin
  • Loading branch information
openshift-ci[bot] committed Oct 11, 2023
2 parents afe9c16 + 2c1cc81 commit bef912f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/lib-webpack/src/webpack/DynamicRemotePlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ export class DynamicRemotePlugin implements WebpackPluginInstance {
const invalidDepNames = Object.entries(
this.adaptedOptions.pluginMetadata.dependencies ?? {},
).reduce<string[]>(
(acc, [depName, versionRange]) => (semver.validRange(versionRange) ? acc : [...acc, depName]),
(acc, [depName, versionRange]) =>
versionRange && semver.validRange(versionRange) ? acc : [...acc, depName],
[],
);

Expand Down

0 comments on commit bef912f

Please sign in to comment.