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

chore: add license info #3143

Merged
merged 2 commits into from
Oct 31, 2024
Merged

chore: add license info #3143

merged 2 commits into from
Oct 31, 2024

Conversation

ScriptedAlchemy
Copy link
Member

@ScriptedAlchemy ScriptedAlchemy commented Oct 31, 2024

Description

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 Oct 31, 2024

⚠️ No Changeset found

Latest commit: 8acea59

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 8acea59
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/6722ff0e60d5510008e48924
😎 Deploy Preview https://deploy-preview-3143--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 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 and FederationRuntimePlugin, 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 the compilation.compiler.webpack object.
  • Optimizing the InvertedContainerRuntimeModule by removing the findEntryModuleOfContainer() method and adding a new condition to the generate() 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.

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: 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

@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@module-federation module-federation deleted a comment from squadronai bot Oct 31, 2024
@ScriptedAlchemy ScriptedAlchemy merged commit f0c518f into main Oct 31, 2024
16 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the license-headers branch October 31, 2024 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant