Skip to content

Commit

Permalink
fix: typo in version check
Browse files Browse the repository at this point in the history
There is a typo in checking requiredVersion of a shared module.
  • Loading branch information
ezr-ondrej authored Oct 10, 2024
1 parent a71936f commit 985a362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/config-utils/src/federated-modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function hasVersionSpecified(config: { [module: string]: WebpackSharedConfig }):
requiredVersion: string;
};
} {
return Object.values(config).every((c) => typeof c.version === 'string');
return Object.values(config).every((c) => typeof c.requiredVersion === 'string');
}

const federatedModules = ({
Expand Down Expand Up @@ -76,7 +76,7 @@ const federatedModules = ({
shared.forEach((dep) => {
if (!hasVersionSpecified(dep)) {
const invalidDeps = Object.entries(dep)
.filter(([, { version }]) => typeof version !== 'string')
.filter(([, { requiredVersion }]) => typeof requiredVersion !== 'string')
.map(([moduleName]) => moduleName);
throw new Error('Some of your shared dependencies do not have version specified! Dependencies with no version: ' + invalidDeps);
}
Expand Down

0 comments on commit 985a362

Please sign in to comment.