-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
add URL Dependencies support for module federation(consume shared module) #14035
Conversation
For maintainers only:
|
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.
We need a package to parse it, because there is a lot of edge cases
@alexander-akait Sorry but I do not get you, maybe I should provide a demo package or add some test cases? |
@alexander-akait Thx, I know, I will add handler for more edge cases, and it will be more simple than |
Simple version is good, but as minimum we need adapt test from this repo to ensure we have the same logic |
Hi @liulangyu90316. Just a little hint from a friendly bot about the best practice when submitting pull requests:
You don't have to change it for this PR, just make sure to follow this hint the next time you submit a PR. |
@alexander-akait Already add more edge cases handlers according to |
/^((git\+)?(ssh|https?|file)|git|github|gitlab|bitbucket|gist):$/; | ||
|
||
// Has custom protocol | ||
const RE_CUSTOM_PROTOCOL = /^((git\+)?(ssh|https?|file)|git):\/\//; |
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.
Protocols can be FILE://
i.e. uppercased, same for domains
@liulangyu90316 Thanks for your update. I labeled the Pull Request so reviewers will review it again. @alexander-akait Please review the new changes. |
@alexander-akait Changes intergration and project intergration checks couldn't pass, maybe that's because I fetched some commits from main branch? Could you help giving some clue? |
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
Hi, great work, we will need support for this at my company too, but we have self hosted version of bitbucket at bitbucket.companyName.com, from a quick look at code it looks like it wont be supported. Therefore, could you support adding custom parsers into |
@liulangyu90316 thank you so much for the contribution we will attribute your work from #16945 into the release notes! |
For module federation shared, without
requiredVersion
configured, it will infer version base on package.json, as we can see inConsumeSharedPlugin.js
.But when we get requiredVersion from package.json, it just get dep / dev / peer / optional dependencies value, without consideration of some URL Dependencies cases.
For example,
"isarray": "git+https://github.com/juliangruber/isarray.git#v2.0.3"
, it's real version should bev2.0.3
, but we can not get that.This pr will add a good support for URL Dependencies with versions.
What kind of change does this PR introduce?
Feature, add URL Dependencies support for module federation.
Did you add tests for your changes?
Already did.
Does this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
Nothing.