You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For module federation shared, without requiredVersion configured, it will infer the version based on package.json, as we can see in ConsumeSharedPlugin.js.
But when we get requiredVersion from package.json, it just gets 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 be v2.0.3, but we can not get that.
Summary
🤖 Generated by Copilot at fb959e1
This pull request adds support for git urls as dependencies in shared modules. It implements a new function normalizeVersion to handle git urls in lib/sharing/utils.js and adds more tests and dependencies to the test/configCases/sharing/consume-multiple-versions folder to verify the feature. It also updates the cspell.json file to ignore the word "commithash".
Details
🤖 Generated by Copilot at fb959e1
Add normalizeVersion function to lib/sharing/utils.js to normalize the version of a shared module from a git url (link)
Use normalizeVersion function on the optional, dependencies, peer dependencies, and dev dependencies of a shared module in getRequiredVersion function in lib/sharing/utils.js to ensure consistent version resolution (link, link, link, link)
Add commithash to the cspell ignore list in cspell.json to avoid spelling errors in the code that deals with git commit hashes (link)
Add more shared modules with different versions and git urls as dependencies to the test/configCases/sharing/consume-multiple-versions test case to test the new feature of allowing git urls as dependencies in the package.json of a shared module (link, link, link)
Add more expectations to the test/configCases/sharing/consume-multiple-versions/index.js file to check the versions of the shared modules that are required by the host module (link)
The text was updated successfully, but these errors were encountered:
A pull request by @snitin315 was merged and maintainers requested a documentation change.
See pull request: webpack/webpack#16945
Fixes webpack/webpack#14035
Summary
🤖 Generated by Copilot at fb959e1
This pull request adds support for git urls as dependencies in shared modules. It implements a new function
normalizeVersion
to handle git urls inlib/sharing/utils.js
and adds more tests and dependencies to thetest/configCases/sharing/consume-multiple-versions
folder to verify the feature. It also updates thecspell.json
file to ignore the word "commithash".Details
🤖 Generated by Copilot at fb959e1
normalizeVersion
function tolib/sharing/utils.js
to normalize the version of a shared module from a git url (link)normalizeVersion
function on the optional, dependencies, peer dependencies, and dev dependencies of a shared module ingetRequiredVersion
function inlib/sharing/utils.js
to ensure consistent version resolution (link, link, link, link)commithash
to the cspell ignore list incspell.json
to avoid spelling errors in the code that deals with git commit hashes (link)test/configCases/sharing/consume-multiple-versions
test case to test the new feature of allowing git urls as dependencies in the package.json of a shared module (link, link, link)test/configCases/sharing/consume-multiple-versions/index.js
file to check the versions of the shared modules that are required by the host module (link)The text was updated successfully, but these errors were encountered: