Bump @matrix-org/react-sdk-module-api from 1.0.0 to 2.0.0 #25986
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on matrix-org/matrix-react-sdk#11395.
This PR includes two more changes:
1. Have Element compatible with multiple versions of the Module API at the same time
Based on the discussion in #element-dev:matrix.org. Gist: The semantic version of the Module API is not a good indicator for the compatibility of a module to the client. Element can accept modules that run on older versions of the module api as long as the Module-Surface-API stays compatible. If any non-backwards compatible change to the Module part of the API happens, this list must be reset.
2. Make sure only a single copy of the Module API is used
This was already the case without 1., but now it is inevitable. Some parts of the Module API rely on global variables, so every module must use the same instance of the module API package. 1. requires that all modules can work with all compatible versions of the Module API, so it should be acceptable to let webpack force to resolve it to a single instance.
An example where this breaks. Note that left shows the fallback textfield and right the correct component.
develop
branchThis error will only be testable when we have e2e tests for the Module API. I hope this discussion doesn't block this PR.
Checklist
This change is marked as an internal change (Task), so will not be included in the changelog.