Skip to content

Commit

Permalink
fix(scripts-gulp): resolve type/logic issues after webpack middleware…
Browse files Browse the repository at this point in the history
… bump
  • Loading branch information
Hotell committed Mar 1, 2024
1 parent dcfc184 commit 3df13aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/gulp/src/tasks/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ task('serve:docs:hot', async () => {
WebpackDevMiddleware(compiler, {
publicPath: webpackConfig.output.publicPath,
stats: 'errors-warnings',
} as WebpackDevMiddleware.Options),
} as WebpackDevMiddleware.Options<any, any>),
);

if (process.env.NODE_ENV !== 'production') {
Expand Down
12 changes: 8 additions & 4 deletions scripts/gulp/src/tasks/test-dependencies/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,16 @@ export const prepareWebpackConfig = (options: WebpackOptions) => {
},
renderLicenses: modules => {
modules.forEach(module => {
const packageName = module.packageJson.name;
const packageVersion = module.packageJson.version;
if (module.packageJson) {
const packageName = module.packageJson.name;
const packageVersion = module.packageJson.version;

onDependencyPackage(packageName, packageVersion);
onDependencyPackage(packageName, packageVersion);
} else {
console.error('package.json not found');
}

return modules[0].packageJson.name;
return modules[0].packageJson?.name;
});

return '';
Expand Down

0 comments on commit 3df13aa

Please sign in to comment.