Skip to content

fix(manifest): add default exposes fields if enable disableAssetsAnalyze#3396

Merged
zhoushaw merged 1 commit intomainfrom
fix/default-exposes
Dec 26, 2024
Merged

fix(manifest): add default exposes fields if enable disableAssetsAnalyze#3396
zhoushaw merged 1 commit intomainfrom
fix/default-exposes

Conversation

@2heal1
Copy link
Copy Markdown
Member

@2heal1 2heal1 commented Dec 24, 2024

Description

add default exposes fields if enable disableAssetsAnalyze

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 24, 2024

🦋 Changeset detected

Latest commit: e53d36d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@module-federation/manifest Patch
@module-federation/enhanced Patch
@module-federation/modern-js Patch
@module-federation/rspack Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/rsbuild-plugin Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
@module-federation/runtime Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/error-codes Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch
website-new Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Dec 24, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit e53d36d
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/676a3f8b0c3741000855d470
😎 Deploy Preview https://deploy-preview-3396--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Copy Markdown
Contributor

@squadronai squadronai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This pull request fixes an issue in the manifest module by adding default exposes fields if the disableAssetsAnalyze option is enabled. The changes are focused on the ModuleHandler and StatsManager classes.

The key changes are:

  • A new getExposeItem function has been added to the ModuleHandler class, which creates a StatsExpose object with default values for various properties (path, id, name, requires, file, and assets). This function is then used to populate the exposesMap object with the necessary data for each exposed module.
  • In the StatsManager class, the code has been updated to add the default exposes fields to the stats object if the disableAssetsAnalyze option is enabled. This ensures that the exposes information is properly included in the generated stats, even when the asset analysis is disabled.

These changes help to maintain the integrity of the exposes data in the generated stats, even when the asset analysis feature is disabled. This will improve the overall reliability and consistency of the manifest module's functionality.

File Summaries
File Summary
packages/manifest/src/ModuleHandler.ts The code changes introduce a new function getExposeItem that creates a StatsExpose object with default values for the path, id, name, requires, file, and assets properties. This function is then used within the ModuleHandler class to populate the exposesMap object with the necessary data for each exposed module.
packages/manifest/src/StatsManager.ts The code changes add default exposes fields to the stats object if the disableAssetsAnalyze option is enabled. This ensures that the exposes information is properly included in the generated stats, even when the asset analysis is disabled.

Copy link
Copy Markdown
Contributor

@squadronai squadronai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incremental Review

Comments posted: 6

Configuration

Squadron Mode: essential

Commits Reviewed

222aa5baea6024ee73167a0f4993b91bf78a2fdb...e53d36d4c7b9180deeaf3156b358579061ab4211

Files Reviewed
  • packages/manifest/src/ModuleHandler.ts
  • packages/manifest/src/StatsManager.ts
Files Ignored

These files were ignored due to the filter in the squadron.yaml file.

  • .changeset/metal-bags-admire.md

@zhoushaw zhoushaw merged commit 4a2cf82 into main Dec 26, 2024
@zhoushaw zhoushaw deleted the fix/default-exposes branch December 26, 2024 09:20
@2heal1 2heal1 mentioned this pull request Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants