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(dts-plugin): add IPV6 property to DTS Plugin #3421

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

RussellCanfield
Copy link
Contributor

@RussellCanfield RussellCanfield commented Jan 2, 2025

Added IPv6 property to the DTS plugin

#3382

Copy link

changeset-bot bot commented Jan 2, 2025

🦋 Changeset detected

Latest commit: 05c700a

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

This PR includes changesets to release 29 packages
Name Type
@module-federation/dts-plugin Major
@module-federation/sdk Major
@module-federation/enhanced Major
@module-federation/manifest Major
@module-federation/rspack Major
@module-federation/devtools Major
@module-federation/data-prefetch Major
@module-federation/esbuild Patch
@module-federation/managers Major
@module-federation/modern-js Major
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/retry-plugin Major
@module-federation/rsbuild-plugin Major
@module-federation/runtime-core Patch
@module-federation/runtime Major
@module-federation/storybook-addon Major
@module-federation/utilities Patch
@module-federation/webpack-bundler-runtime Major
@module-federation/bridge-react-webpack-plugin Major
@module-federation/bridge-react Major
@module-federation/bridge-vue3 Major
@module-federation/modernjsapp Patch
@module-federation/runtime-tools Major
@module-federation/inject-external-runtime-core-plugin Major
@module-federation/third-party-dts-extractor Major
@module-federation/bridge-shared Major
@module-federation/error-codes Major
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

Copy link

netlify bot commented Jan 2, 2025

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 05c700a
🔍 Latest deploy log https://app.netlify.com/sites/module-federation-docs/deploys/677d5193f347f4000850de37
😎 Deploy Preview https://deploy-preview-3421--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.

@RussellCanfield
Copy link
Contributor Author

@2heal1 - I know you are assigned this issue, but how do you feel about this new setting?

@2heal1
Copy link
Member

2heal1 commented Jan 2, 2025

i see both node.js and axios use family to specify the ipversion , can we keep the same with them

@RussellCanfield
Copy link
Contributor Author

i see both node.js and axios use family to specify the ipversion , can we keep the same with them

I think we can safely just omit the { family } object when its ipv6, but explicitly setting it should be fine. Right now it will just set family to 4 or 6 based on the new DTS config param.

The http agent is passed to axios, so axios will respect what the underlying agent is configured to. Is there another location to look for nodejs?

@2heal1
Copy link
Member

2heal1 commented Jan 3, 2025

Emm i want to follow the standard named options because if new ipversion coming the useIpv6 can not be extend easily

@RussellCanfield
Copy link
Contributor Author

Emm i want to follow the standard named options because if new ipversion coming the useIpv6 can not be extend easily

Updated :)

@@ -144,6 +144,7 @@ export interface DtsHostOptions {
maxRetries?: number;
consumeAPITypes?: boolean;
runtimePkgs?: string[];
ipVersion?: 'ipv4' | 'ipv6';
Copy link
Member

Choose a reason for hiding this comment

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

can you set the field as family , so no need to add transform helper

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can, the name "family" felt a little ambiguous at first and the types are a bit weird since multiple layers of the config can be a boolean or the type so there is a lot of casting involved - which the helper/util method sort of abstracted away

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@2heal1 - updated, let me know if you want me to just inline the type handling and remove the util method

Copy link
Member

Choose a reason for hiding this comment

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

That's fine . Thanks for contributing! Approved~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! Let me test this a bit further

Copy link
Member

Choose a reason for hiding this comment

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

Yeah sure , when you ready to merge just pin me

@2heal1
Copy link
Member

2heal1 commented Jan 15, 2025

Hi ,do you ready to merge ?

@RussellCanfield
Copy link
Contributor Author

Hi ,do you ready to merge ?

I've been testing this a little bit and it seems it still requires setting the rspack dev server to a host value of 127.0.0.1, at least in my case.

I'm thinking it's more on the host side than the requesting side or possibly both. Need to test more

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