Open Chevindu opened 6 months ago
Is this going to get merged ? @cwtuan
Is it possible to avoid making a breaking change?
I noticed the upstream library (formatjs) does not support the full HTML spec as rich text according to this part in their docs.
We could add support for a limited set of HTML/XML tags in react-intl-universal
and allow users to override it during init()
. But I did not do it due to following reasons:
Thus I added the option of xmlParser
to allow users to define the parsing they want to use in their messages. This part would need a documentation update, which should probably also point to the limitations mentioned in the upstream documentation.
Thank you for your reply. As you mentioned, this change will require an update to the documentation. Could you please update the README?
I'm sorry about the delay. I just updated the docs. Feel free to adjust/correct my wording.
Bump @cwtuan
Thank you for your contribution to this upgrade. The new version of intl-messageformat shows promise in handling rich text messages effectively. However, the potential for breaking changes could lead to disruptions in existing applications.
Internally, we're actively discussing strategies to mitigate these concerns and provide developers with the necessary tools to transition smoothly. Our suggestion is developing a tool to scan application source code and assist developers in writing correct messages. We believe such a tool could be immensely valuable in helping developers identify and address any potential issues introduced by the update.
We'd love to hear more about your thoughts on this idea and any insights you might have on how we can best implement it.
Another approach is to implement a new function such as intl.getComponent
that supports rich text, while ensuring that the intl.getHTML
function remains compatible with its previous behavior.
Description
This change updates
intl-messageformat
dependency version so that it fixes following npm deprecation warnings logged when installingreact-intl-universal
in a project.Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.