Update react monorepo to v19 (major) (#28914)
* Update react monorepo to v19 * Import JSX explicitly for React 19 compatibility Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update usages of refs for React 19 compatibility Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update react imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Avoid legacy contexts as much as possible Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Avoid deprecated React symbols Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Stash Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update usages of refs for React 19 compatibility Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch pillify to use a html-react-parser approach rather than DOM muddling Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate react html parsing Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate react html parsing Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate html parsing Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Memoize the EventContentBody component Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate html parsing Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Simplify Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Discard changes to src/Linkify.tsx * Discard changes to src/components/views/messages/TextualBody.tsx * Discard changes to src/settings/handlers/AbstractLocalStorageSettingsHandler.ts * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Prepare for React 19 upgrade Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove stale comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -1,48 +1,72 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`FormattingUtils formatList should return expected sentence in ReactNode when given 2 React children 1`] = `
|
||||
<span>
|
||||
<span>
|
||||
a
|
||||
</span>
|
||||
and
|
||||
<span>
|
||||
b
|
||||
</span>
|
||||
</span>
|
||||
<React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
a
|
||||
</span>
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
and
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
b
|
||||
</span>
|
||||
</React.Fragment>
|
||||
</React.Fragment>
|
||||
`;
|
||||
|
||||
exports[`FormattingUtils formatList should return expected sentence in ReactNode when given more React children 1`] = `
|
||||
<span>
|
||||
<span>
|
||||
a
|
||||
</span>
|
||||
,
|
||||
<span>
|
||||
b
|
||||
</span>
|
||||
,
|
||||
<span>
|
||||
c
|
||||
</span>
|
||||
and
|
||||
<span>
|
||||
d
|
||||
</span>
|
||||
</span>
|
||||
<React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
a
|
||||
</span>
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
,
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
b
|
||||
</span>
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
,
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
c
|
||||
</span>
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
and
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
d
|
||||
</span>
|
||||
</React.Fragment>
|
||||
</React.Fragment>
|
||||
`;
|
||||
|
||||
exports[`FormattingUtils formatList should return expected sentence in ReactNode when using itemLimit 1`] = `
|
||||
<span>
|
||||
<span>
|
||||
<span>
|
||||
a
|
||||
</span>
|
||||
,
|
||||
<span>
|
||||
b
|
||||
</span>
|
||||
</span>
|
||||
<React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
a
|
||||
</span>
|
||||
,
|
||||
</React.Fragment>
|
||||
<React.Fragment>
|
||||
<span>
|
||||
b
|
||||
</span>
|
||||
</React.Fragment>
|
||||
</React.Fragment>
|
||||
and 2 others
|
||||
</span>
|
||||
`;
|
||||
|
||||
@@ -253,8 +253,9 @@ describe("export", function () {
|
||||
},
|
||||
setProgressText,
|
||||
);
|
||||
const imageRegex = /<img.+ src="mxc:\/\/test.org" alt="image\.png"\/?>/;
|
||||
expect(imageRegex.test(renderToString(exporter.getEventTile(mkImageEvent(), true)))).toBeTruthy();
|
||||
expect(renderToString(exporter.getEventTile(mkImageEvent(), true))).toMatch(
|
||||
/<img.+ alt="image\.png" src="mxc:\/\/test.org"\/?>/,
|
||||
);
|
||||
});
|
||||
|
||||
const invalidExportOptions: [string, IExportOptions][] = [
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -116,7 +116,7 @@ describe("Permalinks", function () {
|
||||
|
||||
it("should gracefully handle invalid MXIDs", () => {
|
||||
const roomId = "!fake:example.org";
|
||||
const alice50 = makeMemberWithPL(roomId, "@alice:pl_50:org", 50);
|
||||
const alice50 = makeMemberWithPL(roomId, "@alice:pl-50:org", 50);
|
||||
const room = mockRoom(roomId, [alice50]);
|
||||
const creator = new RoomPermalinkCreator(room);
|
||||
creator.load();
|
||||
|
||||
Reference in New Issue
Block a user