Skip to content

Commit 60c9da1

Browse files
coder-karenmatticbot
authored andcommitted
React compatibility: Changing global JSX namespace to React.JSX (#38585)
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/10157890644 Upstream-Ref: Automattic/jetpack@b50a15c
1 parent 26e41ae commit 60c9da1

File tree

8 files changed

+92
-89
lines changed

8 files changed

+92
-89
lines changed

composer.lock

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/automattic/jetpack-mu-wpcom/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ This is an alpha version! The changes listed here are not final.
1313
- Admin bar: Force mobile viewport to have the same icon color as desktop
1414
- Blog Privacy: Update Applebot-Extended disallow rule
1515
- Hide the plugin banner on non-wpcom-connected users or agency-managed users
16+
- React: Changing global JSX namespace to React.JSX
1617

1718
### Fixed
1819
- Admin Bar: Fix the order of the top-right items on Atomic sites
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => 'b515758ac27e45334920');
1+
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => 'f218072b4f6c868afcae');

vendor/automattic/jetpack-mu-wpcom/src/build/wpcom-block-description-links/wpcom-block-description-links.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-block-description-links/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { localizeUrl } from '@automattic/i18n-utils';
22
import { createInterpolateElement } from '@wordpress/element';
33
import { addFilter } from '@wordpress/hooks';
44
import { JSXElementConstructor, ReactElement } from 'react';
5+
import React from 'react';
56
import blockInfoMapping, {
67
blockInfoWithVariations,
78
childrenBlockInfoWithDifferentUrl,

vendor/automattic/jetpack-mu-wpcom/src/features/wpcom-block-description-links/src/inline-support-link.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useAnalytics } from '@automattic/jetpack-shared-extension-utils';
33
import { Button, ExternalLink } from '@wordpress/components';
44
import { useDispatch } from '@wordpress/data';
55
import { __ } from '@wordpress/i18n';
6+
import React from 'react';
67
import { useState, JSXElementConstructor, ReactElement } from 'react';
78

89
interface Props {
@@ -27,7 +28,7 @@ export default function DescriptionSupportLink( {
2728
title,
2829
url,
2930
postId,
30-
}: Props ): JSX.Element {
31+
}: Props ): React.JSX.Element {
3132
// This was cooked up to only apply the link in the BlockEditor sidebar.
3233
// Since there was no identifier in the environment to differentiate.
3334
const [ ref, setRef ] = useState< Element | null >();
@@ -37,7 +38,7 @@ export default function DescriptionSupportLink( {
3738
const setShowSupportDoc = helpCenterDispatch?.setShowSupportDoc;
3839

3940
if ( ref && ! ref?.closest( '.block-editor-block-inspector' ) ) {
40-
return children as JSX.Element;
41+
return children as React.JSX.Element;
4142
}
4243

4344
return (

0 commit comments

Comments
 (0)