-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
chore: add license info #3143
chore: add license info #3143
Conversation
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this 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 adds license information and makes various improvements to the codebase of the enhanced
and nextjs-mf
packages.
The key changes include:
- Adding MIT license headers and author information to multiple files, ensuring proper licensing and attribution.
- Refactoring and simplifying the code in the
ModuleFederationPlugin
andFederationRuntimePlugin
, improving maintainability and readability. - Enhancing the functionality of the
FederationRuntimePlugin
by adding support for embedding the federation runtime, modifying the entry point, and handling federation module dependencies. - Introducing a fallback mechanism in the
StartupHelpers.ts
file to handle changes in the structure of thecompilation.compiler.webpack
object. - Optimizing the
InvertedContainerRuntimeModule
by removing thefindEntryModuleOfContainer()
method and adding a new condition to thegenerate()
method.
These changes aim to improve the overall quality, maintainability, and compliance of the project's codebase.
File Summaries
File | Summary |
---|---|
packages/enhanced/src/lib/container/AsyncBoundaryPlugin.ts | This code change adds license information to the AsyncBoundaryPlugin.ts file, which is part of the enhanced package. The license information includes the MIT License and the author's name, Zackary Jackson. The primary purpose of this change is to provide clear licensing details for the file and ensure compliance with the project's licensing requirements. |
packages/enhanced/src/lib/container/ModuleFederationPlugin.ts | The code changes add a new line after the compiler.options.output.enabledLibraryTypes?.push(library.type); statement and introduce a new ContainerPlugin instance within the afterPlugins hook of the ModuleFederationPlugin . These modifications likely aim to enhance the functionality and configuration of the Module Federation plugin in the context of the project. |
packages/enhanced/src/lib/container/constant.ts | The code changes introduce license information and author details at the top of the file. The primary purpose is to provide licensing and attribution details for the code. |
packages/enhanced/src/lib/container/runtime/ChildCompilationRuntimePlugin.ts | The code changes introduce license information and comments to the ChildCompilationRuntimePlugin.ts file. The primary purpose of these modifications is to provide licensing details and author attribution for the file. |
packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimeModule.ts | The code changes add a license information header to the EmbedFederationRuntimeModule file, which is a part of the @module-federation/sdk package. The changes also include minor formatting updates, such as adding empty lines for better readability, without modifying the core functionality of the module. |
packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts | The code changes introduce a refactoring to the compilationHooksMap variable, simplifying the type definition and making it more concise. The primary purpose of this change is to improve the maintainability and readability of the codebase. |
packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts | The code changes introduce a new plugin called "FederationRuntimePlugin" that enhances the functionality of the Module Federation feature in Webpack. The plugin adds support for embedding the federation runtime, modifying the entry point to include the federation runtime, and handling federation module dependencies. Additionally, it integrates with the "PrefetchPlugin" to enable data prefetching for the federation modules. |
packages/enhanced/src/lib/container/runtime/utils.ts | The code changes introduce a license header at the top of the file, providing information about the MIT license and the author of the code. The primary purpose of this change is to add licensing details to the file, ensuring proper attribution and legal compliance. |
packages/enhanced/src/lib/startup/StartupHelpers.ts | The code changes introduce a fallback mechanism to handle the case where the JavascriptModulesPlugin property is not directly available on the compilation.compiler.webpack object. This ensures that the generateESMEntryStartup function can still function correctly, even if the structure of the compilation.compiler.webpack object changes in the future. |
packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts | The code changes remove the findEntryModuleOfContainer() method and add a new condition to the generate() method. The purpose of these changes is to ensure that the runtime module is not applied to the remote entry module itself, as it is already handled by the container entry module. |
There was a problem hiding this 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: 17
Configuration
Squadron Mode: essential
Commits Reviewed
0931fc55772ac74c14a80a0fce28a96495afc0bb...fd07cb1556f98e0fe769edb9eb7d5695fc73c7b1
Files Reviewed
- packages/enhanced/src/lib/container/AsyncBoundaryPlugin.ts
- packages/enhanced/src/lib/container/ModuleFederationPlugin.ts
- packages/enhanced/src/lib/container/constant.ts
- packages/enhanced/src/lib/container/runtime/ChildCompilationRuntimePlugin.ts
- packages/enhanced/src/lib/container/runtime/EmbedFederationRuntimeModule.ts
- packages/enhanced/src/lib/container/runtime/FederationModulesPlugin.ts
- packages/enhanced/src/lib/container/runtime/FederationRuntimePlugin.ts
- packages/enhanced/src/lib/container/runtime/utils.ts
- packages/enhanced/src/lib/startup/StartupHelpers.ts
- packages/nextjs-mf/src/plugins/container/InvertedContainerRuntimeModule.ts
Description
Related Issue
Types of changes
Checklist