Skip to content

Commit

Permalink
chore: use react 17 jsx transform (#10462)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <[email protected]>
  • Loading branch information
mattkrick authored Nov 12, 2024
1 parent b2adfaa commit 09b3854
Show file tree
Hide file tree
Showing 1,003 changed files with 676 additions and 1,072 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"resolutions": {
"typescript": "^5.6.3",
"hoist-non-react-statics": "^3.3.0",
"@types/react": "16.9.11",
"@types/react-dom": "16.9.4",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
"immutable": "3.8.2",
"clean-css": "^5.2.2",
"node-forge": "^1.2.1",
Expand Down Expand Up @@ -120,7 +120,7 @@
"raw-loader": "^4.0.2",
"relay-compiler": "^18.0.0",
"relay-config": "^12.0.1",
"sucrase": "^3.32.0",
"sucrase": "^3.35.0",
"tailwindcss": "^3.2.7",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "9.2.6",
Expand Down
1 change: 0 additions & 1 deletion packages/client/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as Tooltip from '@radix-ui/react-tooltip'
import React from 'react'
import {BrowserRouter as Router} from 'react-router-dom'
import Action from './components/Action/Action'
import AtmosphereProvider from './components/AtmosphereProvider/AtmosphereProvider'
Expand Down
1 change: 0 additions & 1 deletion packages/client/client.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import {render} from 'react-dom'
import Root from './Root'
import './scrollIntoViewIfNeeded'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/Action/Action.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {lazy, memo, Suspense} from 'react'
import {lazy, memo, Suspense} from 'react'
import 'react-day-picker/dist/style.css'
import {Route, Switch} from 'react-router'
import useServiceWorkerUpdater from '../../hooks/useServiceWorkerUpdater'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/ActionMeeting.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import graphql from 'babel-plugin-relay/macro'
import React, {ReactElement, Suspense, useEffect} from 'react'
import {ReactElement, Suspense, useEffect} from 'react'
import {useFragment} from 'react-relay'
import {ActionMeeting_meeting$key} from '~/__generated__/ActionMeeting_meeting.graphql'
import {NewMeetingPhaseTypeEnum} from '../__generated__/ActionMeeting_meeting.graphql'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/ActionMeetingAgendaItems.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React, {useRef} from 'react'
import {useRef} from 'react'
import {useFragment} from 'react-relay'
import {ActionMeetingAgendaItems_meeting$key} from '~/__generated__/ActionMeetingAgendaItems_meeting.graphql'
import useBreakpoint from '~/hooks/useBreakpoint'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/ActionMeetingFirstCall.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {ActionMeetingFirstCall_meeting$key} from '../__generated__/ActionMeetingFirstCall_meeting.graphql'
import useAtmosphere from '../hooks/useAtmosphere'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/ActionMeetingLastCall.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import EndCheckInMutation from '~/mutations/EndCheckInMutation'
import {ActionMeetingLastCall_meeting$key} from '../__generated__/ActionMeetingLastCall_meeting.graphql'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/ActionMeetingSidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import graphql from 'babel-plugin-relay/macro'
import React, {Fragment} from 'react'
import {Fragment} from 'react'
import {useFragment} from 'react-relay'
import {
ActionMeetingSidebar_meeting$key,
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/ActionMeetingUpdates.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React, {useMemo} from 'react'
import {useMemo} from 'react'
import {useFragment} from 'react-relay'
import {ActionMeetingUpdates_meeting$key} from '../__generated__/ActionMeetingUpdates_meeting.graphql'
import useAtmosphere from '../hooks/useAtmosphere'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/ActionMeetingUpdatesPrompt.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {ActionMeetingUpdatesPrompt_meeting$key} from '../__generated__/ActionMeetingUpdatesPrompt_meeting.graphql'
import ActionMeetingUpdatesPromptTeamHelpText from '../modules/meeting/components/ActionMeetingUpdatesPromptTeamHelpText'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {ActionSidebarAgendaItemsSection_meeting$key} from '../__generated__/ActionSidebarAgendaItemsSection_meeting.graphql'
import useGotoStageId from '../hooks/useGotoStageId'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {ActionSidebarPhaseListItemChildren_meeting$key} from '~/__generated__/ActionSidebarPhaseListItemChildren_meeting.graphql'
import {NewMeetingPhaseTypeEnum} from '../__generated__/ActionSidebarAgendaItemsSection_meeting.graphql'
Expand Down
3 changes: 2 additions & 1 deletion packages/client/components/ActivityLibrary/AISearch.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {useState} from 'react'
import * as React from 'react'
import {useState} from 'react'
import {GetTemplateSuggestionMutation$data} from '../../__generated__/GetTemplateSuggestionMutation.graphql'
import useAtmosphere from '../../hooks/useAtmosphere'
import useMutationProps from '../../hooks/useMutationProps'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clsx from 'clsx'
import React from 'react'
import * as React from 'react'

interface Props {
className?: string
Expand Down
3 changes: 2 additions & 1 deletion packages/client/components/ActivityLibrary/ActivityCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {PropsWithChildren, useEffect, useRef, useState} from 'react'
import * as React from 'react'
import {PropsWithChildren, useEffect, useRef, useState} from 'react'
import {useFragment} from 'react-relay'
import {twMerge} from 'tailwind-merge'
import {ActivityCard_template$key} from '../../__generated__/ActivityCard_template.graphql'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Favorite} from '@mui/icons-material'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React from 'react'
import * as React from 'react'
import {useFragment} from 'react-relay'
import {ActivityCardFavorite_user$key} from '../../__generated__/ActivityCardFavorite_user.graphql'
import useAtmosphere from '../../hooks/useAtmosphere'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {useEffect, useState} from 'react'
import {useEffect, useState} from 'react'
import {PreloadedQuery, usePreloadedQuery} from 'react-relay'
import {Redirect, useHistory} from 'react-router'
import {Link} from 'react-router-dom'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clsx from 'clsx'
import React from 'react'
import * as React from 'react'

interface Props {
className?: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {ActivityDetailsBadges_template$key} from '~/__generated__/ActivityDetailsBadges_template.graphql'
import ActivityDetailsBadge from './ActivityDetailsBadge'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'
import * as DropdownMenu from '@radix-ui/react-dropdown-menu'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React from 'react'
import {useFragment} from 'react-relay'
import {ActivityDetailsCategoryBadge_template$key} from '~/__generated__/ActivityDetailsCategoryBadge_template.graphql'
import useTemplateCategoryMutation from '../../../mutations/UpdateTemplateCategoryMutation'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Suspense} from 'react'
import {Suspense} from 'react'
import {Redirect} from 'react-router'
import activityDetailsQuery, {
ActivityDetailsQuery
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {ContentCopy} from '@mui/icons-material'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {useCallback, useEffect, useState} from 'react'
import * as React from 'react'
import {useCallback, useEffect, useState} from 'react'
import {useFragment} from 'react-relay'
import {useHistory} from 'react-router'
import {MeetingTypeEnum} from '~/__generated__/ActivityDetailsQuery.graphql'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clsx from 'clsx'
import React from 'react'
import * as React from 'react'

interface DetailsBadgeProps {
className?: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import clsx from 'clsx'
import React from 'react'
import * as React from 'react'
import AzureDevOpsSVG from '../../../AzureDevOpsSVG'
import GitHubSVG from '../../../GitHubSVG'
import GitLabSVG from '../../../GitLabSVG'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {useEffect, useRef, useState} from 'react'
import {useEffect, useRef, useState} from 'react'
import {useFragment} from 'react-relay'
import {useHistory} from 'react-router'
import {RRule} from 'rrule'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {Link} from 'react-router-dom'
import {ActivityGrid_user$key} from '../../__generated__/ActivityGrid_user.graphql'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as ScrollArea from '@radix-ui/react-scroll-area'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {Fragment, useEffect, useMemo} from 'react'
import {Fragment, useEffect, useMemo, useState} from 'react'
import {
PreloadedQuery,
commitLocalUpdate,
Expand Down Expand Up @@ -229,7 +229,7 @@ export const ActivityLibrary = (props: Props) => {
const {availableTemplates, organizations} = viewer
const hasAITemplateFeatureFlag = organizations.some((org) => org.hasAITemplateFlag)

const [isSearching, setIsSearching] = React.useState(true)
const [isSearching, setIsSearching] = useState(true)
const [templateSearch, refetchTemplateSearch] = useRefetchableFragment<
ActivityLibraryTemplateSearchRefetchQuery,
ActivityLibraryTemplateSearch_query$key
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as ScrollArea from '@radix-ui/react-scroll-area'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React from 'react'
import {
ActivityLibraryCardDescription_template$data,
ActivityLibraryCardDescription_template$key
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import FavoriteIcon from '@mui/icons-material/Favorite'
import React from 'react'
import favoriteImg from '../../../../static/images/illustrations/favorite-empty-state.png'
import halloweenRetrospectiveTemplate from '../../../../static/images/illustrations/halloweenRetrospectiveTemplate.png'
import {AllCategoryID, QUICK_START_CATEGORY_ID} from './Categories'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Suspense} from 'react'
import {Suspense} from 'react'
import activityLibraryQuery, {
ActivityLibraryQuery
} from '~/__generated__/ActivityLibraryQuery.graphql'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {lazy} from 'react'
import {lazy} from 'react'
import {Route, Switch, useRouteMatch} from 'react-router'
import useSubscription from '../../hooks/useSubscription'
import NotificationSubscription from '../../subscriptions/NotificationSubscription'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/ActivityLibrary/Categories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import FavoriteIcon from '@mui/icons-material/Favorite'
import React from 'react'
import {MeetingTypeEnum} from '../../__generated__/MeetingSelectorQuery.graphql'
import {CardTheme} from './ActivityCard'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {Add as AddIcon} from '@mui/icons-material'
import clsx from 'clsx'
import React from 'react'
import {Link} from 'react-router-dom'

import {ActivityCard} from './ActivityCard'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as RadioGroup from '@radix-ui/react-radio-group'
import graphql from 'babel-plugin-relay/macro'
import clsx from 'clsx'
import React, {ComponentPropsWithoutRef, useState} from 'react'
import * as React from 'react'
import {ComponentPropsWithoutRef, useState} from 'react'
import {PreloadedQuery, usePreloadedQuery} from 'react-relay'
import {useHistory} from 'react-router'
import {Link} from 'react-router-dom'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Suspense} from 'react'
import {Suspense} from 'react'

import useQueryLoaderNow from '../../../hooks/useQueryLoaderNow'
import {Loader} from '../../../utils/relay/renderLoader'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {RRule} from 'rrule'
import {ScheduleMeetingButton_team$key} from '~/__generated__/ScheduleMeetingButton_team.graphql'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/ActivityLibrary/SearchBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Search as SearchIcon} from '@mui/icons-material'
import React, {ChangeEvent} from 'react'
import {ChangeEvent} from 'react'

interface Props {
searchQuery: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import graphql from 'babel-plugin-relay/macro'
import React, {useEffect, useState} from 'react'
import {useEffect, useState} from 'react'

import clsx from 'clsx'
import {useFragment} from 'react-relay'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/AddPollButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styled from '@emotion/styled'
import {PollOutlined} from '@mui/icons-material'
import React from 'react'
import {PALETTE} from '~/styles/paletteV3'
import PlainButton from './PlainButton/PlainButton'

Expand Down
1 change: 0 additions & 1 deletion packages/client/components/AddTaskButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import styled from '@emotion/styled'
import {TaskAltOutlined} from '@mui/icons-material'
import React from 'react'
import {PALETTE} from '~/styles/paletteV3'
import PlainButton from './PlainButton/PlainButton'

Expand Down
3 changes: 2 additions & 1 deletion packages/client/components/AddTaskButton/AddTaskButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styled from '@emotion/styled'
import React, {forwardRef, Ref} from 'react'
import * as React from 'react'
import {forwardRef, Ref} from 'react'
import IconLabel from '../IconLabel'
import RaisedButton from '../RaisedButton'

Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddTeamDialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import graphql from 'babel-plugin-relay/macro'
import React, {useState} from 'react'
import {useState} from 'react'
import {PreloadedQuery, useFragment, usePreloadedQuery} from 'react-relay'
import useRouter from '~/hooks/useRouter'
import AddTeamMutation from '~/mutations/AddTeamMutation'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddTeamDialogRoot.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {Suspense} from 'react'
import {Suspense} from 'react'
import addTeamDialogQuery, {AddTeamDialogQuery} from '../__generated__/AddTeamDialogQuery.graphql'
import useQueryLoaderNow from '../hooks/useQueryLoaderNow'
import {Loader} from '../utils/relay/renderLoader'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/AddTeamMemberAvatarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import styled from '@emotion/styled'
import {PersonAdd} from '@mui/icons-material'
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {PALETTE} from '~/styles/paletteV3'
import {AddTeamMemberAvatarButton_teamMembers$key} from '../__generated__/AddTeamMemberAvatarButton_teamMembers.graphql'
Expand Down
3 changes: 2 additions & 1 deletion packages/client/components/AddTeamMemberModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import styled from '@emotion/styled'
import {Error as ErrorIcon, Warning} from '@mui/icons-material'
import graphql from 'babel-plugin-relay/macro'
import React, {useState} from 'react'
import * as React from 'react'
import {useState} from 'react'
import {useFragment} from 'react-relay'
import useAtmosphere from '~/hooks/useAtmosphere'
import useMutationProps from '~/hooks/useMutationProps'
Expand Down
1 change: 0 additions & 1 deletion packages/client/components/AddTeamMemberModalDemo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import styled from '@emotion/styled'
import React from 'react'
import modalTeamInvitePng from '../../../static/images/illustrations/illus-modal-team-invite.png'
import hasToken from '../utils/hasToken'
import DemoCreateAccountPrimaryButton from './DemoCreateAccountPrimaryButton'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddTeamMemberModalSuccess.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled'
import React, {Component} from 'react'
import {Component} from 'react'
import DialogContainer from './DialogContainer'
import DialogContent from './DialogContent'
import DialogTitle from './DialogTitle'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddToAzureMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React, {forwardRef} from 'react'
import {forwardRef} from 'react'
import {useFragment} from 'react-relay'
import {AddToAzureMenuItem_AzureIntegration$key} from '../__generated__/AddToAzureMenuItem_AzureIntegration.graphql'
import useAtmosphere from '../hooks/useAtmosphere'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddToGitHubMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled'
import React, {forwardRef} from 'react'
import {forwardRef} from 'react'
import useAtmosphere from '../hooks/useAtmosphere'
import {MenuMutationProps} from '../hooks/useMutationProps'
import {ICON_SIZE} from '../styles/typographyV2'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddToGitLabMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled'
import graphql from 'babel-plugin-relay/macro'
import React, {forwardRef} from 'react'
import {forwardRef} from 'react'
import {useFragment} from 'react-relay'
import GitLabClientManager from '~/utils/GitLabClientManager'
import {AddToGitLabMenuItem_GitLabIntegration$key} from '../__generated__/AddToGitLabMenuItem_GitLabIntegration.graphql'
Expand Down
2 changes: 1 addition & 1 deletion packages/client/components/AddToJiraMenuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled'
import React, {forwardRef} from 'react'
import {forwardRef} from 'react'
import useAtmosphere from '../hooks/useAtmosphere'
import {MenuMutationProps} from '../hooks/useMutationProps'
import {ICON_SIZE} from '../styles/typographyV2'
Expand Down
Loading

0 comments on commit 09b3854

Please sign in to comment.