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

feat: adjust bridge router alias strategy #2950

Merged
merged 2 commits into from
Sep 14, 2024
Merged

Conversation

danpeen
Copy link
Contributor

@danpeen danpeen commented Sep 13, 2024

Description

feat: adjust bridge router alias strategy to alias to router-v6 when not found react-router-dom in package.json.

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 13, 2024

🦋 Changeset detected

Latest commit: d539f23

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

This PR includes changesets to release 37 packages
Name Type
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/enhanced Patch
@module-federation/rspack 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/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/retry-plugin 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 13, 2024

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit d539f23
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/66e3fc1ae653c8000870bfe9
😎 Deploy Preview https://deploy-preview-2950--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 adjusts the bridge router alias strategy to handle different versions of the react-router-dom library. The primary goal is to ensure that the correct alias is used for the react-router-dom dependency, whether it's version 5 or version 6.

The key changes include:

  • Added logic to determine the major version of the react-router-dom library and set the appropriate alias accordingly.
  • If react-router-dom version 6 is not found in the project's package.json, the alias will be set to router-v6.
  • This change helps maintain compatibility and integration with the existing codebase, ensuring a seamless transition between different versions of the react-router-dom library.
File Summaries
File Summary
packages/bridge/bridge-react-webpack-plugin/src/utis.ts The code changes adjust the bridge router alias strategy to handle different versions of the react-router-dom library. The primary purpose is to ensure that the correct alias is used for the react-router-dom dependency, whether it's version 5 or version 6. The changes include logic to determine the major version of the react-router-dom library and set the appropriate alias accordingly.

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

4a79d27662c70232dac3dc5ee651dadb16d833be...d539f231cb691ebf02eb13bdbc1e2a7d483217c6

Files Reviewed
  • packages/bridge/bridge-react-webpack-plugin/src/utis.ts
Files Ignored

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

  • .changeset/fifty-kangaroos-compete.md

@zhoushaw zhoushaw merged commit d90295b into main Sep 14, 2024
19 checks passed
@zhoushaw zhoushaw deleted the fix/bridge-router-proxy branch September 14, 2024 03:35
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