Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(enhanced): container addInclude wrap in make hook #3002

Merged
merged 11 commits into from
Sep 27, 2024

Conversation

ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Sep 27, 2024

Description

Ensure addInclude is done so in a async hook

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.

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: 040c7f6

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

This PR includes changesets to release 38 packages
Name Type
@module-federation/enhanced Patch
@module-federation/modern-js Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
3008-runtime-remote Patch
host Patch
host-v5 Patch
host-vue3 Patch
remote1 Patch
remote2 Patch
remote3 Patch
remote4 Patch
@module-federation/modernjs Patch
modernjs-ssr-dynamic-nested-remote Patch
modernjs-ssr-dynamic-remote-new-version Patch
modernjs-ssr-dynamic-remote Patch
modernjs-ssr-host Patch
modernjs-ssr-nested-remote Patch
modernjs-ssr-remote-new-version Patch
modernjs-ssr-remote Patch
@module-federation/runtime Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest 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/esbuild Patch
@module-federation/utilities 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

Copy link

netlify bot commented Sep 27, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 040c7f6
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/66f64afe046e3900081e766b
😎 Deploy Preview https://deploy-preview-3002--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
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 focuses on improving the handling of the addInclude operation in the ContainerPlugin and ensuring the proper setup of the FederationRuntimeDependency in the FederationRuntimePlugin. The changes are designed to address potential timing and execution issues related to the federation runtime dependency.

The key changes include:

  • Wrapping the addInclude operation in an asynchronous make hook to ensure it is executed correctly within the ContainerPlugin.
  • Introducing an additional check to ensure the FederationRuntimeDependency is properly set up before it is returned, by calling the ensureFile method.

These improvements help to enhance the reliability and robustness of the federation runtime functionality within the enhanced package.

File Summaries
File Summary
packages/enhanced/src/lib/container/ContainerPlugin.ts The code changes ensure that the addInclude operation is performed asynchronously within a make hook, which is necessary for the proper handling of the federation runtime dependency. This change helps to address potential issues related to the timing and execution of the addInclude operation.
packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts The code changes introduce an additional check to ensure that the FederationRuntimeDependency is properly set up before it is returned. This is done by calling the ensureFile method, which likely sets up the necessary file dependencies for the FederationRuntimeDependency. This change helps to ensure the correct initialization of the FederationRuntimeDependency object, which is a crucial part of the federation runtime plugin.

Copy link
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: 3

Configuration

Squadron Mode: essential

Commits Reviewed

39bfbb444516cec371636e59b9d262b35a603d50...d23e786fc58b6811234865ba98a20bc567820ae6

Files Reviewed
  • packages/enhanced/src/lib/container/ContainerPlugin.ts
Files Ignored

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

  • .changeset/ai-hungry-tiger.md

@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
Copy link
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: 3

Configuration

Squadron Mode: essential

Commits Reviewed

d23e786fc58b6811234865ba98a20bc567820ae6...43757c8bf75c78fa4c3ab0bb6f6e8c56f4928732

Files Reviewed
  • packages/enhanced/src/lib/container/ContainerPlugin.ts
Files Ignored

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

  • .changeset/ai-hungry-tiger.md

@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
Copy link
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: 5

Configuration

Squadron Mode: essential

Commits Reviewed

43757c8bf75c78fa4c3ab0bb6f6e8c56f4928732...52e009571de88a0991983913476c6b09f3392cd0

Files Reviewed
  • packages/enhanced/src/lib/container/ContainerPlugin.ts
  • packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts
Files Ignored

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

  • .changeset/ai-hungry-tiger.md
  • packages/enhanced/project.json

@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
Copy link
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: 4

Configuration

Squadron Mode: essential

Commits Reviewed

52e009571de88a0991983913476c6b09f3392cd0...a7616db0994086ee40973dc6cdcccc9505593d8f

Files Reviewed
  • packages/enhanced/src/lib/container/ContainerPlugin.ts
Files Ignored

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

  • .changeset/ai-hungry-tiger.md
  • ai-lint-fix.js
  • packages/enhanced/project.json
  • packages/enhanced/test/ConfigTestCases.template.js

Copy link
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: 2

Configuration

Squadron Mode: essential

Commits Reviewed

a7616db0994086ee40973dc6cdcccc9505593d8f...040c7f685de69a5825a042cb0ac404be3cc5f037

Files Reviewed
  • packages/enhanced/src/lib/container/ContainerPlugin.ts
Files Ignored

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

  • .changeset/ai-hungry-tiger.md
  • ai-lint-fix.js
  • packages/enhanced/project.json
  • packages/enhanced/test/ConfigTestCases.template.js

@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@module-federation module-federation deleted a comment from squadronai bot Sep 27, 2024
@ScriptedAlchemy ScriptedAlchemy merged commit 1b6bf0e into main Sep 27, 2024
27 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the add-include-container branch September 27, 2024 08:24
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.

1 participant