diff --git a/.changeset/new-planets-pump.md b/.changeset/new-planets-pump.md new file mode 100644 index 0000000000..aa6f7010f1 --- /dev/null +++ b/.changeset/new-planets-pump.md @@ -0,0 +1,85 @@ +--- +'@backstage/plugin-catalog-unprocessed-entities': patch +'@backstage/plugin-git-release-manager': patch +'@backstage/plugin-github-deployments': patch +'@backstage/plugin-kubernetes-cluster': patch +'@backstage/plugin-microsoft-calendar': patch +'@backstage/plugin-newrelic-dashboard': patch +'@backstage/plugin-entity-validation': patch +'@internal/plugin-todo-list': patch +'@backstage/core-components': patch +'@backstage/plugin-kubernetes-react': patch +'@backstage/plugin-scaffolder-react': patch +'@backstage/plugin-cicd-statistics': patch +'@backstage/plugin-entity-feedback': patch +'@backstage/plugin-gitops-profiles': patch +'@backstage/plugin-graphql-voyager': patch +'@backstage/plugin-apache-airflow': patch +'@backstage/plugin-catalog-import': patch +'@backstage/plugin-github-actions': patch +'@backstage/plugin-octopus-deploy': patch +'@backstage/plugin-splunk-on-call': patch +'@backstage/plugin-stack-overflow': patch +'@backstage/plugin-techdocs-react': patch +'@backstage/core-app-api': patch +'@backstage/plugin-catalog-graph': patch +'@backstage/plugin-catalog-react': patch +'@backstage/plugin-code-coverage': patch +'@backstage/plugin-config-schema': patch +'@backstage/plugin-cost-insights': patch +'@backstage/plugin-github-issues': patch +'@backstage/plugin-notifications': patch +'@backstage/plugin-tech-insights': patch +'@backstage/plugin-user-settings': patch +'@backstage/plugin-azure-devops': patch +'@backstage/plugin-code-climate': patch +'@backstage/plugin-search-react': patch +'@backstage/plugin-azure-sites': patch +'@backstage/plugin-firehydrant': patch +'@backstage/dev-utils': patch +'@backstage/plugin-cloudbuild': patch +'@backstage/plugin-lighthouse': patch +'@backstage/plugin-scaffolder': patch +'@backstage/plugin-stackstorm': patch +'@backstage/plugin-tech-radar': patch +'@backstage/plugin-codescene': patch +'@backstage/plugin-dynatrace': patch +'@backstage/plugin-gcalendar': patch +'@backstage/plugin-org-react': patch +'@backstage/plugin-pagerduty': patch +'@backstage/plugin-shortcuts': patch +'@backstage/plugin-sonarqube': patch +'@backstage/plugin-xcmetrics': patch +'@backstage/plugin-airbrake': patch +'@backstage/plugin-circleci': patch +'@backstage/plugin-devtools': patch +'@backstage/plugin-graphiql': patch +'@backstage/plugin-linguist': patch +'@backstage/plugin-newrelic': patch +'@backstage/plugin-periskop': patch +'@backstage/plugin-playlist': patch +'@backstage/plugin-puppetdb': patch +'@backstage/plugin-techdocs': patch +'@backstage/plugin-bitrise': patch +'@backstage/plugin-catalog': patch +'@backstage/plugin-explore': patch +'@backstage/plugin-jenkins': patch +'@backstage/plugin-rollbar': patch +'@backstage/plugin-allure': patch +'@backstage/plugin-badges': patch +'@backstage/plugin-bazaar': patch +'@backstage/plugin-search': patch +'@backstage/plugin-sentry': patch +'@backstage/plugin-fossa': patch +'@backstage/plugin-ilert': patch +'@backstage/plugin-kafka': patch +'@backstage/plugin-nomad': patch +'@backstage/plugin-vault': patch +'example-app': patch +'@backstage/plugin-gocd': patch +'@backstage/plugin-home': patch +'@backstage/plugin-adr': patch +'@backstage/plugin-org': patch +--- + +Use esm exports of react-use library diff --git a/.github/vale/config/vocabularies/Backstage/accept.txt b/.github/vale/config/vocabularies/Backstage/accept.txt index bbefaf67a4..e06d57beb8 100644 --- a/.github/vale/config/vocabularies/Backstage/accept.txt +++ b/.github/vale/config/vocabularies/Backstage/accept.txt @@ -114,6 +114,7 @@ env Env esbuild eslint +esm ESModule ESModules etag diff --git a/packages/app/src/components/advancedSettings/AdvancedSettings.tsx b/packages/app/src/components/advancedSettings/AdvancedSettings.tsx index 9a1e0fd162..574f7ec754 100644 --- a/packages/app/src/components/advancedSettings/AdvancedSettings.tsx +++ b/packages/app/src/components/advancedSettings/AdvancedSettings.tsx @@ -24,7 +24,7 @@ import { ListItemSecondaryAction, Switch, } from '@material-ui/core'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; +import useLocalStorage from 'react-use/esm/useLocalStorage'; export function AdvancedSettings() { const [value, setValue] = useLocalStorage<'on' | 'off'>( diff --git a/packages/core-app-api/src/app/AppManager.tsx b/packages/core-app-api/src/app/AppManager.tsx index c8cdfd7c23..3843fdfaee 100644 --- a/packages/core-app-api/src/app/AppManager.tsx +++ b/packages/core-app-api/src/app/AppManager.tsx @@ -22,7 +22,7 @@ import React, { useMemo, useRef, } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ApiProvider, AppThemeSelector, diff --git a/packages/core-app-api/src/app/AppRouter.test.tsx b/packages/core-app-api/src/app/AppRouter.test.tsx index 75f28a6bfe..9f3ab2ad89 100644 --- a/packages/core-app-api/src/app/AppRouter.test.tsx +++ b/packages/core-app-api/src/app/AppRouter.test.tsx @@ -28,7 +28,7 @@ import { MemoryRouter } from 'react-router-dom'; import { AppIdentityProxy } from '../apis/implementations/IdentityApi/AppIdentityProxy'; import { render, screen } from '@testing-library/react'; import { AppRouter } from './AppRouter'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { AppContextProvider } from './AppContext'; import { TestApiProvider } from '@backstage/test-utils'; import { ConfigReader } from '@backstage/config'; diff --git a/packages/core-app-api/src/app/AppThemeProvider.tsx b/packages/core-app-api/src/app/AppThemeProvider.tsx index 2ff8e493fe..b6fba540ec 100644 --- a/packages/core-app-api/src/app/AppThemeProvider.tsx +++ b/packages/core-app-api/src/app/AppThemeProvider.tsx @@ -16,7 +16,7 @@ import React, { useMemo, useEffect, useState, PropsWithChildren } from 'react'; import { useApi, appThemeApiRef, AppTheme } from '@backstage/core-plugin-api'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; // This tries to find the most accurate match, but also falls back to less // accurate results in order to avoid errors. diff --git a/packages/core-components/src/components/CopyTextButton/CopyTextButton.test.tsx b/packages/core-components/src/components/CopyTextButton/CopyTextButton.test.tsx index e6448ce5ee..89c20afd35 100644 --- a/packages/core-components/src/components/CopyTextButton/CopyTextButton.test.tsx +++ b/packages/core-components/src/components/CopyTextButton/CopyTextButton.test.tsx @@ -19,7 +19,7 @@ import { act, fireEvent } from '@testing-library/react'; import { renderInTestApp, TestApiProvider } from '@backstage/test-utils'; import { CopyTextButton } from './CopyTextButton'; import { errorApiRef } from '@backstage/core-plugin-api'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; jest.mock('popper.js', () => { const PopperJS = jest.requireActual('popper.js'); diff --git a/packages/core-components/src/components/CopyTextButton/CopyTextButton.tsx b/packages/core-components/src/components/CopyTextButton/CopyTextButton.tsx index 91b046354a..a82965916f 100644 --- a/packages/core-components/src/components/CopyTextButton/CopyTextButton.tsx +++ b/packages/core-components/src/components/CopyTextButton/CopyTextButton.tsx @@ -19,7 +19,7 @@ import IconButton from '@material-ui/core/IconButton'; import Tooltip from '@material-ui/core/Tooltip'; import CopyIcon from '@material-ui/icons/FileCopy'; import React, { MouseEventHandler, useEffect, useState } from 'react'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; import { coreComponentsTranslationRef } from '../../translation'; import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; diff --git a/packages/core-components/src/components/DismissableBanner/DismissableBanner.tsx b/packages/core-components/src/components/DismissableBanner/DismissableBanner.tsx index 649043fc21..8c18a1feee 100644 --- a/packages/core-components/src/components/DismissableBanner/DismissableBanner.tsx +++ b/packages/core-components/src/components/DismissableBanner/DismissableBanner.tsx @@ -16,7 +16,7 @@ import React, { ReactNode, useState, useEffect } from 'react'; import { useApi, storageApiRef } from '@backstage/core-plugin-api'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import classNames from 'classnames'; import { makeStyles } from '@material-ui/core/styles'; import Snackbar from '@material-ui/core/Snackbar'; diff --git a/packages/core-components/src/components/LogViewer/useLogViewerSelection.tsx b/packages/core-components/src/components/LogViewer/useLogViewerSelection.tsx index f73bf22d5e..97fee53c8a 100644 --- a/packages/core-components/src/components/LogViewer/useLogViewerSelection.tsx +++ b/packages/core-components/src/components/LogViewer/useLogViewerSelection.tsx @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { useEffect, useState } from 'react'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; import { AnsiLine } from './AnsiProcessor'; export function useLogViewerSelection(lines: AnsiLine[]) { diff --git a/packages/core-components/src/components/OAuthRequestDialog/OAuthRequestDialog.tsx b/packages/core-components/src/components/OAuthRequestDialog/OAuthRequestDialog.tsx index 2257b776d9..79366da310 100644 --- a/packages/core-components/src/components/OAuthRequestDialog/OAuthRequestDialog.tsx +++ b/packages/core-components/src/components/OAuthRequestDialog/OAuthRequestDialog.tsx @@ -22,7 +22,7 @@ import DialogTitle from '@material-ui/core/DialogTitle'; import List from '@material-ui/core/List'; import Button from '@material-ui/core/Button'; import React, { useMemo, useState } from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import LoginRequestListItem from './LoginRequestListItem'; import { useApi, diff --git a/packages/core-components/src/layout/SignInPage/guestProvider.tsx b/packages/core-components/src/layout/SignInPage/guestProvider.tsx index e4e02d74fe..3867caed5a 100644 --- a/packages/core-components/src/layout/SignInPage/guestProvider.tsx +++ b/packages/core-components/src/layout/SignInPage/guestProvider.tsx @@ -23,7 +23,7 @@ import { ProviderComponent, ProviderLoader, SignInProvider } from './types'; import { ProxiedSignInIdentity } from '../ProxiedSignInPage/ProxiedSignInIdentity'; import { discoveryApiRef, useApi } from '@backstage/core-plugin-api'; import { GuestUserIdentity } from './GuestUserIdentity'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; +import useLocalStorage from 'react-use/esm/useLocalStorage'; import { ResponseError } from '@backstage/errors'; import { coreComponentsTranslationRef } from '../../translation'; import { useTranslationRef } from '@backstage/core-plugin-api/alpha'; diff --git a/packages/dev-utils/src/devApp/SidebarThemeSwitcher.tsx b/packages/dev-utils/src/devApp/SidebarThemeSwitcher.tsx index 585fef2db4..8226f01f17 100644 --- a/packages/dev-utils/src/devApp/SidebarThemeSwitcher.tsx +++ b/packages/dev-utils/src/devApp/SidebarThemeSwitcher.tsx @@ -18,7 +18,7 @@ import { appThemeApiRef, useApi } from '@backstage/core-plugin-api'; import { ListItemIcon, ListItemText, Menu, MenuItem } from '@material-ui/core'; import AutoIcon from '@material-ui/icons/BrightnessAuto'; import React, { cloneElement, useCallback, useState } from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; type ThemeIconProps = { active?: boolean; diff --git a/plugins/adr/src/components/AdrReader/AdrReader.tsx b/plugins/adr/src/components/AdrReader/AdrReader.tsx index d0dd8b7444..a30cc38f19 100644 --- a/plugins/adr/src/components/AdrReader/AdrReader.tsx +++ b/plugins/adr/src/components/AdrReader/AdrReader.tsx @@ -29,7 +29,7 @@ import { useEntity } from '@backstage/plugin-catalog-react'; import { adrDecoratorFactories } from './decorators'; import { AdrContentDecorator } from './types'; import { adrApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; /** * Component to fetch and render an ADR. diff --git a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx index 450592c41c..a6adedb8ec 100644 --- a/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx +++ b/plugins/adr/src/components/EntityAdrContent/EntityAdrContent.tsx @@ -16,7 +16,7 @@ import React, { useEffect, useState } from 'react'; import { Link, useSearchParams } from 'react-router-dom'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import groupBy from 'lodash/groupBy'; diff --git a/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx b/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx index f63c0db86b..88fc04f8e3 100644 --- a/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx +++ b/plugins/airbrake/src/components/EntityAirbrakeWidget/EntityAirbrakeWidget.tsx @@ -26,7 +26,7 @@ import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { airbrakeApiRef } from '../../api'; import { MissingAnnotationEmptyState } from '@backstage/plugin-catalog-react'; import { AIRBRAKE_PROJECT_ID_ANNOTATION, useProjectId } from '../useProjectId'; diff --git a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx index 21846af529..ca59dc53fa 100644 --- a/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx +++ b/plugins/allure/src/components/AllureReportComponent/AllureReportComponent.tsx @@ -26,7 +26,7 @@ import { getAllureProjectId, } from '../annotationHelpers'; import { Progress } from '@backstage/core-components'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Entity } from '@backstage/catalog-model'; const AllureReport = (props: { entity: Entity }) => { diff --git a/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx b/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx index 2cd136c7fa..a6e0c52d08 100644 --- a/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx +++ b/plugins/apache-airflow/src/components/DagTableComponent/DagTableComponent.tsx @@ -33,7 +33,7 @@ import Typography from '@material-ui/core/Typography'; import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser'; import Alert from '@material-ui/lab/Alert'; import React, { useEffect, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { apacheAirflowApiRef } from '../../api'; import { Dag } from '../../api/types'; import { ScheduleIntervalLabel } from '../ScheduleIntervalLabel'; diff --git a/plugins/apache-airflow/src/components/LatestDagRunsStatus/LatestDagRunsStatus.tsx b/plugins/apache-airflow/src/components/LatestDagRunsStatus/LatestDagRunsStatus.tsx index d243f48e8a..d1ef273987 100644 --- a/plugins/apache-airflow/src/components/LatestDagRunsStatus/LatestDagRunsStatus.tsx +++ b/plugins/apache-airflow/src/components/LatestDagRunsStatus/LatestDagRunsStatus.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; import { apacheAirflowApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { DagRun } from '../../api/types/Dags'; import { useApi } from '@backstage/core-plugin-api'; import Box from '@material-ui/core/Box'; diff --git a/plugins/apache-airflow/src/components/StatusComponent/StatusComponent.tsx b/plugins/apache-airflow/src/components/StatusComponent/StatusComponent.tsx index 4d3f3258c8..e8f6c1d0e0 100644 --- a/plugins/apache-airflow/src/components/StatusComponent/StatusComponent.tsx +++ b/plugins/apache-airflow/src/components/StatusComponent/StatusComponent.tsx @@ -22,7 +22,7 @@ import { import { useApi } from '@backstage/core-plugin-api'; import Alert from '@material-ui/lab/Alert'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { apacheAirflowApiRef } from '../../api'; import { InstanceStatus } from '../../api/types'; diff --git a/plugins/apache-airflow/src/components/VersionComponent/VersionComponent.tsx b/plugins/apache-airflow/src/components/VersionComponent/VersionComponent.tsx index c82f0ee43e..e0e9253565 100644 --- a/plugins/apache-airflow/src/components/VersionComponent/VersionComponent.tsx +++ b/plugins/apache-airflow/src/components/VersionComponent/VersionComponent.tsx @@ -22,7 +22,7 @@ import { import { useApi } from '@backstage/core-plugin-api'; import Alert from '@material-ui/lab/Alert'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { apacheAirflowApiRef } from '../../api'; import { InstanceVersion } from '../../api/types'; diff --git a/plugins/azure-devops/src/hooks/useAllTeams.ts b/plugins/azure-devops/src/hooks/useAllTeams.ts index 03885e4999..a8db1f091c 100644 --- a/plugins/azure-devops/src/hooks/useAllTeams.ts +++ b/plugins/azure-devops/src/hooks/useAllTeams.ts @@ -17,7 +17,7 @@ import { Team } from '@backstage/plugin-azure-devops-common'; import { azureDevOpsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export function useAllTeams(): { teams?: Team[]; diff --git a/plugins/azure-devops/src/hooks/useBuildRuns.ts b/plugins/azure-devops/src/hooks/useBuildRuns.ts index 21f4d60430..ac908d34df 100644 --- a/plugins/azure-devops/src/hooks/useBuildRuns.ts +++ b/plugins/azure-devops/src/hooks/useBuildRuns.ts @@ -22,7 +22,7 @@ import { import { azureDevOpsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { getAnnotationValuesFromEntity } from '../utils'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; diff --git a/plugins/azure-devops/src/hooks/useDashboardPullRequests.ts b/plugins/azure-devops/src/hooks/useDashboardPullRequests.ts index 95c97b002e..8ace9663fa 100644 --- a/plugins/azure-devops/src/hooks/useDashboardPullRequests.ts +++ b/plugins/azure-devops/src/hooks/useDashboardPullRequests.ts @@ -15,8 +15,8 @@ */ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; -import useInterval from 'react-use/lib/useInterval'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; +import useInterval from 'react-use/esm/useInterval'; import { DashboardPullRequest } from '@backstage/plugin-azure-devops-common'; import { azureDevOpsApiRef } from '../api'; diff --git a/plugins/azure-devops/src/hooks/useGitTags.ts b/plugins/azure-devops/src/hooks/useGitTags.ts index 3cd65dad92..a7666a5b9c 100644 --- a/plugins/azure-devops/src/hooks/useGitTags.ts +++ b/plugins/azure-devops/src/hooks/useGitTags.ts @@ -19,7 +19,7 @@ import { GitTag } from '@backstage/plugin-azure-devops-common'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { azureDevOpsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { getAnnotationValuesFromEntity } from '../utils'; export function useGitTags(entity: Entity): { diff --git a/plugins/azure-devops/src/hooks/usePullRequests.ts b/plugins/azure-devops/src/hooks/usePullRequests.ts index 7347f66156..636e7d9562 100644 --- a/plugins/azure-devops/src/hooks/usePullRequests.ts +++ b/plugins/azure-devops/src/hooks/usePullRequests.ts @@ -24,7 +24,7 @@ import { import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { azureDevOpsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { getAnnotationValuesFromEntity } from '../utils'; export function usePullRequests( diff --git a/plugins/azure-devops/src/hooks/useReadme.ts b/plugins/azure-devops/src/hooks/useReadme.ts index cfc7f04bf4..e8e824aa15 100644 --- a/plugins/azure-devops/src/hooks/useReadme.ts +++ b/plugins/azure-devops/src/hooks/useReadme.ts @@ -19,7 +19,7 @@ import { Readme } from '@backstage/plugin-azure-devops-common'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { azureDevOpsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { getAnnotationValuesFromEntity } from '../utils'; export function useReadme(entity: Entity): { diff --git a/plugins/azure-devops/src/hooks/useUserEmail.ts b/plugins/azure-devops/src/hooks/useUserEmail.ts index 34f39f4db9..d94db5f09b 100644 --- a/plugins/azure-devops/src/hooks/useUserEmail.ts +++ b/plugins/azure-devops/src/hooks/useUserEmail.ts @@ -15,7 +15,7 @@ */ import { identityApiRef, useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export function useUserEmail(): string | undefined { const identityApi = useApi(identityApiRef); diff --git a/plugins/azure-devops/src/hooks/useUserTeamIds.ts b/plugins/azure-devops/src/hooks/useUserTeamIds.ts index f7246fa212..82cdaca6ac 100644 --- a/plugins/azure-devops/src/hooks/useUserTeamIds.ts +++ b/plugins/azure-devops/src/hooks/useUserTeamIds.ts @@ -16,7 +16,7 @@ import { azureDevOpsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export function useUserTeamIds(userId: string | undefined): { teamIds?: string[]; diff --git a/plugins/azure-sites/src/hooks/useSites.ts b/plugins/azure-sites/src/hooks/useSites.ts index fb3215c008..e48377ba4f 100644 --- a/plugins/azure-sites/src/hooks/useSites.ts +++ b/plugins/azure-sites/src/hooks/useSites.ts @@ -14,8 +14,8 @@ * limitations under the License. */ -import useInterval from 'react-use/lib/useInterval'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useInterval from 'react-use/esm/useInterval'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { useApi, errorApiRef } from '@backstage/core-plugin-api'; import { AzureSiteListResponse } from '@backstage/plugin-azure-sites-common'; import { azureSiteApiRef } from '../api'; diff --git a/plugins/badges/src/components/EntityBadgesDialog.tsx b/plugins/badges/src/components/EntityBadgesDialog.tsx index 61914bb756..84bcb69f5d 100644 --- a/plugins/badges/src/components/EntityBadgesDialog.tsx +++ b/plugins/badges/src/components/EntityBadgesDialog.tsx @@ -25,7 +25,7 @@ import DialogTitle from '@material-ui/core/DialogTitle'; import useMediaQuery from '@material-ui/core/useMediaQuery'; import { useTheme } from '@material-ui/core/styles'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { badgesApiRef } from '../api'; import { diff --git a/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx b/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx index 3dc5521275..b4e3d1eb4d 100644 --- a/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx +++ b/plugins/bazaar/src/components/BazaarOverviewCard/BazaarOverviewCard.tsx @@ -16,7 +16,7 @@ import React, { useEffect, useState } from 'react'; import { ProjectPreview } from '../ProjectPreview/ProjectPreview'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { useApi, useRouteRef } from '@backstage/core-plugin-api'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; diff --git a/plugins/bazaar/src/components/EntityBazaarInfoCard/EntityBazaarInfoCard.tsx b/plugins/bazaar/src/components/EntityBazaarInfoCard/EntityBazaarInfoCard.tsx index c89e2ec34e..16dfa02544 100644 --- a/plugins/bazaar/src/components/EntityBazaarInfoCard/EntityBazaarInfoCard.tsx +++ b/plugins/bazaar/src/components/EntityBazaarInfoCard/EntityBazaarInfoCard.tsx @@ -15,7 +15,7 @@ */ import React, { useState, useEffect } from 'react'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { useApi } from '@backstage/core-plugin-api'; import { stringifyEntityRef } from '@backstage/catalog-model'; import { useEntity } from '@backstage/plugin-catalog-react'; diff --git a/plugins/bazaar/src/components/EntityBazaarInfoContent/EntityBazaarInfoContent.tsx b/plugins/bazaar/src/components/EntityBazaarInfoContent/EntityBazaarInfoContent.tsx index 250a4a489d..a6fcbe1581 100644 --- a/plugins/bazaar/src/components/EntityBazaarInfoContent/EntityBazaarInfoContent.tsx +++ b/plugins/bazaar/src/components/EntityBazaarInfoContent/EntityBazaarInfoContent.tsx @@ -35,7 +35,7 @@ import { useApi, identityApiRef } from '@backstage/core-plugin-api'; import { BazaarProject, Member } from '../../types'; import { bazaarApiRef } from '../../api'; import Alert from '@material-ui/lab/Alert'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import ExitToAppIcon from '@material-ui/icons/ExitToApp'; import { parseEntityRef } from '@backstage/catalog-model'; import { ConfirmationDialog } from '../ConfirmationDialog'; diff --git a/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx b/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx index e522b6b8c4..e7912bedd3 100644 --- a/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx +++ b/plugins/bazaar/src/components/HomePageBazaarInfoCard/HomePageBazaarInfoCard.tsx @@ -44,7 +44,7 @@ import { import { Member, BazaarProject } from '../../types'; import { bazaarApiRef } from '../../api'; import Alert from '@material-ui/lab/Alert'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react'; import { diff --git a/plugins/bazaar/src/components/SortView/SortView.tsx b/plugins/bazaar/src/components/SortView/SortView.tsx index 427f3c1ff1..1e8526936e 100644 --- a/plugins/bazaar/src/components/SortView/SortView.tsx +++ b/plugins/bazaar/src/components/SortView/SortView.tsx @@ -20,7 +20,7 @@ import { AddProjectDialog } from '../AddProjectDialog'; import { ProjectPreview } from '../ProjectPreview/ProjectPreview'; import Button from '@material-ui/core/Button'; import { makeStyles } from '@material-ui/core/styles'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; diff --git a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx index f8a7f7ece4..2450262d77 100644 --- a/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx +++ b/plugins/bitrise/src/components/BitriseBuildsComponent/BitriseBuildsComponent.tsx @@ -21,7 +21,7 @@ import { } from '@backstage/plugin-catalog-react'; import React, { useState } from 'react'; import { useBitriseBuildWorkflows } from '../../hooks/useBitriseBuildWorkflows'; -import { AsyncState } from 'react-use/lib/useAsync'; +import { AsyncState } from 'react-use/esm/useAsync'; import { BitriseBuildsTable } from '../BitriseBuildsTableComponent'; import { Item, Select } from '../Select'; import { Content, ContentHeader, Page } from '@backstage/core-components'; diff --git a/plugins/bitrise/src/components/useBitriseArtifactDetails.ts b/plugins/bitrise/src/components/useBitriseArtifactDetails.ts index e00c8cc8e7..87ee442b87 100644 --- a/plugins/bitrise/src/components/useBitriseArtifactDetails.ts +++ b/plugins/bitrise/src/components/useBitriseArtifactDetails.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { BitriseBuildArtifactDetails } from '../api/bitriseApi.model'; import { bitriseApiRef } from '../plugin'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/bitrise/src/components/useBitriseArtifacts.ts b/plugins/bitrise/src/components/useBitriseArtifacts.ts index 0f7423c921..14e26b40cb 100644 --- a/plugins/bitrise/src/components/useBitriseArtifacts.ts +++ b/plugins/bitrise/src/components/useBitriseArtifacts.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { BitriseBuildArtifact } from '../api/bitriseApi.model'; import { bitriseApiRef } from '../plugin'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/bitrise/src/hooks/useBitriseBuildWorkflows.ts b/plugins/bitrise/src/hooks/useBitriseBuildWorkflows.ts index 122968d6ea..3278b14199 100644 --- a/plugins/bitrise/src/hooks/useBitriseBuildWorkflows.ts +++ b/plugins/bitrise/src/hooks/useBitriseBuildWorkflows.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; import { bitriseApiRef } from '../plugin'; import { BitriseApp } from '../api/bitriseApi.model'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/bitrise/src/hooks/useBitriseBuilds.ts b/plugins/bitrise/src/hooks/useBitriseBuilds.ts index 13869c27a0..e238c9676e 100644 --- a/plugins/bitrise/src/hooks/useBitriseBuilds.ts +++ b/plugins/bitrise/src/hooks/useBitriseBuilds.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; import { BitriseApp, BitriseBuildListResponse, diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx b/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx index 42c456888a..1a38e4e31f 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/SelectedKindsFilter.tsx @@ -26,7 +26,7 @@ import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import Autocomplete from '@material-ui/lab/Autocomplete'; import React, { useCallback, useEffect, useMemo } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; const useStyles = makeStyles( { diff --git a/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.ts b/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.ts index aa6da6824d..6e47dedc50 100644 --- a/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.ts +++ b/plugins/catalog-graph/src/components/CatalogGraphPage/useCatalogGraphPage.ts @@ -28,7 +28,7 @@ import { useState, } from 'react'; import { useLocation } from 'react-router-dom'; -import usePrevious from 'react-use/lib/usePrevious'; +import usePrevious from 'react-use/esm/usePrevious'; import { Direction } from '../EntityRelationsGraph'; export type CatalogGraphPageValue = { diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts index 4302957d5b..d2a5138ccb 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityRelationNodesAndEdges.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { MouseEvent, useState } from 'react'; -import useDebounce from 'react-use/lib/useDebounce'; +import useDebounce from 'react-use/esm/useDebounce'; import { RelationPairs, ALL_RELATION_PAIRS } from './relations'; import { EntityEdge, EntityNode } from './types'; import { useEntityRelationGraph } from './useEntityRelationGraph'; diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.ts b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.ts index 5c33f8053d..c55becdd49 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.ts +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/useEntityStore.ts @@ -17,7 +17,7 @@ import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import { Dispatch, useCallback, useRef, useState } from 'react'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; // TODO: This is a good use case for a graphql API, once it is available in the // future. diff --git a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx index 580f21b16f..2ca230372b 100644 --- a/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx +++ b/plugins/catalog-import/src/components/StepPrepareCreatePullRequest/StepPrepareCreatePullRequest.tsx @@ -28,7 +28,7 @@ import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import React, { useCallback, useEffect, useState } from 'react'; import { UnpackNestedValue, UseFormReturn } from 'react-hook-form'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import YAML from 'yaml'; import { AnalyzeResult, catalogImportApiRef } from '../../api'; import { useCatalogFilename } from '../../hooks'; diff --git a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx index fe3296a8a0..5e5bedaceb 100644 --- a/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx +++ b/plugins/catalog-react/src/components/EntityAutocompletePicker/EntityAutocompletePicker.tsx @@ -19,7 +19,7 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import { Autocomplete } from '@material-ui/lab'; import React, { useEffect, useMemo, useState } from 'react'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../api'; import { EntityAutocompletePickerOption } from './EntityAutocompletePickerOption'; import { EntityAutocompletePickerInput } from './EntityAutocompletePickerInput'; diff --git a/plugins/catalog-react/src/components/EntityKindPicker/kindFilterUtils.ts b/plugins/catalog-react/src/components/EntityKindPicker/kindFilterUtils.ts index aed4c41295..b3e27c85d9 100644 --- a/plugins/catalog-react/src/components/EntityKindPicker/kindFilterUtils.ts +++ b/plugins/catalog-react/src/components/EntityKindPicker/kindFilterUtils.ts @@ -15,7 +15,7 @@ */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../api'; /** diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.ts b/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.ts index b9af10b697..33b96d2494 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.ts +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/useFacetsEntities.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { catalogApiRef } from '../../api'; import { useState } from 'react'; import { Entity, parseEntityRef } from '@backstage/catalog-model'; diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/useFetchEntities.ts b/plugins/catalog-react/src/components/EntityOwnerPicker/useFetchEntities.ts index 01cef24fd6..b719d3cf8d 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/useFetchEntities.ts +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/useFetchEntities.ts @@ -19,7 +19,7 @@ import { useQueryEntities } from './useQueryEntities'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; import { catalogApiRef } from '../../api'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { useMountEffect } from '@react-hookz/web'; export function useFetchEntities({ diff --git a/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.ts b/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.ts index 186cfa5566..48fa02b7ba 100644 --- a/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.ts +++ b/plugins/catalog-react/src/components/EntityOwnerPicker/useQueryEntities.ts @@ -15,7 +15,7 @@ */ import { useApi } from '@backstage/core-plugin-api'; import { catalogApiRef } from '../../api'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { Entity } from '@backstage/catalog-model'; type QueryEntitiesResponse = { diff --git a/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx b/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx index 077274a6e9..41841e941f 100644 --- a/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx +++ b/plugins/catalog-react/src/components/EntityPeekAheadPopover/EntityPeekAheadPopover.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { catalogApiRef } from '../../api'; import React, { PropsWithChildren, useEffect, useMemo, useState } from 'react'; import HoverPopover from 'material-ui-popup-state/HoverPopover'; diff --git a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx index f1278c6f60..91e411c562 100644 --- a/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx +++ b/plugins/catalog-react/src/components/EntitySearchBar/EntitySearchBar.tsx @@ -25,7 +25,7 @@ import { import Clear from '@material-ui/icons/Clear'; import Search from '@material-ui/icons/Search'; import React, { useState } from 'react'; -import useDebounce from 'react-use/lib/useDebounce'; +import useDebounce from 'react-use/esm/useDebounce'; import { useEntityList } from '../../hooks/useEntityListProvider'; import { EntityTextFilter } from '../../filters'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx index 7148a051e8..c68705a992 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/AncestryPage.tsx @@ -31,7 +31,7 @@ import { Box, DialogContentText, makeStyles } from '@material-ui/core'; import classNames from 'classnames'; import React, { useLayoutEffect, useRef, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../../api'; import { humanizeEntityRef } from '../../EntityRefLink'; import { entityRouteRef } from '../../../routes'; diff --git a/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx b/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx index 8dd62359f0..76c86765e0 100644 --- a/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx +++ b/plugins/catalog-react/src/components/InspectEntityDialog/components/ColocatedPage.tsx @@ -30,7 +30,7 @@ import { } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../../api'; import { EntityRefLink } from '../../EntityRefLink'; import { KeyValueListItem, ListItemText } from './common'; diff --git a/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.ts b/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.ts index 28e4863e8a..bc333ed8be 100644 --- a/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.ts +++ b/plugins/catalog-react/src/components/UnregisterEntityDialog/useUnregisterEntityDialogState.ts @@ -22,7 +22,7 @@ import { } from '@backstage/catalog-model'; import { catalogApiRef } from '../../api'; import { useCallback } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; /** diff --git a/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.ts b/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.ts index 6916d914f7..cecd0e4db7 100644 --- a/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.ts +++ b/plugins/catalog-react/src/components/UserListPicker/useAllEntitiesCount.ts @@ -17,7 +17,7 @@ import { QueryEntitiesInitialRequest } from '@backstage/catalog-client'; import { useApi } from '@backstage/core-plugin-api'; import { compact, isEqual } from 'lodash'; import { useMemo, useRef } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../api'; import { useEntityList } from '../../hooks'; import { reduceCatalogFilters } from '../../utils'; diff --git a/plugins/catalog-react/src/components/UserListPicker/useOwnedEntitiesCount.ts b/plugins/catalog-react/src/components/UserListPicker/useOwnedEntitiesCount.ts index 833eeb898f..10481e80a8 100644 --- a/plugins/catalog-react/src/components/UserListPicker/useOwnedEntitiesCount.ts +++ b/plugins/catalog-react/src/components/UserListPicker/useOwnedEntitiesCount.ts @@ -17,13 +17,13 @@ import { identityApiRef, useApi } from '@backstage/core-plugin-api'; import { compact, intersection } from 'lodash'; import { useMemo } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../api'; import { EntityOwnerFilter, EntityUserFilter } from '../../filters'; import { useEntityList } from '../../hooks'; import { CatalogFilters, reduceCatalogFilters } from '../../utils'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; -import useDeepCompareEffect from 'react-use/lib/useDeepCompareEffect'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; +import useDeepCompareEffect from 'react-use/esm/useDeepCompareEffect'; export function useOwnedEntitiesCount() { const identityApi = useApi(identityApiRef); diff --git a/plugins/catalog-react/src/components/UserListPicker/useStarredEntitiesCount.ts b/plugins/catalog-react/src/components/UserListPicker/useStarredEntitiesCount.ts index 66c0dd97e5..082c683642 100644 --- a/plugins/catalog-react/src/components/UserListPicker/useStarredEntitiesCount.ts +++ b/plugins/catalog-react/src/components/UserListPicker/useStarredEntitiesCount.ts @@ -19,7 +19,7 @@ import { parseEntityRef, stringifyEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; import { compact, isEqual } from 'lodash'; import { useMemo, useRef } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../../api'; import { EntityUserFilter } from '../../filters'; import { useEntityList, useStarredEntities } from '../../hooks'; diff --git a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx index c81a399040..da2a37381c 100644 --- a/plugins/catalog-react/src/hooks/useEntityListProvider.tsx +++ b/plugins/catalog-react/src/hooks/useEntityListProvider.tsx @@ -26,9 +26,9 @@ import React, { useState, } from 'react'; import { useLocation } from 'react-router-dom'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; -import useDebounce from 'react-use/lib/useDebounce'; -import useMountedState from 'react-use/lib/useMountedState'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; +import useDebounce from 'react-use/esm/useDebounce'; +import useMountedState from 'react-use/esm/useMountedState'; import { catalogApiRef } from '../api'; import { EntityErrorFilter, diff --git a/plugins/catalog-react/src/hooks/useEntityOwnership.ts b/plugins/catalog-react/src/hooks/useEntityOwnership.ts index fdd73434ec..5b93456576 100644 --- a/plugins/catalog-react/src/hooks/useEntityOwnership.ts +++ b/plugins/catalog-react/src/hooks/useEntityOwnership.ts @@ -21,7 +21,7 @@ import { } from '@backstage/catalog-model'; import { identityApiRef, useApi } from '@backstage/core-plugin-api'; import { useMemo } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { getEntityRelations } from '../utils/getEntityRelations'; /** diff --git a/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx b/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx index 464531a4d9..3c8f1ef838 100644 --- a/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx +++ b/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx @@ -15,7 +15,7 @@ */ import { useEffect, useMemo, useRef, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import isEqual from 'lodash/isEqual'; import sortBy from 'lodash/sortBy'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/catalog-react/src/hooks/useRelatedEntities.ts b/plugins/catalog-react/src/hooks/useRelatedEntities.ts index 7ec0a13d53..485df9c301 100644 --- a/plugins/catalog-react/src/hooks/useRelatedEntities.ts +++ b/plugins/catalog-react/src/hooks/useRelatedEntities.ts @@ -16,7 +16,7 @@ import { Entity, parseEntityRef } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef } from '../api'; /** diff --git a/plugins/catalog-react/src/hooks/useStarredEntities.ts b/plugins/catalog-react/src/hooks/useStarredEntities.ts index 7e63aed10f..6b8623afe4 100644 --- a/plugins/catalog-react/src/hooks/useStarredEntities.ts +++ b/plugins/catalog-react/src/hooks/useStarredEntities.ts @@ -21,7 +21,7 @@ import { } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; import { useCallback, useMemo } from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import { starredEntitiesApiRef } from '../apis'; function getEntityRef( diff --git a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx index ca5ca942c7..5d1800cb29 100644 --- a/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/FailedEntities.tsx @@ -32,7 +32,7 @@ import { alertApiRef, useApi } from '@backstage/core-plugin-api'; import { UnprocessedEntity } from '../types'; import { EntityDialog } from './EntityDialog'; import { catalogUnprocessedEntitiesApiRef } from '../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import DeleteIcon from '@material-ui/icons/Delete'; const useStyles = makeStyles((theme: Theme) => ({ diff --git a/plugins/catalog-unprocessed-entities/src/components/PendingEntities.tsx b/plugins/catalog-unprocessed-entities/src/components/PendingEntities.tsx index 6f38a68816..36d7281c8d 100644 --- a/plugins/catalog-unprocessed-entities/src/components/PendingEntities.tsx +++ b/plugins/catalog-unprocessed-entities/src/components/PendingEntities.tsx @@ -28,7 +28,7 @@ import { UnprocessedEntity } from '../types'; import { EntityDialog } from './EntityDialog'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogUnprocessedEntitiesApiRef } from '../api'; const useStyles = makeStyles((theme: Theme) => ({ diff --git a/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts b/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts index c014f4c815..16a381319b 100644 --- a/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts +++ b/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts @@ -26,7 +26,7 @@ import { } from '@backstage/plugin-catalog-react'; import { useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; export const useEntityFromUrl = (): EntityLoadingStatus => { const { kind, namespace, name } = useRouteRefParams(entityRouteRef); diff --git a/plugins/catalog/src/components/CatalogKindHeader/kindFilterUtils.ts b/plugins/catalog/src/components/CatalogKindHeader/kindFilterUtils.ts index 4f74d10a6c..7ac08ae0c8 100644 --- a/plugins/catalog/src/components/CatalogKindHeader/kindFilterUtils.ts +++ b/plugins/catalog/src/components/CatalogKindHeader/kindFilterUtils.ts @@ -16,7 +16,7 @@ import { useApi } from '@backstage/core-plugin-api'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; /** * Fetch and return all availible kinds. diff --git a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx index 7c94887a37..a173773e35 100644 --- a/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx +++ b/plugins/catalog/src/components/EntityContextMenu/EntityContextMenu.tsx @@ -32,7 +32,7 @@ import { useEntityPermission } from '@backstage/plugin-catalog-react/alpha'; import { catalogEntityDeletePermission } from '@backstage/plugin-catalog-common/alpha'; import { UnregisterEntity, UnregisterEntityOptions } from './UnregisterEntity'; import { useApi, alertApiRef } from '@backstage/core-plugin-api'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; /** @public */ export type EntityContextMenuClassKey = 'button'; diff --git a/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx b/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx index 57736dba40..fffeaa781a 100644 --- a/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx +++ b/plugins/catalog/src/components/EntityProcessingErrorsPanel/EntityProcessingErrorsPanel.tsx @@ -29,7 +29,7 @@ import { ENTITY_STATUS_CATALOG_PROCESSING_TYPE, } from '@backstage/catalog-client'; import { useApi, ApiHolder } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { SerializedError } from '@backstage/errors'; const errorFilter = (i: EntityStatusItem) => diff --git a/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx b/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx index f52fdae39d..13542a32b4 100644 --- a/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx +++ b/plugins/catalog/src/components/EntityRelationWarning/EntityRelationWarning.tsx @@ -22,7 +22,7 @@ import { } from '@backstage/plugin-catalog-react'; import Alert from '@material-ui/lab/Alert'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import Box from '@material-ui/core/Box'; import { ResponseErrorPanel } from '@backstage/core-components'; import { useApi, ApiHolder } from '@backstage/core-plugin-api'; diff --git a/plugins/catalog/src/components/EntitySwitch/EntitySwitch.tsx b/plugins/catalog/src/components/EntitySwitch/EntitySwitch.tsx index 9eab743308..6a07bec4da 100644 --- a/plugins/catalog/src/components/EntitySwitch/EntitySwitch.tsx +++ b/plugins/catalog/src/components/EntitySwitch/EntitySwitch.tsx @@ -23,7 +23,7 @@ import { useElementFilter, ApiHolder, } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; const ENTITY_SWITCH_KEY = 'core.backstage.entitySwitch'; diff --git a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx index f141e3b06b..22466b1464 100644 --- a/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx +++ b/plugins/catalog/src/components/SystemDiagramCard/SystemDiagramCard.tsx @@ -34,7 +34,7 @@ import Typography from '@material-ui/core/Typography'; import { makeStyles, useTheme } from '@material-ui/core/styles'; import ZoomOutMap from '@material-ui/icons/ZoomOutMap'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { DependencyGraph, diff --git a/plugins/cicd-statistics/src/components/progress.tsx b/plugins/cicd-statistics/src/components/progress.tsx index 6ea8e6497d..3045bb5eb1 100644 --- a/plugins/cicd-statistics/src/components/progress.tsx +++ b/plugins/cicd-statistics/src/components/progress.tsx @@ -15,7 +15,7 @@ */ import React, { CSSProperties, DependencyList } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Box, LinearProgress } from '@material-ui/core'; import Timeline from '@material-ui/lab/Timeline'; import TimelineItem from '@material-ui/lab/TimelineItem'; diff --git a/plugins/circleci/src/state/useBuildWithSteps.ts b/plugins/circleci/src/state/useBuildWithSteps.ts index 4ba189f9d2..14c40dd723 100644 --- a/plugins/circleci/src/state/useBuildWithSteps.ts +++ b/plugins/circleci/src/state/useBuildWithSteps.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useCallback, useMemo } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { circleCIApiRef } from '../api'; import { useAsyncPolling } from './useAsyncPolling'; import { useProjectSlugFromEntity, mapVcsType } from './useBuilds'; diff --git a/plugins/circleci/src/state/useBuilds.ts b/plugins/circleci/src/state/useBuilds.ts index 1e199cfd34..22e64ae913 100644 --- a/plugins/circleci/src/state/useBuilds.ts +++ b/plugins/circleci/src/state/useBuilds.ts @@ -18,7 +18,7 @@ import { useEntity } from '@backstage/plugin-catalog-react'; import { BuildSummary, GitType } from 'circleci-api'; import { getOr } from 'lodash/fp'; import { useCallback, useEffect, useState } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { circleCIApiRef } from '../api'; import type { CITableBuildInfo } from '../components/BuildsPage/lib/CITable'; import { CIRCLECI_ANNOTATION } from '../constants'; diff --git a/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts b/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts index 7b7ee2f407..a315463c7e 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts +++ b/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ActionsListWorkflowRunsForRepoResponseData } from '../../api/types'; export const useWorkflowRunJobs = (jobsUrl?: string) => { diff --git a/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts b/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts index abc146fb6c..d148de49be 100644 --- a/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts +++ b/plugins/cloudbuild/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { cloudbuildApiRef } from '../../api'; import { useApi, useRouteRefParams } from '@backstage/core-plugin-api'; import { buildRouteRef } from '../../routes'; diff --git a/plugins/cloudbuild/src/components/useProjectName.ts b/plugins/cloudbuild/src/components/useProjectName.ts index ae6ae07b56..407ee41ac6 100644 --- a/plugins/cloudbuild/src/components/useProjectName.ts +++ b/plugins/cloudbuild/src/components/useProjectName.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Entity } from '@backstage/catalog-model'; /** @public */ diff --git a/plugins/cloudbuild/src/components/useWorkflowRuns.ts b/plugins/cloudbuild/src/components/useWorkflowRuns.ts index 7e3e148dd1..0a4525a6f7 100644 --- a/plugins/cloudbuild/src/components/useWorkflowRuns.ts +++ b/plugins/cloudbuild/src/components/useWorkflowRuns.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useState } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { cloudbuildApiRef } from '../api/CloudbuildApi'; import { ActionsListWorkflowRunsForRepoResponseData, diff --git a/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx b/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx index 4bf45c4b1d..d53303bc95 100644 --- a/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx +++ b/plugins/code-climate/src/components/CodeClimateCardContents/CodeClimateCardContents.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { codeClimateApiRef } from '../../api'; import { CodeClimateTable } from '../CodeClimateTable'; import { CODECLIMATE_REPO_ID_ANNOTATION } from '../../plugin'; diff --git a/plugins/code-coverage/src/components/CoverageHistoryChart/CoverageHistoryChart.tsx b/plugins/code-coverage/src/components/CoverageHistoryChart/CoverageHistoryChart.tsx index 63784b6b3f..16498dae20 100644 --- a/plugins/code-coverage/src/components/CoverageHistoryChart/CoverageHistoryChart.tsx +++ b/plugins/code-coverage/src/components/CoverageHistoryChart/CoverageHistoryChart.tsx @@ -27,7 +27,7 @@ import TrendingUpIcon from '@material-ui/icons/TrendingUp'; import Alert from '@material-ui/lab/Alert'; import { ClassNameMap } from '@material-ui/styles/withStyles'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { CartesianGrid, Legend, diff --git a/plugins/code-coverage/src/components/FileExplorer/FileContent.tsx b/plugins/code-coverage/src/components/FileExplorer/FileContent.tsx index b401e66334..03ae99e370 100644 --- a/plugins/code-coverage/src/components/FileExplorer/FileContent.tsx +++ b/plugins/code-coverage/src/components/FileExplorer/FileContent.tsx @@ -19,7 +19,7 @@ import Paper from '@material-ui/core/Paper'; import { makeStyles } from '@material-ui/core/styles'; import Alert from '@material-ui/lab/Alert'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { codeCoverageApiRef } from '../../api'; import { FileEntry } from '../../types'; import { CodeRow } from './CodeRow'; diff --git a/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx b/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx index 4fb20dbd52..4192e66bed 100644 --- a/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx +++ b/plugins/code-coverage/src/components/FileExplorer/FileExplorer.tsx @@ -22,7 +22,7 @@ import FolderIcon from '@material-ui/icons/Folder'; import FileOutlinedIcon from '@material-ui/icons/InsertDriveFileOutlined'; import Alert from '@material-ui/lab/Alert'; import React, { Fragment, useEffect, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { codeCoverageApiRef } from '../../api'; import { FileEntry } from '../../types'; import { FileContent } from './FileContent'; diff --git a/plugins/codescene/src/components/CodeSceneEntityKPICard/CodeSceneEntityKPICard.tsx b/plugins/codescene/src/components/CodeSceneEntityKPICard/CodeSceneEntityKPICard.tsx index 826d726d1f..625711353f 100644 --- a/plugins/codescene/src/components/CodeSceneEntityKPICard/CodeSceneEntityKPICard.tsx +++ b/plugins/codescene/src/components/CodeSceneEntityKPICard/CodeSceneEntityKPICard.tsx @@ -18,7 +18,7 @@ import { configApiRef, useApi, useApp } from '@backstage/core-plugin-api'; import Alert from '@material-ui/lab/Alert'; import React from 'react'; import { useEntity } from '@backstage/plugin-catalog-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { codesceneApiRef } from '../../api/api'; import { Analysis } from '../../api/types'; import { CodeHealthKpisCard } from '../CodeHealthKpisCard/CodeHealthKpisCard'; diff --git a/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.tsx b/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.tsx index b291002ae4..298248171e 100644 --- a/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.tsx +++ b/plugins/codescene/src/components/ProjectsComponent/ProjectsComponent.tsx @@ -22,7 +22,7 @@ import { } from '@backstage/core-components'; import { useRouteRef, useApi } from '@backstage/core-plugin-api'; import Alert from '@material-ui/lab/Alert'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Link as RouterLink } from 'react-router-dom'; import { rootRouteRef } from '../../routes'; import { codesceneApiRef } from '../../api/api'; diff --git a/plugins/codescene/src/hooks/useAnalyses.ts b/plugins/codescene/src/hooks/useAnalyses.ts index 9326b27641..c0c44bf1d4 100644 --- a/plugins/codescene/src/hooks/useAnalyses.ts +++ b/plugins/codescene/src/hooks/useAnalyses.ts @@ -17,7 +17,7 @@ import { Analysis } from '../api/types'; import { codesceneApiRef } from '../api/api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export const useAnalyses = (projectId: number) => { const codesceneApi = useApi(codesceneApiRef); diff --git a/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx b/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx index 5fb39c6ae3..a8983a113c 100644 --- a/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx +++ b/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React, { useMemo } from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import { configSchemaApiRef } from '../../api'; import { SchemaViewer } from '../SchemaViewer'; import { Typography } from '@material-ui/core'; diff --git a/plugins/cost-insights/src/components/CopyUrlToClipboard/CopyUrlToClipboard.tsx b/plugins/cost-insights/src/components/CopyUrlToClipboard/CopyUrlToClipboard.tsx index d67a2814f1..52873db314 100644 --- a/plugins/cost-insights/src/components/CopyUrlToClipboard/CopyUrlToClipboard.tsx +++ b/plugins/cost-insights/src/components/CopyUrlToClipboard/CopyUrlToClipboard.tsx @@ -16,7 +16,7 @@ import React, { useEffect, useState } from 'react'; import { useLocation } from 'react-router-dom'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; import Tooltip from '@material-ui/core/Tooltip'; import IconButton from '@material-ui/core/IconButton'; import AssignmentOutlinedIcon from '@material-ui/icons/AssignmentOutlined'; diff --git a/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx b/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx index ae885d9277..2a6196e48c 100644 --- a/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx +++ b/plugins/cost-insights/src/components/CostInsightsHeader/CostInsightsHeader.tsx @@ -16,7 +16,7 @@ import React from 'react'; import Typography from '@material-ui/core/Typography'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useCostInsightsStyles } from '../../utils/styles'; import { Group } from '@backstage/plugin-cost-insights-common'; import { identityApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/devtools/src/hooks/useConfig.ts b/plugins/devtools/src/hooks/useConfig.ts index 6703e7ea59..fbf4df30e0 100644 --- a/plugins/devtools/src/hooks/useConfig.ts +++ b/plugins/devtools/src/hooks/useConfig.ts @@ -16,7 +16,7 @@ import { devToolsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ConfigInfo } from '@backstage/plugin-devtools-common'; export function useConfig(): { diff --git a/plugins/devtools/src/hooks/useExternalDependencies.ts b/plugins/devtools/src/hooks/useExternalDependencies.ts index df2f3e193b..0f4858bae7 100644 --- a/plugins/devtools/src/hooks/useExternalDependencies.ts +++ b/plugins/devtools/src/hooks/useExternalDependencies.ts @@ -16,7 +16,7 @@ import { devToolsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ExternalDependency } from '@backstage/plugin-devtools-common'; export function useExternalDependencies(): { diff --git a/plugins/devtools/src/hooks/useInfo.ts b/plugins/devtools/src/hooks/useInfo.ts index ad700cb3fe..6cbebd1a04 100644 --- a/plugins/devtools/src/hooks/useInfo.ts +++ b/plugins/devtools/src/hooks/useInfo.ts @@ -16,7 +16,7 @@ import { devToolsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { DevToolsInfo } from '@backstage/plugin-devtools-common'; export function useInfo(): { diff --git a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx index 9a4ef4d9b9..5fb004294c 100644 --- a/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx +++ b/plugins/dynatrace/src/components/Problems/ProblemsList/ProblemsList.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Progress, ResponseErrorPanel, diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx index 6b51a1725c..e06d5b6cd2 100644 --- a/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsCard/SyntheticsCard.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Progress, ResponseErrorPanel } from '@backstage/core-components'; import { InfoCard } from '@backstage/core-components'; import { useApi, configApiRef } from '@backstage/core-plugin-api'; diff --git a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx index 336baec4e8..12063ce68b 100644 --- a/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx +++ b/plugins/dynatrace/src/components/Synthetics/SyntheticsLocation/SyntheticsLocation.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Progress, ResponseErrorPanel } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import Chip from '@material-ui/core/Chip'; diff --git a/plugins/entity-feedback/src/components/FeedbackRatingsTable/FeedbackRatingsTable.tsx b/plugins/entity-feedback/src/components/FeedbackRatingsTable/FeedbackRatingsTable.tsx index 48b2018729..4d37a4b569 100644 --- a/plugins/entity-feedback/src/components/FeedbackRatingsTable/FeedbackRatingsTable.tsx +++ b/plugins/entity-feedback/src/components/FeedbackRatingsTable/FeedbackRatingsTable.tsx @@ -20,7 +20,7 @@ import { useApi } from '@backstage/core-plugin-api'; import { EntityRefLink } from '@backstage/plugin-catalog-react'; import { EntityRatingsData } from '@backstage/plugin-entity-feedback-common'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { entityFeedbackApiRef } from '../../api'; diff --git a/plugins/entity-feedback/src/components/FeedbackResponseDialog/FeedbackResponseDialog.tsx b/plugins/entity-feedback/src/components/FeedbackResponseDialog/FeedbackResponseDialog.tsx index 6bd4510d3e..ab92296e17 100644 --- a/plugins/entity-feedback/src/components/FeedbackResponseDialog/FeedbackResponseDialog.tsx +++ b/plugins/entity-feedback/src/components/FeedbackResponseDialog/FeedbackResponseDialog.tsx @@ -35,7 +35,7 @@ import { Typography, } from '@material-ui/core'; import React, { ReactNode, useState } from 'react'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { entityFeedbackApiRef } from '../../api'; diff --git a/plugins/entity-feedback/src/components/FeedbackResponseTable/FeedbackResponseTable.tsx b/plugins/entity-feedback/src/components/FeedbackResponseTable/FeedbackResponseTable.tsx index 8cede00878..0da5dc62aa 100644 --- a/plugins/entity-feedback/src/components/FeedbackResponseTable/FeedbackResponseTable.tsx +++ b/plugins/entity-feedback/src/components/FeedbackResponseTable/FeedbackResponseTable.tsx @@ -21,7 +21,7 @@ import { FeedbackResponse } from '@backstage/plugin-entity-feedback-common'; import { Chip, makeStyles } from '@material-ui/core'; import CheckIcon from '@material-ui/icons/Check'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { entityFeedbackApiRef } from '../../api'; diff --git a/plugins/entity-feedback/src/components/LikeDislikeButtons/LikeDislikeButtons.tsx b/plugins/entity-feedback/src/components/LikeDislikeButtons/LikeDislikeButtons.tsx index 6c634deefb..197486cd9b 100644 --- a/plugins/entity-feedback/src/components/LikeDislikeButtons/LikeDislikeButtons.tsx +++ b/plugins/entity-feedback/src/components/LikeDislikeButtons/LikeDislikeButtons.tsx @@ -30,8 +30,8 @@ import ThumbUpIcon from '@material-ui/icons/ThumbUp'; import ThumbDownOutlinedIcon from '@material-ui/icons/ThumbDownOutlined'; import ThumbUpOutlinedIcon from '@material-ui/icons/ThumbUpOutlined'; import React, { ReactNode, useCallback, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { entityFeedbackApiRef } from '../../api'; import { diff --git a/plugins/entity-feedback/src/components/StarredRatingButtons/StarredRatingButtons.tsx b/plugins/entity-feedback/src/components/StarredRatingButtons/StarredRatingButtons.tsx index 75ad21a658..f6d4f4138b 100644 --- a/plugins/entity-feedback/src/components/StarredRatingButtons/StarredRatingButtons.tsx +++ b/plugins/entity-feedback/src/components/StarredRatingButtons/StarredRatingButtons.tsx @@ -27,8 +27,8 @@ import { IconButton } from '@material-ui/core'; import StarOutlineIcon from '@material-ui/icons/StarOutline'; import StarIcon from '@material-ui/icons/Star'; import React, { ReactNode, useCallback, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { entityFeedbackApiRef } from '../../api'; import { diff --git a/plugins/entity-validation/src/components/EntityValidationOutput/EntityValidationOutput.tsx b/plugins/entity-validation/src/components/EntityValidationOutput/EntityValidationOutput.tsx index bc7e22ef54..8cca4773fa 100644 --- a/plugins/entity-validation/src/components/EntityValidationOutput/EntityValidationOutput.tsx +++ b/plugins/entity-validation/src/components/EntityValidationOutput/EntityValidationOutput.tsx @@ -20,7 +20,7 @@ import { humanizeEntityRef, } from '@backstage/plugin-catalog-react'; import { List, makeStyles, Typography } from '@material-ui/core'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { InfoCard, Progress } from '@backstage/core-components'; import Alert from '@material-ui/lab/Alert'; import { diff --git a/plugins/example-todo-list/src/components/TodoList/TodoList.tsx b/plugins/example-todo-list/src/components/TodoList/TodoList.tsx index 7bda8df5b4..a8eb239e70 100644 --- a/plugins/example-todo-list/src/components/TodoList/TodoList.tsx +++ b/plugins/example-todo-list/src/components/TodoList/TodoList.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { Table, TableColumn, Progress } from '@backstage/core-components'; import Alert from '@material-ui/lab/Alert'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { discoveryApiRef, fetchApiRef, diff --git a/plugins/explore/src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx b/plugins/explore/src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx index 07a2a0eae1..154a894a8c 100644 --- a/plugins/explore/src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx +++ b/plugins/explore/src/components/CatalogKindExploreContent/CatalogKindExploreContent.tsx @@ -18,7 +18,7 @@ import { Entity } from '@backstage/catalog-model'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import Button from '@material-ui/core/Button'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { EntityCard } from '../EntityCard'; import { Content, diff --git a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx index 62b44d0076..62327785c7 100644 --- a/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx +++ b/plugins/explore/src/components/DomainExplorerContent/DomainExplorerContent.tsx @@ -18,7 +18,7 @@ import { DomainEntity } from '@backstage/catalog-model'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import Button from '@material-ui/core/Button'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Content, ContentHeader, diff --git a/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx b/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx index fe7367cfb9..8602e30dec 100644 --- a/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx +++ b/plugins/explore/src/components/GroupsExplorerContent/GroupsDiagram.tsx @@ -38,7 +38,7 @@ import { makeStyles, useTheme } from '@material-ui/core/styles'; import ZoomOutMap from '@material-ui/icons/ZoomOutMap'; import classNames from 'classnames'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; const useStyles = makeStyles( theme => ({ diff --git a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx index d9cd3a512c..9b861a0ef3 100644 --- a/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx +++ b/plugins/explore/src/components/ToolExplorerContent/ToolExplorerContent.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ToolCard } from '../ToolCard'; import { Content, diff --git a/plugins/firehydrant/src/components/serviceAnalytics.ts b/plugins/firehydrant/src/components/serviceAnalytics.ts index c37319d5ea..296fe8442c 100644 --- a/plugins/firehydrant/src/components/serviceAnalytics.ts +++ b/plugins/firehydrant/src/components/serviceAnalytics.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { fireHydrantApiRef } from '../api'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/firehydrant/src/components/serviceDetails.ts b/plugins/firehydrant/src/components/serviceDetails.ts index f0ea325419..1b78daf9bf 100644 --- a/plugins/firehydrant/src/components/serviceDetails.ts +++ b/plugins/firehydrant/src/components/serviceDetails.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { fireHydrantApiRef } from '../api'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/fossa/src/components/FossaCard/FossaCard.tsx b/plugins/fossa/src/components/FossaCard/FossaCard.tsx index d5be8362fa..e83b4f2d3e 100644 --- a/plugins/fossa/src/components/FossaCard/FossaCard.tsx +++ b/plugins/fossa/src/components/FossaCard/FossaCard.tsx @@ -24,7 +24,7 @@ import { makeStyles } from '@material-ui/core/styles'; import Typography from '@material-ui/core/Typography'; import { DateTime } from 'luxon'; import React, { PropsWithChildren } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { fossaApiRef } from '../../api'; import { FOSSA_PROJECT_NAME_ANNOTATION, diff --git a/plugins/fossa/src/components/FossaPage/FossaPage.tsx b/plugins/fossa/src/components/FossaPage/FossaPage.tsx index f3b8114320..dba0a6f441 100644 --- a/plugins/fossa/src/components/FossaPage/FossaPage.tsx +++ b/plugins/fossa/src/components/FossaPage/FossaPage.tsx @@ -32,8 +32,8 @@ import Skeleton from '@material-ui/lab/Skeleton'; import { DateTime } from 'luxon'; import * as React from 'react'; import { useMemo, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useDeepCompareEffect from 'react-use/lib/useDeepCompareEffect'; +import useAsync from 'react-use/esm/useAsync'; +import useDeepCompareEffect from 'react-use/esm/useDeepCompareEffect'; import { FindingSummary, fossaApiRef } from '../../api'; import { getProjectName } from '../getProjectName'; diff --git a/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx b/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx index e26e245174..a4ddb598bb 100644 --- a/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx +++ b/plugins/gcalendar/src/components/CalendarCard/CalendarCard.tsx @@ -38,7 +38,7 @@ import { CalendarEvent } from './CalendarEvent'; import { CalendarSelect } from './CalendarSelect'; import { SignInContent } from './SignInContent'; import { getStartDate } from './util'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export const CalendarCard = () => { const [date, setDate] = useState(DateTime.now()); diff --git a/plugins/gcalendar/src/hooks/useStoredCalendars.ts b/plugins/gcalendar/src/hooks/useStoredCalendars.ts index 5ccdde5572..048b00bc87 100644 --- a/plugins/gcalendar/src/hooks/useStoredCalendars.ts +++ b/plugins/gcalendar/src/hooks/useStoredCalendars.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi, storageApiRef } from '@backstage/core-plugin-api'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import { gcalendarPlugin } from '../plugin'; diff --git a/plugins/git-release-manager/src/GitReleaseManager.tsx b/plugins/git-release-manager/src/GitReleaseManager.tsx index 8ac99a356c..6c85634762 100644 --- a/plugins/git-release-manager/src/GitReleaseManager.tsx +++ b/plugins/git-release-manager/src/GitReleaseManager.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Alert } from '@material-ui/lab'; import { Box } from '@material-ui/core'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.ts b/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.ts index 51080570c3..c55449aa56 100644 --- a/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.ts +++ b/plugins/git-release-manager/src/features/CreateReleaseCandidate/hooks/useCreateReleaseCandidate.ts @@ -15,8 +15,8 @@ */ import { useEffect, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { GetLatestReleaseResult, GetRepositoryResult, diff --git a/plugins/git-release-manager/src/features/Patch/PatchBody.tsx b/plugins/git-release-manager/src/features/Patch/PatchBody.tsx index c5429e389a..60c2decd3b 100644 --- a/plugins/git-release-manager/src/features/Patch/PatchBody.tsx +++ b/plugins/git-release-manager/src/features/Patch/PatchBody.tsx @@ -15,7 +15,7 @@ */ import React, { useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Alert, AlertTitle } from '@material-ui/lab'; import { Box, diff --git a/plugins/git-release-manager/src/features/Patch/hooks/usePatch.ts b/plugins/git-release-manager/src/features/Patch/hooks/usePatch.ts index 73684a8f16..6b3d2a5119 100644 --- a/plugins/git-release-manager/src/features/Patch/hooks/usePatch.ts +++ b/plugins/git-release-manager/src/features/Patch/hooks/usePatch.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useEffect, useState } from 'react'; import { diff --git a/plugins/git-release-manager/src/features/Patch/hooks/usePatchDryRun.tsx b/plugins/git-release-manager/src/features/Patch/hooks/usePatchDryRun.tsx index a11ca55b4d..67bfcbf882 100644 --- a/plugins/git-release-manager/src/features/Patch/hooks/usePatchDryRun.tsx +++ b/plugins/git-release-manager/src/features/Patch/hooks/usePatchDryRun.tsx @@ -15,8 +15,8 @@ */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import React from 'react'; import { CalverTagParts } from '../../../helpers/tagParts/getCalverTagParts'; diff --git a/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.ts b/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.ts index e6f7545c71..f56b434de0 100644 --- a/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.ts +++ b/plugins/git-release-manager/src/features/PromoteRc/hooks/usePromoteRc.ts @@ -15,8 +15,8 @@ */ import { useState, useEffect } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { CardHook, ComponentConfig, diff --git a/plugins/git-release-manager/src/features/RepoDetailsForm/Owner.tsx b/plugins/git-release-manager/src/features/RepoDetailsForm/Owner.tsx index fc48dbb43c..d448e40f09 100644 --- a/plugins/git-release-manager/src/features/RepoDetailsForm/Owner.tsx +++ b/plugins/git-release-manager/src/features/RepoDetailsForm/Owner.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { FormControl, FormHelperText, diff --git a/plugins/git-release-manager/src/features/RepoDetailsForm/Repo.tsx b/plugins/git-release-manager/src/features/RepoDetailsForm/Repo.tsx index a2c01ee717..1974551597 100644 --- a/plugins/git-release-manager/src/features/RepoDetailsForm/Repo.tsx +++ b/plugins/git-release-manager/src/features/RepoDetailsForm/Repo.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useNavigate } from 'react-router-dom'; import { FormControl, diff --git a/plugins/git-release-manager/src/features/Stats/Info/hooks/useGetReleaseTimes.tsx b/plugins/git-release-manager/src/features/Stats/Info/hooks/useGetReleaseTimes.tsx index b87433b303..a873597a41 100644 --- a/plugins/git-release-manager/src/features/Stats/Info/hooks/useGetReleaseTimes.tsx +++ b/plugins/git-release-manager/src/features/Stats/Info/hooks/useGetReleaseTimes.tsx @@ -15,8 +15,8 @@ */ import { useEffect, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { DateTime } from 'luxon'; import { getReleaseCommitPairs } from '../helpers/getReleaseCommitPairs'; diff --git a/plugins/git-release-manager/src/features/Stats/Row/RowCollapsed/ReleaseTime.tsx b/plugins/git-release-manager/src/features/Stats/Row/RowCollapsed/ReleaseTime.tsx index 7a3dac37cc..17abdfc92f 100644 --- a/plugins/git-release-manager/src/features/Stats/Row/RowCollapsed/ReleaseTime.tsx +++ b/plugins/git-release-manager/src/features/Stats/Row/RowCollapsed/ReleaseTime.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { DateTime } from 'luxon'; import { Box, Typography } from '@material-ui/core'; import { Alert } from '@material-ui/lab'; diff --git a/plugins/git-release-manager/src/features/Stats/hooks/useGetStats.ts b/plugins/git-release-manager/src/features/Stats/hooks/useGetStats.ts index e2dbdc0876..8f7ed7301c 100644 --- a/plugins/git-release-manager/src/features/Stats/hooks/useGetStats.ts +++ b/plugins/git-release-manager/src/features/Stats/hooks/useGetStats.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { gitReleaseManagerApiRef } from '../../../api/serviceApiRef'; import { useProjectContext } from '../../../contexts/ProjectContext'; diff --git a/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.ts b/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.ts index dbd24f5ec5..b82024e5bf 100644 --- a/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.ts +++ b/plugins/git-release-manager/src/hooks/useGetGitBatchInfo.ts @@ -15,7 +15,7 @@ */ import { useEffect } from 'react'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { GitReleaseApi } from '../api/GitReleaseClient'; import { Project } from '../contexts/ProjectContext'; diff --git a/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts b/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts index d35283e78d..d643ef909c 100644 --- a/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts +++ b/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunJobs.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; import { githubActionsApiRef, Job, Jobs, Step } from '../../api'; import { buildRouteRef } from '../../routes'; import { useApi, useRouteRefParams } from '@backstage/core-plugin-api'; diff --git a/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts b/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts index 10a043161e..74eeb1d439 100644 --- a/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts +++ b/plugins/github-actions/src/components/WorkflowRunDetails/useWorkflowRunsDetails.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { githubActionsApiRef } from '../../api'; import { buildRouteRef } from '../../routes'; import { useApi, useRouteRefParams } from '@backstage/core-plugin-api'; diff --git a/plugins/github-actions/src/components/WorkflowRunLogs/useDownloadWorkflowRunLogs.ts b/plugins/github-actions/src/components/WorkflowRunLogs/useDownloadWorkflowRunLogs.ts index 3e80d0e2bb..279ca824a8 100644 --- a/plugins/github-actions/src/components/WorkflowRunLogs/useDownloadWorkflowRunLogs.ts +++ b/plugins/github-actions/src/components/WorkflowRunLogs/useDownloadWorkflowRunLogs.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { githubActionsApiRef } from '../../api'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/github-actions/src/components/useWorkflowRuns.ts b/plugins/github-actions/src/components/useWorkflowRuns.ts index aacfabbe2f..35c612304f 100644 --- a/plugins/github-actions/src/components/useWorkflowRuns.ts +++ b/plugins/github-actions/src/components/useWorkflowRuns.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useState } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { githubActionsApiRef } from '../api/GithubActionsApi'; import { useApi, errorApiRef } from '@backstage/core-plugin-api'; import { Branch } from '../api'; diff --git a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx index 9367e84d56..7eb6ed90c1 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { GithubDeployment, githubDeploymentsApiRef } from '../api'; import { useEntity, diff --git a/plugins/github-issues/src/hooks/useGetIssuesByRepoFromGithub.ts b/plugins/github-issues/src/hooks/useGetIssuesByRepoFromGithub.ts index 0b5bad7f57..77c9f608f2 100644 --- a/plugins/github-issues/src/hooks/useGetIssuesByRepoFromGithub.ts +++ b/plugins/github-issues/src/hooks/useGetIssuesByRepoFromGithub.ts @@ -15,7 +15,7 @@ */ import { useApi } from '@backstage/core-plugin-api'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { Repository, githubIssuesApiRef, diff --git a/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx b/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx index e55ae0ef29..1080adc663 100644 --- a/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx +++ b/plugins/gitops-profiles/src/components/ClusterList/ClusterList.tsx @@ -18,7 +18,7 @@ import React, { useState } from 'react'; import ClusterTable from '../ClusterTable/ClusterTable'; import { Button } from '@material-ui/core'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { gitOpsApiRef } from '../../api'; import { Alert } from '@material-ui/lab'; diff --git a/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.tsx b/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.tsx index e5cef084b5..60b0c110b5 100644 --- a/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.tsx +++ b/plugins/gitops-profiles/src/components/ProfileCatalog/ProfileCatalog.tsx @@ -19,7 +19,7 @@ import { TextField, List, ListItem } from '@material-ui/core'; import ClusterTemplateCardList from '../ClusterTemplateCardList'; import ProfileCardList from '../ProfileCardList'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; +import useLocalStorage from 'react-use/esm/useLocalStorage'; import { gitOpsApiRef, Status } from '../../api'; import { diff --git a/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx b/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx index 7fac9bafe2..ff7f9d755f 100644 --- a/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx +++ b/plugins/gocd/src/components/GoCdBuildsComponent/GoCdBuildsComponent.tsx @@ -26,7 +26,7 @@ import { Page, } from '@backstage/core-components'; import { useApi, configApiRef } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { gocdApiRef } from '../../plugin'; import { GoCdBuildsTable } from '../GoCdBuildsTable/GoCdBuildsTable'; import { GoCdBuildsInsights } from '../GoCdBuildsInsights/GoCdBuildsInsights'; diff --git a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx index 0b4399948a..34e84c32ce 100644 --- a/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx +++ b/plugins/graphiql/src/components/GraphiQLPage/GraphiQLPage.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import 'graphiql/graphiql.css'; import { graphQlBrowseApiRef } from '../../lib/api'; import { GraphiQLBrowser } from '../GraphiQLBrowser'; diff --git a/plugins/graphql-voyager/src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx b/plugins/graphql-voyager/src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx index 772c70b0fa..21e73498f3 100644 --- a/plugins/graphql-voyager/src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx +++ b/plugins/graphql-voyager/src/components/GraphQLVoyagerBrowser/GraphQLVoyagerBrowser.tsx @@ -23,7 +23,7 @@ import { makeStyles, Tab, Tabs, Typography } from '@material-ui/core'; import React, { Suspense } from 'react'; import { Content, ErrorPanel, Progress } from '@backstage/core-components'; import { Voyager } from 'graphql-voyager'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; const useStyles = makeStyles({ root: { diff --git a/plugins/graphql-voyager/src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx b/plugins/graphql-voyager/src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx index f3c4f70b4f..fab3cc3e84 100644 --- a/plugins/graphql-voyager/src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx +++ b/plugins/graphql-voyager/src/components/GraphQLVoyagerPage/GraphQLVoyagerPage.tsx @@ -24,7 +24,7 @@ import { import { useApi } from '@backstage/core-plugin-api'; import 'graphql-voyager/dist/voyager.css'; import { graphQlVoyagerApiRef } from '../../lib/api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { GraphQLVoyagerBrowser } from '../GraphQLVoyagerBrowser'; /** @public */ diff --git a/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx b/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx index 700f307dec..c87ece4a9c 100644 --- a/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx +++ b/plugins/home/src/components/CustomHomepage/CustomHomepageGrid.tsx @@ -33,7 +33,7 @@ import { useTheme, } from '@material-ui/core/styles'; import { compact } from 'lodash'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import { ContentHeader, ErrorBoundary } from '@backstage/core-components'; import Typography from '@material-ui/core/Typography'; import { WidgetSettingsOverlay } from './WidgetSettingsOverlay'; diff --git a/plugins/home/src/homePageComponents/FeaturedDocsCard/Content.tsx b/plugins/home/src/homePageComponents/FeaturedDocsCard/Content.tsx index 769b68f5e7..eae8e82966 100644 --- a/plugins/home/src/homePageComponents/FeaturedDocsCard/Content.tsx +++ b/plugins/home/src/homePageComponents/FeaturedDocsCard/Content.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { LinkButton, EmptyState, diff --git a/plugins/home/src/homePageComponents/StarredEntities/Content.tsx b/plugins/home/src/homePageComponents/StarredEntities/Content.tsx index 214f51d81c..d0a6f000df 100644 --- a/plugins/home/src/homePageComponents/StarredEntities/Content.tsx +++ b/plugins/home/src/homePageComponents/StarredEntities/Content.tsx @@ -26,7 +26,7 @@ import Typography from '@material-ui/core/Typography'; import Tabs from '@material-ui/core/Tabs'; import Tab from '@material-ui/core/Tab'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { StarredEntityListItem } from '../../components/StarredEntityListItem/StarredEntityListItem'; /** diff --git a/plugins/home/src/homePageComponents/VisitedByType/Content.tsx b/plugins/home/src/homePageComponents/VisitedByType/Content.tsx index 6c9d889d72..1d157511c9 100644 --- a/plugins/home/src/homePageComponents/VisitedByType/Content.tsx +++ b/plugins/home/src/homePageComponents/VisitedByType/Content.tsx @@ -20,7 +20,7 @@ import { VisitedByType } from './VisitedByType'; import { Visit, visitsApiRef } from '../../api'; import { ContextValueOnly, useContext } from './Context'; import { configApiRef, useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; /** @public */ export type VisitedByTypeKind = 'recent' | 'top'; diff --git a/plugins/home/src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx b/plugins/home/src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx index 62eade6fd0..7ae5813a34 100644 --- a/plugins/home/src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx +++ b/plugins/home/src/homePageComponents/WelcomeTitle/WelcomeTitle.tsx @@ -21,7 +21,7 @@ import { import Tooltip from '@material-ui/core/Tooltip'; import Typography from '@material-ui/core/Typography'; import React, { useEffect, useMemo } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { getTimeBasedGreeting } from './timeUtil'; /** @public */ diff --git a/plugins/ilert/src/hooks/useAlertActions.ts b/plugins/ilert/src/hooks/useAlertActions.ts index 875a8099f3..51c9714be9 100644 --- a/plugins/ilert/src/hooks/useAlertActions.ts +++ b/plugins/ilert/src/hooks/useAlertActions.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { ilertApiRef } from '../api'; import { Alert, AlertAction } from '../types'; diff --git a/plugins/ilert/src/hooks/useAlertSource.ts b/plugins/ilert/src/hooks/useAlertSource.ts index 9048ee3031..e93a5cd068 100644 --- a/plugins/ilert/src/hooks/useAlertSource.ts +++ b/plugins/ilert/src/hooks/useAlertSource.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { ilertApiRef } from '../api'; import { AlertSource } from '../types'; diff --git a/plugins/ilert/src/hooks/useAlertSourceOnCalls.ts b/plugins/ilert/src/hooks/useAlertSourceOnCalls.ts index 2884e890db..1bd62f7c57 100644 --- a/plugins/ilert/src/hooks/useAlertSourceOnCalls.ts +++ b/plugins/ilert/src/hooks/useAlertSourceOnCalls.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { ilertApiRef } from '../api'; import { AlertSource, OnCall } from '../types'; diff --git a/plugins/ilert/src/hooks/useAlerts.ts b/plugins/ilert/src/hooks/useAlerts.ts index 8acabe0086..2b188c864e 100644 --- a/plugins/ilert/src/hooks/useAlerts.ts +++ b/plugins/ilert/src/hooks/useAlerts.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { GetAlertsOpts, ilertApiRef, TableState } from '../api'; import { ACCEPTED, Alert, AlertSource, AlertStatus, PENDING } from '../types'; diff --git a/plugins/ilert/src/hooks/useAssignAlert.ts b/plugins/ilert/src/hooks/useAssignAlert.ts index f81eae724f..e741056c21 100644 --- a/plugins/ilert/src/hooks/useAssignAlert.ts +++ b/plugins/ilert/src/hooks/useAssignAlert.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { ilertApiRef } from '../api'; import { Alert, AlertResponder } from '../types'; diff --git a/plugins/ilert/src/hooks/useNewAlert.ts b/plugins/ilert/src/hooks/useNewAlert.ts index a560c1b035..fd19eab3d4 100644 --- a/plugins/ilert/src/hooks/useNewAlert.ts +++ b/plugins/ilert/src/hooks/useNewAlert.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { ilertApiRef } from '../api'; import { AlertSource } from '../types'; diff --git a/plugins/ilert/src/hooks/useOnCallSchedules.ts b/plugins/ilert/src/hooks/useOnCallSchedules.ts index 2c033067dd..736d698bf6 100644 --- a/plugins/ilert/src/hooks/useOnCallSchedules.ts +++ b/plugins/ilert/src/hooks/useOnCallSchedules.ts @@ -16,7 +16,7 @@ import React from 'react'; import { ilertApiRef } from '../api'; import { AuthenticationError } from '@backstage/errors'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { Schedule } from '../types'; import { useApi, errorApiRef } from '@backstage/core-plugin-api'; diff --git a/plugins/ilert/src/hooks/useServices.ts b/plugins/ilert/src/hooks/useServices.ts index b6ea120f80..59fa1bb21d 100644 --- a/plugins/ilert/src/hooks/useServices.ts +++ b/plugins/ilert/src/hooks/useServices.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { GetServicesOpts, ilertApiRef, TableState } from '../api'; import { Service } from '../types'; diff --git a/plugins/ilert/src/hooks/useShiftOverride.ts b/plugins/ilert/src/hooks/useShiftOverride.ts index 018bdf497a..05411b8008 100644 --- a/plugins/ilert/src/hooks/useShiftOverride.ts +++ b/plugins/ilert/src/hooks/useShiftOverride.ts @@ -16,7 +16,7 @@ import React from 'react'; import { ilertApiRef } from '../api'; import { AuthenticationError } from '@backstage/errors'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { User, Shift } from '../types'; import { useApi, errorApiRef } from '@backstage/core-plugin-api'; diff --git a/plugins/ilert/src/hooks/useStatusPages.ts b/plugins/ilert/src/hooks/useStatusPages.ts index 740e0f515f..eebd8eaa95 100644 --- a/plugins/ilert/src/hooks/useStatusPages.ts +++ b/plugins/ilert/src/hooks/useStatusPages.ts @@ -16,7 +16,7 @@ import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { AuthenticationError } from '@backstage/errors'; import React from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { GetStatusPagesOpts, ilertApiRef, TableState } from '../api'; import { StatusPage } from '../types'; diff --git a/plugins/jenkins/src/components/useBuildWithSteps.ts b/plugins/jenkins/src/components/useBuildWithSteps.ts index 0910564384..b64ac6199a 100644 --- a/plugins/jenkins/src/components/useBuildWithSteps.ts +++ b/plugins/jenkins/src/components/useBuildWithSteps.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useCallback } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { jenkinsApiRef } from '../api'; import { useAsyncPolling } from './useAsyncPolling'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/jenkins/src/components/useBuilds.ts b/plugins/jenkins/src/components/useBuilds.ts index 07d23cce5a..89bbd31b20 100644 --- a/plugins/jenkins/src/components/useBuilds.ts +++ b/plugins/jenkins/src/components/useBuilds.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useState } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { jenkinsApiRef } from '../api'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { useEntity } from '@backstage/plugin-catalog-react'; diff --git a/plugins/jenkins/src/components/useJobRuns.ts b/plugins/jenkins/src/components/useJobRuns.ts index d80e09b18b..c74c5f0bc1 100644 --- a/plugins/jenkins/src/components/useJobRuns.ts +++ b/plugins/jenkins/src/components/useJobRuns.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useState } from 'react'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { jenkinsApiRef } from '../api'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import { useEntity } from '@backstage/plugin-catalog-react'; diff --git a/plugins/kafka/src/components/ConsumerGroupOffsets/useConsumerGroupsOffsetsForEntity.ts b/plugins/kafka/src/components/ConsumerGroupOffsets/useConsumerGroupsOffsetsForEntity.ts index 15d7beff2b..034c4d6b1e 100644 --- a/plugins/kafka/src/components/ConsumerGroupOffsets/useConsumerGroupsOffsetsForEntity.ts +++ b/plugins/kafka/src/components/ConsumerGroupOffsets/useConsumerGroupsOffsetsForEntity.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { kafkaApiRef, kafkaDashboardApiRef } from '../../api/types'; import { useConsumerGroupsForEntity } from './useConsumerGroupsForEntity'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/kubernetes-cluster/src/components/ApiResources/useApiResources.ts b/plugins/kubernetes-cluster/src/components/ApiResources/useApiResources.ts index b28b0b0b67..6724c5ac5d 100644 --- a/plugins/kubernetes-cluster/src/components/ApiResources/useApiResources.ts +++ b/plugins/kubernetes-cluster/src/components/ApiResources/useApiResources.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { kubernetesApiRef } from '@backstage/plugin-kubernetes-react'; diff --git a/plugins/kubernetes-cluster/src/components/ClusterOverview/useCluster.ts b/plugins/kubernetes-cluster/src/components/ClusterOverview/useCluster.ts index 05106cdc5b..2bdb7081cd 100644 --- a/plugins/kubernetes-cluster/src/components/ClusterOverview/useCluster.ts +++ b/plugins/kubernetes-cluster/src/components/ClusterOverview/useCluster.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { kubernetesApiRef } from '@backstage/plugin-kubernetes-react'; diff --git a/plugins/kubernetes-cluster/src/components/Nodes/useNodes.ts b/plugins/kubernetes-cluster/src/components/Nodes/useNodes.ts index 1feaff3bdb..a1304f1f54 100644 --- a/plugins/kubernetes-cluster/src/components/Nodes/useNodes.ts +++ b/plugins/kubernetes-cluster/src/components/Nodes/useNodes.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { kubernetesApiRef } from '@backstage/plugin-kubernetes-react'; diff --git a/plugins/kubernetes-react/src/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.tsx b/plugins/kubernetes-react/src/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.tsx index 0b6cfa26b4..7f6cc4f65e 100644 --- a/plugins/kubernetes-react/src/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.tsx +++ b/plugins/kubernetes-react/src/components/KubernetesDrawer/KubernetesStructuredMetadataTableDrawer.tsx @@ -41,7 +41,7 @@ import { ClusterAttributes } from '@backstage/plugin-kubernetes-common'; import { ManifestYaml } from './ManifestYaml'; import { useApi } from '@backstage/core-plugin-api'; import { kubernetesClusterLinkFormatterApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; const useDrawerStyles = makeStyles((theme: Theme) => createStyles({ diff --git a/plugins/kubernetes-react/src/components/Pods/Events/useEvents.ts b/plugins/kubernetes-react/src/components/Pods/Events/useEvents.ts index e31a4ee859..58126c278c 100644 --- a/plugins/kubernetes-react/src/components/Pods/Events/useEvents.ts +++ b/plugins/kubernetes-react/src/components/Pods/Events/useEvents.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { kubernetesProxyApiRef } from '../../../api/types'; /** diff --git a/plugins/kubernetes-react/src/components/Pods/PodLogs/usePodLogs.ts b/plugins/kubernetes-react/src/components/Pods/PodLogs/usePodLogs.ts index 98ed6c3177..fe562d86e0 100644 --- a/plugins/kubernetes-react/src/components/Pods/PodLogs/usePodLogs.ts +++ b/plugins/kubernetes-react/src/components/Pods/PodLogs/usePodLogs.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ContainerScope } from './types'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/kubernetes-react/src/hooks/__mocks__/useIsPodExecTerminalSupported.ts b/plugins/kubernetes-react/src/hooks/__mocks__/useIsPodExecTerminalSupported.ts index e1dc3b4fc5..6387852310 100644 --- a/plugins/kubernetes-react/src/hooks/__mocks__/useIsPodExecTerminalSupported.ts +++ b/plugins/kubernetes-react/src/hooks/__mocks__/useIsPodExecTerminalSupported.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { AsyncState } from 'react-use/lib/useAsync'; +import { AsyncState } from 'react-use/esm/useAsync'; export const useIsPodExecTerminalSupported: () => AsyncState = jest.fn( () => ({ loading: false, value: false } as AsyncState), diff --git a/plugins/kubernetes-react/src/hooks/useCustomResources.ts b/plugins/kubernetes-react/src/hooks/useCustomResources.ts index 4faeb48894..f281811940 100644 --- a/plugins/kubernetes-react/src/hooks/useCustomResources.ts +++ b/plugins/kubernetes-react/src/hooks/useCustomResources.ts @@ -16,7 +16,7 @@ import { Entity } from '@backstage/catalog-model'; import { useCallback } from 'react'; -import useInterval from 'react-use/lib/useInterval'; +import useInterval from 'react-use/esm/useInterval'; import { CustomResourceMatcher, ObjectsByEntityResponse, @@ -24,7 +24,7 @@ import { import { useApi } from '@backstage/core-plugin-api'; import { KubernetesObjects } from './useKubernetesObjects'; import { generateAuth } from './auth'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { kubernetesAuthProvidersApiRef } from '../kubernetes-auth-provider'; import { kubernetesApiRef } from '../api/types'; diff --git a/plugins/kubernetes-react/src/hooks/useIsPodExecTerminalSupported.ts b/plugins/kubernetes-react/src/hooks/useIsPodExecTerminalSupported.ts index 2483bb9412..5795b900ae 100644 --- a/plugins/kubernetes-react/src/hooks/useIsPodExecTerminalSupported.ts +++ b/plugins/kubernetes-react/src/hooks/useIsPodExecTerminalSupported.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; import { kubernetesApiRef } from '../api/types'; diff --git a/plugins/kubernetes-react/src/hooks/useKubernetesObjects.ts b/plugins/kubernetes-react/src/hooks/useKubernetesObjects.ts index f2b8de3cc6..8376456587 100644 --- a/plugins/kubernetes-react/src/hooks/useKubernetesObjects.ts +++ b/plugins/kubernetes-react/src/hooks/useKubernetesObjects.ts @@ -16,11 +16,11 @@ import { Entity } from '@backstage/catalog-model'; import { useCallback } from 'react'; -import useInterval from 'react-use/lib/useInterval'; +import useInterval from 'react-use/esm/useInterval'; import { ObjectsByEntityResponse } from '@backstage/plugin-kubernetes-common'; import { useApi } from '@backstage/core-plugin-api'; import { generateAuth } from './auth'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { kubernetesAuthProvidersApiRef } from '../kubernetes-auth-provider'; import { kubernetesApiRef } from '../api/types'; diff --git a/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx b/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx index 8f718cda64..c2a31af9a0 100644 --- a/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx +++ b/plugins/lighthouse/src/components/AuditList/AuditListTable.tsx @@ -17,7 +17,7 @@ import React, { useState, useEffect } from 'react'; import Typography from '@material-ui/core/Typography'; import { Website } from '@backstage/plugin-lighthouse-common'; import { lighthouseApiRef } from '../../api'; -import useInterval from 'react-use/lib/useInterval'; +import useInterval from 'react-use/esm/useInterval'; import { formatTime, CATEGORIES, diff --git a/plugins/lighthouse/src/components/AuditList/index.tsx b/plugins/lighthouse/src/components/AuditList/index.tsx index 77df8217c5..66ec412882 100644 --- a/plugins/lighthouse/src/components/AuditList/index.tsx +++ b/plugins/lighthouse/src/components/AuditList/index.tsx @@ -19,8 +19,8 @@ import Grid from '@material-ui/core/Grid'; import Pagination from '@material-ui/lab/Pagination'; import React, { ChangeEvent, ReactNode, useMemo, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import useAsync from 'react-use/lib/useAsync'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; +import useAsync from 'react-use/esm/useAsync'; +import useLocalStorage from 'react-use/esm/useLocalStorage'; import { lighthouseApiRef } from '../../api'; import { useQuery } from '../../utils'; import LighthouseIntro, { LIGHTHOUSE_INTRO_LOCAL_STORAGE } from '../Intro'; diff --git a/plugins/lighthouse/src/components/AuditView/index.tsx b/plugins/lighthouse/src/components/AuditView/index.tsx index 66a3880148..a6a295e96c 100644 --- a/plugins/lighthouse/src/components/AuditView/index.tsx +++ b/plugins/lighthouse/src/components/AuditView/index.tsx @@ -30,7 +30,7 @@ import { useNavigate, useParams, } from 'react-router-dom'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Audit, Website } from '@backstage/plugin-lighthouse-common'; import { lighthouseApiRef } from '../../api'; import { formatTime } from '../../utils'; diff --git a/plugins/lighthouse/src/components/Intro/index.tsx b/plugins/lighthouse/src/components/Intro/index.tsx index 044d4cc408..9850d0ef4b 100644 --- a/plugins/lighthouse/src/components/Intro/index.tsx +++ b/plugins/lighthouse/src/components/Intro/index.tsx @@ -21,7 +21,7 @@ import Tabs from '@material-ui/core/Tabs'; import { makeStyles } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/Close'; import React, { useState } from 'react'; -import useLocalStorage from 'react-use/lib/useLocalStorage'; +import useLocalStorage from 'react-use/esm/useLocalStorage'; import LighthouseSupportButton from '../SupportButton'; import { ContentHeader, diff --git a/plugins/lighthouse/src/hooks/useWebsiteForEntity.ts b/plugins/lighthouse/src/hooks/useWebsiteForEntity.ts index 1237209749..9dbdae36ea 100644 --- a/plugins/lighthouse/src/hooks/useWebsiteForEntity.ts +++ b/plugins/lighthouse/src/hooks/useWebsiteForEntity.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useEntity } from '@backstage/plugin-catalog-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { LIGHTHOUSE_WEBSITE_URL_ANNOTATION } from '../../constants'; import { lighthouseApiRef } from '../api'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/linguist/src/hooks/useLanguages.ts b/plugins/linguist/src/hooks/useLanguages.ts index 3e99243e94..f233d183bb 100644 --- a/plugins/linguist/src/hooks/useLanguages.ts +++ b/plugins/linguist/src/hooks/useLanguages.ts @@ -17,7 +17,7 @@ import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; import { linguistApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Languages } from '@backstage/plugin-linguist-common'; diff --git a/plugins/microsoft-calendar/src/components/CalendarCard.tsx b/plugins/microsoft-calendar/src/components/CalendarCard.tsx index 57c520ad0f..8267f9ec43 100644 --- a/plugins/microsoft-calendar/src/components/CalendarCard.tsx +++ b/plugins/microsoft-calendar/src/components/CalendarCard.tsx @@ -30,7 +30,7 @@ import { CalendarEvent } from './CalendarEvent'; import { CalendarSelect } from './CalendarSelect'; import { SignInContent } from './SignInContent'; import { getStartDate } from './util'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export const CalendarCard = () => { const [date, setDate] = useState(DateTime.now()); diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx index 8d87a54ca0..04442620aa 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardEntityList.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { Box, makeStyles, Typography } from '@material-ui/core'; import { newRelicDashboardApiRef } from '../../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Progress, InfoCard, diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx index c19697a4f0..73f8b871b6 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshot.tsx @@ -17,7 +17,7 @@ import React from 'react'; import { Box, makeStyles, MenuItem, Select } from '@material-ui/core'; import { useApi, storageApiRef } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { InfoCard, Progress, @@ -26,7 +26,7 @@ import { } from '@backstage/core-components'; import { newRelicDashboardApiRef } from '../../../api'; import { DashboardSnapshotSummary } from '../../../api/NewRelicDashboardApi'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; const useStyles = makeStyles( theme => ({ diff --git a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx index 81686d10c9..6c0527ecf0 100644 --- a/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx +++ b/plugins/newrelic-dashboard/src/components/NewRelicDashboard/DashboardSnapshotList/DashboardSnapshotList.tsx @@ -17,7 +17,7 @@ import React, { useState } from 'react'; import { Tab, Tabs, makeStyles, Box } from '@material-ui/core'; import { newRelicDashboardApiRef } from '../../../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Progress, ErrorPanel } from '@backstage/core-components'; import { DashboardSnapshot } from './DashboardSnapshot'; import { DashboardEntitySummary } from '../../../api/NewRelicDashboardApi'; diff --git a/plugins/newrelic/src/components/NewRelicFetchComponent/NewRelicFetchComponent.tsx b/plugins/newrelic/src/components/NewRelicFetchComponent/NewRelicFetchComponent.tsx index 85183916bd..a97a6fdc32 100644 --- a/plugins/newrelic/src/components/NewRelicFetchComponent/NewRelicFetchComponent.tsx +++ b/plugins/newrelic/src/components/NewRelicFetchComponent/NewRelicFetchComponent.tsx @@ -16,7 +16,7 @@ import React from 'react'; import Alert from '@material-ui/lab/Alert'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { newRelicApiRef, NewRelicApplications } from '../../api'; import { Progress, Table, TableColumn } from '@backstage/core-components'; diff --git a/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx b/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx index ea4f2836fe..a664d408ab 100644 --- a/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx +++ b/plugins/nomad/src/components/EntityNomadAllocationListTable/EntityNomadAllocationListTable.tsx @@ -38,7 +38,7 @@ import { NOMAD_NAMESPACE_ANNOTATION, isNomadAllocationsAvailable, } from '../../annotations'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; type rowType = Allocation & { nomadAddr: string }; diff --git a/plugins/notifications/src/hooks/useNotificationsApi.ts b/plugins/notifications/src/hooks/useNotificationsApi.ts index e1afb54c8d..3acc406016 100644 --- a/plugins/notifications/src/hooks/useNotificationsApi.ts +++ b/plugins/notifications/src/hooks/useNotificationsApi.ts @@ -16,7 +16,7 @@ import { NotificationsApi, notificationsApiRef } from '../api'; import { useApi } from '@backstage/core-plugin-api'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; /** @public */ export function useNotificationsApi( diff --git a/plugins/octopus-deploy/src/hooks/useConfig.ts b/plugins/octopus-deploy/src/hooks/useConfig.ts index 7218bf1a2c..c46c7c5201 100644 --- a/plugins/octopus-deploy/src/hooks/useConfig.ts +++ b/plugins/octopus-deploy/src/hooks/useConfig.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { octopusDeployApiRef, OctopusPluginConfig } from '../api'; export function useConfig(): { diff --git a/plugins/octopus-deploy/src/hooks/useProject.ts b/plugins/octopus-deploy/src/hooks/useProject.ts index f4178fd3e0..dcd21c102e 100644 --- a/plugins/octopus-deploy/src/hooks/useProject.ts +++ b/plugins/octopus-deploy/src/hooks/useProject.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { octopusDeployApiRef, OctopusProject } from '../api'; export function useProject( diff --git a/plugins/octopus-deploy/src/hooks/useReleases.ts b/plugins/octopus-deploy/src/hooks/useReleases.ts index 671a0a7e7f..c47971c14f 100644 --- a/plugins/octopus-deploy/src/hooks/useReleases.ts +++ b/plugins/octopus-deploy/src/hooks/useReleases.ts @@ -14,7 +14,7 @@ * limitations under the License. */ import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { octopusDeployApiRef, OctopusEnvironment, diff --git a/plugins/org-react/src/components/GroupListPicker/GroupListPicker.tsx b/plugins/org-react/src/components/GroupListPicker/GroupListPicker.tsx index 57a93ce0fe..4f28faa1eb 100644 --- a/plugins/org-react/src/components/GroupListPicker/GroupListPicker.tsx +++ b/plugins/org-react/src/components/GroupListPicker/GroupListPicker.tsx @@ -21,7 +21,7 @@ import { } from '@backstage/plugin-catalog-react'; import TextField from '@material-ui/core/TextField'; import Autocomplete from '@material-ui/lab/Autocomplete'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import Popover from '@material-ui/core/Popover'; import { useApi } from '@backstage/core-plugin-api'; import { ResponseErrorPanel } from '@backstage/core-components'; diff --git a/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.tsx b/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.tsx index 8162a5fdb3..981ec309b4 100644 --- a/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.tsx +++ b/plugins/org/src/components/Cards/Group/MembersList/MembersListCard.tsx @@ -32,7 +32,7 @@ import { } from '@material-ui/core'; import Pagination from '@material-ui/lab/Pagination'; import React, { useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Avatar, diff --git a/plugins/org/src/components/Cards/OwnershipCard/useGetEntities.ts b/plugins/org/src/components/Cards/OwnershipCard/useGetEntities.ts index c5bf4a7279..e7c1f132c3 100644 --- a/plugins/org/src/components/Cards/OwnershipCard/useGetEntities.ts +++ b/plugins/org/src/components/Cards/OwnershipCard/useGetEntities.ts @@ -29,7 +29,7 @@ import { } from '@backstage/plugin-catalog-react'; import limiterFactory from 'p-limit'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import qs from 'qs'; import { EntityRelationAggregation } from '../types'; import { uniq } from 'lodash'; diff --git a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx index f3e3a6bd9a..7e82d9f928 100644 --- a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx +++ b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx @@ -30,7 +30,7 @@ import { useApi, useRouteRef, } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef, CatalogApi, diff --git a/plugins/pagerduty/src/components/ChangeEvents/ChangeEvents.tsx b/plugins/pagerduty/src/components/ChangeEvents/ChangeEvents.tsx index 4b19257cdc..0cd9d55c39 100644 --- a/plugins/pagerduty/src/components/ChangeEvents/ChangeEvents.tsx +++ b/plugins/pagerduty/src/components/ChangeEvents/ChangeEvents.tsx @@ -18,7 +18,7 @@ import React, { useEffect } from 'react'; import { List, ListSubheader } from '@material-ui/core'; import { ChangeEventListItem } from './ChangeEventListItem'; import { ChangeEventEmptyState } from './ChangeEventEmptyState'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { pagerDutyApiRef } from '../../api'; import { useApi } from '@backstage/core-plugin-api'; import { Progress } from '@backstage/core-components'; diff --git a/plugins/pagerduty/src/components/Escalation/EscalationPolicy.tsx b/plugins/pagerduty/src/components/Escalation/EscalationPolicy.tsx index 8602733ee3..80fb9f14c1 100644 --- a/plugins/pagerduty/src/components/Escalation/EscalationPolicy.tsx +++ b/plugins/pagerduty/src/components/Escalation/EscalationPolicy.tsx @@ -18,7 +18,7 @@ import React from 'react'; import { List, ListSubheader } from '@material-ui/core'; import { EscalationUsersEmptyState } from './EscalationUsersEmptyState'; import { EscalationUser } from './EscalationUser'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { pagerDutyApiRef } from '../../api'; import { Alert } from '@material-ui/lab'; diff --git a/plugins/pagerduty/src/components/Incident/Incidents.tsx b/plugins/pagerduty/src/components/Incident/Incidents.tsx index 2e0e201c79..07ad45885c 100644 --- a/plugins/pagerduty/src/components/Incident/Incidents.tsx +++ b/plugins/pagerduty/src/components/Incident/Incidents.tsx @@ -18,7 +18,7 @@ import React, { useEffect } from 'react'; import { List, ListSubheader } from '@material-ui/core'; import { IncidentListItem } from './IncidentListItem'; import { IncidentsEmptyState } from './IncidentEmptyState'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { pagerDutyApiRef } from '../../api'; import { Alert } from '@material-ui/lab'; diff --git a/plugins/pagerduty/src/components/PagerDutyCard/PagerDutyCard.tsx b/plugins/pagerduty/src/components/PagerDutyCard/PagerDutyCard.tsx index 8be87e0f15..20e926db56 100644 --- a/plugins/pagerduty/src/components/PagerDutyCard/PagerDutyCard.tsx +++ b/plugins/pagerduty/src/components/PagerDutyCard/PagerDutyCard.tsx @@ -24,7 +24,7 @@ import { } from '@material-ui/core'; import { Incidents } from '../Incident'; import { EscalationPolicy } from '../Escalation'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Alert } from '@material-ui/lab'; import { pagerDutyApiRef, UnauthorizedError } from '../../api'; import AlarmAddIcon from '@material-ui/icons/AlarmAdd'; diff --git a/plugins/pagerduty/src/components/TriggerDialog/TriggerDialog.tsx b/plugins/pagerduty/src/components/TriggerDialog/TriggerDialog.tsx index 7e273b8d25..e70519e741 100644 --- a/plugins/pagerduty/src/components/TriggerDialog/TriggerDialog.tsx +++ b/plugins/pagerduty/src/components/TriggerDialog/TriggerDialog.tsx @@ -25,7 +25,7 @@ import { Typography, CircularProgress, } from '@material-ui/core'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { pagerDutyApiRef } from '../../api'; import { Alert } from '@material-ui/lab'; import { diff --git a/plugins/periskop/src/components/EntityPeriskopErrorsCard/EntityPeriskopErrorsCard.tsx b/plugins/periskop/src/components/EntityPeriskopErrorsCard/EntityPeriskopErrorsCard.tsx index 73a06693b1..3d28f3b0af 100644 --- a/plugins/periskop/src/components/EntityPeriskopErrorsCard/EntityPeriskopErrorsCard.tsx +++ b/plugins/periskop/src/components/EntityPeriskopErrorsCard/EntityPeriskopErrorsCard.tsx @@ -33,7 +33,7 @@ import { EmptyState, Link, } from '@backstage/core-components'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { periskopApiRef } from '../../plugin'; import { AggregatedError, NotFoundInInstance } from '../../types'; diff --git a/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx b/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx index b3cb472714..e1d88b1345 100644 --- a/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx +++ b/plugins/playlist/src/components/EntityPlaylistDialog/EntityPlaylistDialog.tsx @@ -46,7 +46,7 @@ import PlaylistAddIcon from '@material-ui/icons/PlaylistAdd'; import SearchIcon from '@material-ui/icons/Search'; import React, { useCallback, useEffect, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { playlistApiRef } from '../../api'; import { useTitle } from '../../hooks'; diff --git a/plugins/playlist/src/components/PersonalListPicker/PersonalListPicker.tsx b/plugins/playlist/src/components/PersonalListPicker/PersonalListPicker.tsx index bfd633e084..4f462c31dc 100644 --- a/plugins/playlist/src/components/PersonalListPicker/PersonalListPicker.tsx +++ b/plugins/playlist/src/components/PersonalListPicker/PersonalListPicker.tsx @@ -33,7 +33,7 @@ import PlaylistPlayIcon from '@material-ui/icons/PlaylistPlay'; import SettingsIcon from '@material-ui/icons/Settings'; import { compact } from 'lodash'; import React, { Fragment, useEffect, useMemo, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { usePlaylistList } from '../../hooks'; import { PlaylistFilter } from '../../types'; diff --git a/plugins/playlist/src/components/PlaylistEditDialog/PlaylistEditDialog.tsx b/plugins/playlist/src/components/PlaylistEditDialog/PlaylistEditDialog.tsx index a7e7b6d976..6065032172 100644 --- a/plugins/playlist/src/components/PlaylistEditDialog/PlaylistEditDialog.tsx +++ b/plugins/playlist/src/components/PlaylistEditDialog/PlaylistEditDialog.tsx @@ -36,8 +36,8 @@ import TextField from '@material-ui/core/TextField'; import { makeStyles } from '@material-ui/core/styles'; import React, { useState } from 'react'; import { useForm, Controller } from 'react-hook-form'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { useTitle } from '../../hooks'; const useStyles = makeStyles({ diff --git a/plugins/playlist/src/components/PlaylistPage/PlaylistEntitiesTable.tsx b/plugins/playlist/src/components/PlaylistPage/PlaylistEntitiesTable.tsx index 72d50506b0..009a2d757e 100644 --- a/plugins/playlist/src/components/PlaylistPage/PlaylistEntitiesTable.tsx +++ b/plugins/playlist/src/components/PlaylistPage/PlaylistEntitiesTable.tsx @@ -29,7 +29,7 @@ import AddBoxIcon from '@material-ui/icons/AddBox'; import DeleteIcon from '@material-ui/icons/Delete'; import SearchIcon from '@material-ui/icons/Search'; import React, { forwardRef, useCallback, useEffect, useState } from 'react'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { playlistApiRef } from '../../api'; import { useTitle } from '../../hooks'; diff --git a/plugins/playlist/src/components/PlaylistPage/PlaylistHeader.tsx b/plugins/playlist/src/components/PlaylistPage/PlaylistHeader.tsx index 868559695f..fa47d7566b 100644 --- a/plugins/playlist/src/components/PlaylistPage/PlaylistHeader.tsx +++ b/plugins/playlist/src/components/PlaylistPage/PlaylistHeader.tsx @@ -43,7 +43,7 @@ import EditIcon from '@material-ui/icons/Edit'; import DeleteIcon from '@material-ui/icons/Delete'; import React, { useCallback, useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { playlistApiRef } from '../../api'; import { rootRouteRef } from '../../routes'; diff --git a/plugins/playlist/src/components/PlaylistPage/PlaylistPage.tsx b/plugins/playlist/src/components/PlaylistPage/PlaylistPage.tsx index ebd5c407f1..eb1d5bfb48 100644 --- a/plugins/playlist/src/components/PlaylistPage/PlaylistPage.tsx +++ b/plugins/playlist/src/components/PlaylistPage/PlaylistPage.tsx @@ -29,7 +29,7 @@ import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import React, { useEffect } from 'react'; import { useParams } from 'react-router-dom'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { playlistApiRef } from '../../api'; import { PlaylistEntitiesTable } from './PlaylistEntitiesTable'; diff --git a/plugins/playlist/src/components/PlaylistSearchBar/PlaylistSearchBar.tsx b/plugins/playlist/src/components/PlaylistSearchBar/PlaylistSearchBar.tsx index 566240cf1d..dd015e1856 100644 --- a/plugins/playlist/src/components/PlaylistSearchBar/PlaylistSearchBar.tsx +++ b/plugins/playlist/src/components/PlaylistSearchBar/PlaylistSearchBar.tsx @@ -24,7 +24,7 @@ import { makeStyles } from '@material-ui/core/styles'; import Clear from '@material-ui/icons/Clear'; import Search from '@material-ui/icons/Search'; import React, { useState } from 'react'; -import useDebounce from 'react-use/lib/useDebounce'; +import useDebounce from 'react-use/esm/useDebounce'; import { usePlaylistList } from '../../hooks'; import { PlaylistFilter } from '../../types'; diff --git a/plugins/playlist/src/components/PlaylistSortPicker/PlaylistSortPicker.tsx b/plugins/playlist/src/components/PlaylistSortPicker/PlaylistSortPicker.tsx index 4f6e7baf6d..b5cb1739ff 100644 --- a/plugins/playlist/src/components/PlaylistSortPicker/PlaylistSortPicker.tsx +++ b/plugins/playlist/src/components/PlaylistSortPicker/PlaylistSortPicker.tsx @@ -22,7 +22,7 @@ import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import SwapVertIcon from '@material-ui/icons/SwapVert'; import React from 'react'; -import useEffectOnce from 'react-use/lib/useEffectOnce'; +import useEffectOnce from 'react-use/esm/useEffectOnce'; import { usePlaylistList } from '../../hooks/usePlaylistList'; import { PlaylistSortCompareFunction } from '../../types'; diff --git a/plugins/playlist/src/hooks/PlaylistListProvider.tsx b/plugins/playlist/src/hooks/PlaylistListProvider.tsx index 5b8e1ee2b6..6e9abd3205 100644 --- a/plugins/playlist/src/hooks/PlaylistListProvider.tsx +++ b/plugins/playlist/src/hooks/PlaylistListProvider.tsx @@ -25,9 +25,9 @@ import React, { useState, } from 'react'; import { useLocation } from 'react-router-dom'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; -import useDebounce from 'react-use/lib/useDebounce'; -import useMountedState from 'react-use/lib/useMountedState'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; +import useDebounce from 'react-use/esm/useDebounce'; +import useMountedState from 'react-use/esm/useMountedState'; import { playlistApiRef } from '../api'; import { diff --git a/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsEventsTable.tsx b/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsEventsTable.tsx index b7f5b3c436..b1860618cd 100644 --- a/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsEventsTable.tsx +++ b/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsEventsTable.tsx @@ -21,7 +21,7 @@ import { Table, TableColumn, } from '@backstage/core-components'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { makeStyles } from '@material-ui/core/styles'; import { StatusField } from '../StatusField'; diff --git a/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsLogsTable.tsx b/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsLogsTable.tsx index d12b432314..518873258e 100644 --- a/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsLogsTable.tsx +++ b/plugins/puppetdb/src/components/ReportDetailsPage/ReportDetailsLogsTable.tsx @@ -22,7 +22,7 @@ import { Table, TableColumn, } from '@backstage/core-components'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { makeStyles } from '@material-ui/core/styles'; diff --git a/plugins/puppetdb/src/components/ReportsPage/ReportsTable.tsx b/plugins/puppetdb/src/components/ReportsPage/ReportsTable.tsx index 3aeecc70b0..bf448ec92c 100644 --- a/plugins/puppetdb/src/components/ReportsPage/ReportsTable.tsx +++ b/plugins/puppetdb/src/components/ReportsPage/ReportsTable.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import { puppetDbApiRef, PuppetDbReport } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import React from 'react'; import { Link, diff --git a/plugins/rollbar/src/hooks/useCatalogEntity.ts b/plugins/rollbar/src/hooks/useCatalogEntity.ts index 4845a275be..b8bc441d70 100644 --- a/plugins/rollbar/src/hooks/useCatalogEntity.ts +++ b/plugins/rollbar/src/hooks/useCatalogEntity.ts @@ -15,7 +15,7 @@ */ import { catalogApiRef, entityRouteRef } from '@backstage/plugin-catalog-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi, useRouteRefParams } from '@backstage/core-plugin-api'; export function useCatalogEntity() { diff --git a/plugins/rollbar/src/hooks/useRollbarEntities.ts b/plugins/rollbar/src/hooks/useRollbarEntities.ts index 60799e3916..fd31a6e1b8 100644 --- a/plugins/rollbar/src/hooks/useRollbarEntities.ts +++ b/plugins/rollbar/src/hooks/useRollbarEntities.ts @@ -15,7 +15,7 @@ */ import { catalogApiRef } from '@backstage/plugin-catalog-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ROLLBAR_ANNOTATION } from '../constants'; import { configApiRef, useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/rollbar/src/hooks/useTopActiveItems.ts b/plugins/rollbar/src/hooks/useTopActiveItems.ts index 04b65eb8cb..d89db211ec 100644 --- a/plugins/rollbar/src/hooks/useTopActiveItems.ts +++ b/plugins/rollbar/src/hooks/useTopActiveItems.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Entity } from '@backstage/catalog-model'; import { rollbarApiRef } from '../api'; import { RollbarTopActiveItem } from '../api/types'; diff --git a/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx b/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx index 3f8fde748c..14c347fda8 100644 --- a/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx +++ b/plugins/scaffolder-react/src/next/components/TaskSteps/StepTime.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React, { useCallback, useState } from 'react'; -import useInterval from 'react-use/lib/useInterval'; +import useInterval from 'react-use/esm/useInterval'; import { DateTime, Interval } from 'luxon'; import humanizeDuration from 'humanize-duration'; import { Typography } from '@material-ui/core'; diff --git a/plugins/scaffolder-react/src/next/hooks/useTemplateParameterSchema.ts b/plugins/scaffolder-react/src/next/hooks/useTemplateParameterSchema.ts index 73452f1670..4b4f21ae71 100644 --- a/plugins/scaffolder-react/src/next/hooks/useTemplateParameterSchema.ts +++ b/plugins/scaffolder-react/src/next/hooks/useTemplateParameterSchema.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { scaffolderApiRef } from '../../api/ref'; import { useApi } from '@backstage/core-plugin-api'; import { TemplateParameterSchema } from '@backstage/plugin-scaffolder-react'; diff --git a/plugins/scaffolder/src/components/ActionsPage/ActionsPage.tsx b/plugins/scaffolder/src/components/ActionsPage/ActionsPage.tsx index 9129b87f25..d6eabb0e5c 100644 --- a/plugins/scaffolder/src/components/ActionsPage/ActionsPage.tsx +++ b/plugins/scaffolder/src/components/ActionsPage/ActionsPage.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React, { Fragment, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ActionExample, scaffolderApiRef, diff --git a/plugins/scaffolder/src/components/ListTasksPage/ListTasksPage.tsx b/plugins/scaffolder/src/components/ListTasksPage/ListTasksPage.tsx index 8cd8ccefda..498cff75d1 100644 --- a/plugins/scaffolder/src/components/ListTasksPage/ListTasksPage.tsx +++ b/plugins/scaffolder/src/components/ListTasksPage/ListTasksPage.tsx @@ -25,7 +25,7 @@ import { } from '@backstage/core-components'; import { useApi, useRouteRef } from '@backstage/core-plugin-api'; import { CatalogFilterLayout } from '@backstage/plugin-catalog-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import React, { useState } from 'react'; import { ScaffolderTask, diff --git a/plugins/scaffolder/src/components/ListTasksPage/columns/OwnerEntityColumn.tsx b/plugins/scaffolder/src/components/ListTasksPage/columns/OwnerEntityColumn.tsx index b89141392c..8147b205e2 100644 --- a/plugins/scaffolder/src/components/ListTasksPage/columns/OwnerEntityColumn.tsx +++ b/plugins/scaffolder/src/components/ListTasksPage/columns/OwnerEntityColumn.tsx @@ -16,7 +16,7 @@ import { useApi } from '@backstage/core-plugin-api'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { catalogApiRef, EntityRefLink } from '@backstage/plugin-catalog-react'; import { parseEntityRef, UserEntity } from '@backstage/catalog-model'; diff --git a/plugins/scaffolder/src/components/ListTasksPage/columns/TemplateTitleColumn.tsx b/plugins/scaffolder/src/components/ListTasksPage/columns/TemplateTitleColumn.tsx index cbac929a33..929e34b591 100644 --- a/plugins/scaffolder/src/components/ListTasksPage/columns/TemplateTitleColumn.tsx +++ b/plugins/scaffolder/src/components/ListTasksPage/columns/TemplateTitleColumn.tsx @@ -16,7 +16,7 @@ import { useApi } from '@backstage/core-plugin-api'; import React from 'react'; import { scaffolderApiRef } from '@backstage/plugin-scaffolder-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { parseEntityRef } from '@backstage/catalog-model'; import { EntityRefLink } from '@backstage/plugin-catalog-react'; diff --git a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx index f8dd29d9d3..69e1b5efad 100644 --- a/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/EntityPicker/EntityPicker.tsx @@ -33,7 +33,7 @@ import Autocomplete, { AutocompleteChangeReason, } from '@material-ui/lab/Autocomplete'; import React, { useCallback, useEffect } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { EntityPickerFilterQueryValue, EntityPickerProps, diff --git a/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx b/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx index 4625e3b803..876b5c161d 100644 --- a/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx +++ b/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx @@ -14,8 +14,8 @@ * limitations under the License. */ import React, { useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useEffectOnce from 'react-use/lib/useEffectOnce'; +import useAsync from 'react-use/esm/useAsync'; +import useEffectOnce from 'react-use/esm/useEffectOnce'; import { GetEntityFacetsRequest } from '@backstage/catalog-client'; import { makeValidator } from '@backstage/catalog-model'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx index a74a3da7f2..d9804a8cba 100644 --- a/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/MultiEntityPicker/MultiEntityPicker.tsx @@ -33,7 +33,7 @@ import Autocomplete, { AutocompleteChangeReason, } from '@material-ui/lab/Autocomplete'; import React, { useCallback, useEffect } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { FieldValidation } from '@rjsf/utils'; import { MultiEntityPickerFilterQueryValue, diff --git a/plugins/scaffolder/src/components/fields/MyGroupsPicker/MyGroupsPicker.tsx b/plugins/scaffolder/src/components/fields/MyGroupsPicker/MyGroupsPicker.tsx index d421759789..0314240b40 100644 --- a/plugins/scaffolder/src/components/fields/MyGroupsPicker/MyGroupsPicker.tsx +++ b/plugins/scaffolder/src/components/fields/MyGroupsPicker/MyGroupsPicker.tsx @@ -26,7 +26,7 @@ import { MyGroupsPickerProps, MyGroupsPickerSchema } from './schema'; import Autocomplete from '@material-ui/lab/Autocomplete'; import { catalogApiRef } from '@backstage/plugin-catalog-react'; import { NotFoundError } from '@backstage/errors'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Entity, stringifyEntityRef } from '@backstage/catalog-model'; export { MyGroupsPickerSchema }; diff --git a/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx b/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx index d349f55893..d5351d54e5 100644 --- a/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx +++ b/plugins/scaffolder/src/components/fields/OwnedEntityPicker/OwnedEntityPicker.tsx @@ -18,7 +18,7 @@ import { identityApiRef, useApi } from '@backstage/core-plugin-api'; import TextField from '@material-ui/core/TextField'; import Autocomplete from '@material-ui/lab/Autocomplete'; import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { EntityPicker } from '../EntityPicker/EntityPicker'; import { OwnedEntityPickerProps } from './schema'; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx index 67b18c4ebd..b5d5e8d572 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPicker.tsx @@ -30,7 +30,7 @@ import { RepoUrlPickerRepoName } from './RepoUrlPickerRepoName'; import { parseRepoPickerUrl, serializeRepoPickerUrl } from './utils'; import { RepoUrlPickerProps } from './schema'; import { RepoUrlPickerState } from './types'; -import useDebounce from 'react-use/lib/useDebounce'; +import useDebounce from 'react-use/esm/useDebounce'; import { useTemplateSecrets } from '@backstage/plugin-scaffolder-react'; import Box from '@material-ui/core/Box'; import Divider from '@material-ui/core/Divider'; diff --git a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx index 51844f02ff..ed06983f90 100644 --- a/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx +++ b/plugins/scaffolder/src/components/fields/RepoUrlPicker/RepoUrlPickerHost.tsx @@ -19,7 +19,7 @@ import FormControl from '@material-ui/core/FormControl'; import FormHelperText from '@material-ui/core/FormHelperText'; import { useApi } from '@backstage/core-plugin-api'; import { scaffolderApiRef } from '@backstage/plugin-scaffolder-react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; export const RepoUrlPickerHost = (props: { host?: string; diff --git a/plugins/scaffolder/src/next/TemplateEditorPage/DryRunResults/TaskStatusStepper.tsx b/plugins/scaffolder/src/next/TemplateEditorPage/DryRunResults/TaskStatusStepper.tsx index 4a79338912..cde3d6cfb0 100644 --- a/plugins/scaffolder/src/next/TemplateEditorPage/DryRunResults/TaskStatusStepper.tsx +++ b/plugins/scaffolder/src/next/TemplateEditorPage/DryRunResults/TaskStatusStepper.tsx @@ -28,7 +28,7 @@ import Check from '@material-ui/icons/Check'; import FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord'; import Typography from '@material-ui/core/Typography'; import { DateTime, Interval } from 'luxon'; -import useInterval from 'react-use/lib/useInterval'; +import useInterval from 'react-use/esm/useInterval'; import humanizeDuration from 'humanize-duration'; import classNames from 'classnames'; diff --git a/plugins/scaffolder/src/next/TemplateEditorPage/TemplateEditorForm.tsx b/plugins/scaffolder/src/next/TemplateEditorPage/TemplateEditorForm.tsx index 4b5a00b7ba..e6149f57a1 100644 --- a/plugins/scaffolder/src/next/TemplateEditorPage/TemplateEditorForm.tsx +++ b/plugins/scaffolder/src/next/TemplateEditorPage/TemplateEditorForm.tsx @@ -17,7 +17,7 @@ import { useApiHolder } from '@backstage/core-plugin-api'; import { JsonObject, JsonValue } from '@backstage/types'; import { makeStyles } from '@material-ui/core/styles'; import React, { Component, ReactNode, useMemo, useState } from 'react'; -import useDebounce from 'react-use/lib/useDebounce'; +import useDebounce from 'react-use/esm/useDebounce'; import yaml from 'yaml'; import { LayoutOptions, diff --git a/plugins/scaffolder/src/next/TemplateEditorPage/TemplateFormPreviewer.tsx b/plugins/scaffolder/src/next/TemplateEditorPage/TemplateFormPreviewer.tsx index e9515d11a8..7892adfb3f 100644 --- a/plugins/scaffolder/src/next/TemplateEditorPage/TemplateFormPreviewer.tsx +++ b/plugins/scaffolder/src/next/TemplateEditorPage/TemplateFormPreviewer.tsx @@ -28,7 +28,7 @@ import Select from '@material-ui/core/Select'; import { makeStyles } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/Close'; import React, { useCallback, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import yaml from 'yaml'; import { LayoutOptions, diff --git a/plugins/scaffolder/src/next/TemplateWizardPage/TemplateWizardPage.tsx b/plugins/scaffolder/src/next/TemplateWizardPage/TemplateWizardPage.tsx index 053cf6decf..aef6ca6bb1 100644 --- a/plugins/scaffolder/src/next/TemplateWizardPage/TemplateWizardPage.tsx +++ b/plugins/scaffolder/src/next/TemplateWizardPage/TemplateWizardPage.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; import { Navigate, useNavigate } from 'react-router-dom'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { stringifyEntityRef, ANNOTATION_EDIT_URL, diff --git a/plugins/search-react/src/components/SearchBar/SearchBar.tsx b/plugins/search-react/src/components/SearchBar/SearchBar.tsx index 534fefbd8c..7580228c8e 100644 --- a/plugins/search-react/src/components/SearchBar/SearchBar.tsx +++ b/plugins/search-react/src/components/SearchBar/SearchBar.tsx @@ -34,7 +34,7 @@ import React, { useRef, useState, } from 'react'; -import useDebounce from 'react-use/lib/useDebounce'; +import useDebounce from 'react-use/esm/useDebounce'; import { SearchContextProvider, useSearch } from '../../context'; diff --git a/plugins/search-react/src/components/SearchFilter/hooks.ts b/plugins/search-react/src/components/SearchFilter/hooks.ts index 5771cc5288..987c85bb7c 100644 --- a/plugins/search-react/src/components/SearchFilter/hooks.ts +++ b/plugins/search-react/src/components/SearchFilter/hooks.ts @@ -15,8 +15,8 @@ */ import { useEffect, useRef } from 'react'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; -import useDebounce from 'react-use/lib/useDebounce'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; +import useDebounce from 'react-use/esm/useDebounce'; import { useSearch } from '../../context'; diff --git a/plugins/search-react/src/components/SearchResult/SearchResult.tsx b/plugins/search-react/src/components/SearchResult/SearchResult.tsx index f362ff27d3..5a733ad8bf 100644 --- a/plugins/search-react/src/components/SearchResult/SearchResult.tsx +++ b/plugins/search-react/src/components/SearchResult/SearchResult.tsx @@ -15,7 +15,7 @@ */ import React, { ReactNode } from 'react'; -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; import { isFunction } from 'lodash'; import { diff --git a/plugins/search-react/src/context/SearchContext.tsx b/plugins/search-react/src/context/SearchContext.tsx index f8140e2f19..f09ebac42a 100644 --- a/plugins/search-react/src/context/SearchContext.tsx +++ b/plugins/search-react/src/context/SearchContext.tsx @@ -22,8 +22,8 @@ import React, { useEffect, useState, } from 'react'; -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; -import usePrevious from 'react-use/lib/usePrevious'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; +import usePrevious from 'react-use/esm/usePrevious'; import { createVersionedContext, diff --git a/plugins/search/src/components/SearchModal/useSearchModal.tsx b/plugins/search/src/components/SearchModal/useSearchModal.tsx index 279484bd47..b8c59e780a 100644 --- a/plugins/search/src/components/SearchModal/useSearchModal.tsx +++ b/plugins/search/src/components/SearchModal/useSearchModal.tsx @@ -20,7 +20,7 @@ import { createVersionedContext, createVersionedValueMap, } from '@backstage/version-bridge'; -import useUpdateEffect from 'react-use/lib/useUpdateEffect'; +import useUpdateEffect from 'react-use/esm/useUpdateEffect'; /** * The state of the search modal, as well as functions for changing the modal's diff --git a/plugins/search/src/components/SearchPage/SearchPage.tsx b/plugins/search/src/components/SearchPage/SearchPage.tsx index 3ee444bd32..7ea4160216 100644 --- a/plugins/search/src/components/SearchPage/SearchPage.tsx +++ b/plugins/search/src/components/SearchPage/SearchPage.tsx @@ -15,7 +15,7 @@ */ import React, { useEffect } from 'react'; -import usePrevious from 'react-use/lib/usePrevious'; +import usePrevious from 'react-use/esm/usePrevious'; import qs from 'qs'; import { useLocation, useOutlet } from 'react-router-dom'; import { diff --git a/plugins/search/src/components/SearchPage/UrlUpdater.tsx b/plugins/search/src/components/SearchPage/UrlUpdater.tsx index d44195b6e2..d4bfe057a3 100644 --- a/plugins/search/src/components/SearchPage/UrlUpdater.tsx +++ b/plugins/search/src/components/SearchPage/UrlUpdater.tsx @@ -15,7 +15,7 @@ */ import { useEffect } from 'react'; -import usePrevious from 'react-use/lib/usePrevious'; +import usePrevious from 'react-use/esm/usePrevious'; import qs from 'qs'; import { useLocation } from 'react-router-dom'; import { useSearch } from '@backstage/plugin-search-react'; diff --git a/plugins/search/src/components/SearchType/SearchType.Accordion.tsx b/plugins/search/src/components/SearchType/SearchType.Accordion.tsx index d9c03b39c5..f9a07b6dcd 100644 --- a/plugins/search/src/components/SearchType/SearchType.Accordion.tsx +++ b/plugins/search/src/components/SearchType/SearchType.Accordion.tsx @@ -31,7 +31,7 @@ import ListItemText from '@material-ui/core/ListItemText'; import { makeStyles } from '@material-ui/core/styles'; import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; import AllIcon from '@material-ui/icons/FontDownload'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; const useStyles = makeStyles(theme => ({ card: { diff --git a/plugins/search/src/components/SearchType/SearchType.tsx b/plugins/search/src/components/SearchType/SearchType.tsx index 1a803c328f..6e470ea7a8 100644 --- a/plugins/search/src/components/SearchType/SearchType.tsx +++ b/plugins/search/src/components/SearchType/SearchType.tsx @@ -22,7 +22,7 @@ import MenuItem from '@material-ui/core/MenuItem'; import Select from '@material-ui/core/Select'; import { makeStyles } from '@material-ui/core/styles'; import React, { ChangeEvent } from 'react'; -import useEffectOnce from 'react-use/lib/useEffectOnce'; +import useEffectOnce from 'react-use/esm/useEffectOnce'; import { SearchTypeAccordion, SearchTypeAccordionProps, diff --git a/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx b/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx index 4db2721efb..1b9de61444 100644 --- a/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx +++ b/plugins/sentry/src/components/SentryIssuesWidget/SentryIssuesWidget.tsx @@ -16,7 +16,7 @@ import { Entity } from '@backstage/catalog-model'; import React, { useEffect } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { sentryApiRef } from '../../api'; import SentryIssuesTable from '../SentryIssuesTable/SentryIssuesTable'; import { SENTRY_PROJECT_SLUG_ANNOTATION, useProjectSlug } from '../hooks'; diff --git a/plugins/shortcuts/src/ShortcutForm.tsx b/plugins/shortcuts/src/ShortcutForm.tsx index efb5829768..8889fd7dbf 100644 --- a/plugins/shortcuts/src/ShortcutForm.tsx +++ b/plugins/shortcuts/src/ShortcutForm.tsx @@ -15,7 +15,7 @@ */ import React, { useEffect, useRef } from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import { useForm, SubmitHandler, Controller } from 'react-hook-form'; import Button from '@material-ui/core/Button'; import CardActions from '@material-ui/core/CardActions'; diff --git a/plugins/shortcuts/src/Shortcuts.tsx b/plugins/shortcuts/src/Shortcuts.tsx index 6b9ea4d79b..ab632e6c64 100644 --- a/plugins/shortcuts/src/Shortcuts.tsx +++ b/plugins/shortcuts/src/Shortcuts.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import PlayListAddIcon from '@material-ui/icons/PlaylistAdd'; import { ShortcutItem } from './ShortcutItem'; import { AddShortcut } from './AddShortcut'; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx index 4f4f4e4fd7..421685d690 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx @@ -33,7 +33,7 @@ import Security from '@material-ui/icons/Security'; import SentimentVeryDissatisfied from '@material-ui/icons/SentimentVeryDissatisfied'; import SentimentVerySatisfied from '@material-ui/icons/SentimentVerySatisfied'; import React, { useMemo } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Percentage } from './Percentage'; import { Rating } from './Rating'; import { RatingCard } from './RatingCard'; diff --git a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx index 84770c6d6e..8ba485b6fe 100644 --- a/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx +++ b/plugins/splunk-on-call/src/components/EntitySplunkOnCallCard.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React, { useCallback, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Entity } from '@backstage/catalog-model'; import { useEntity, diff --git a/plugins/splunk-on-call/src/components/Escalation/EscalationPolicy.tsx b/plugins/splunk-on-call/src/components/Escalation/EscalationPolicy.tsx index b35464f303..21b68ef520 100644 --- a/plugins/splunk-on-call/src/components/Escalation/EscalationPolicy.tsx +++ b/plugins/splunk-on-call/src/components/Escalation/EscalationPolicy.tsx @@ -20,7 +20,7 @@ import ListSubheader from '@material-ui/core/ListSubheader'; import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'; import { EscalationUsersEmptyState } from './EscalationUsersEmptyState'; import { EscalationUser } from './EscalationUser'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { splunkOnCallApiRef } from '../../api'; import Alert from '@material-ui/lab/Alert'; import { User } from '../types'; diff --git a/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx b/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx index 3689db9b0a..3430c0fa4a 100644 --- a/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx +++ b/plugins/splunk-on-call/src/components/Incident/IncidentListItem.tsx @@ -29,7 +29,7 @@ import { DateTime, Duration } from 'luxon'; import { Incident, IncidentPhase } from '../types'; import OpenInBrowserIcon from '@material-ui/icons/OpenInBrowser'; import { splunkOnCallApiRef } from '../../api/client'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { TriggerAlarmRequest } from '../../api/types'; import { diff --git a/plugins/splunk-on-call/src/components/Incident/Incidents.tsx b/plugins/splunk-on-call/src/components/Incident/Incidents.tsx index fba7e540da..6e032ea642 100644 --- a/plugins/splunk-on-call/src/components/Incident/Incidents.tsx +++ b/plugins/splunk-on-call/src/components/Incident/Incidents.tsx @@ -20,7 +20,7 @@ import ListSubheader from '@material-ui/core/ListSubheader'; import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'; import { IncidentListItem } from './IncidentListItem'; import { IncidentsEmptyState } from './IncidentEmptyState'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { splunkOnCallApiRef } from '../../api'; import Alert from '@material-ui/lab/Alert'; diff --git a/plugins/splunk-on-call/src/components/TriggerDialog/TriggerDialog.tsx b/plugins/splunk-on-call/src/components/TriggerDialog/TriggerDialog.tsx index db16c12c04..2590ddbadc 100644 --- a/plugins/splunk-on-call/src/components/TriggerDialog/TriggerDialog.tsx +++ b/plugins/splunk-on-call/src/components/TriggerDialog/TriggerDialog.tsx @@ -28,7 +28,7 @@ import MenuItem from '@material-ui/core/MenuItem'; import FormControl from '@material-ui/core/FormControl'; import InputLabel from '@material-ui/core/InputLabel'; import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'; -import useAsyncFn from 'react-use/lib/useAsyncFn'; +import useAsyncFn from 'react-use/esm/useAsyncFn'; import { splunkOnCallApiRef } from '../../api'; import Alert from '@material-ui/lab/Alert'; import { TriggerAlarmRequest } from '../../api'; diff --git a/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx b/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx index d74f296614..45bb37dcbe 100644 --- a/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx +++ b/plugins/stack-overflow/src/home/StackOverflowQuestions/Content.tsx @@ -24,7 +24,7 @@ import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; import ListItemIcon from '@material-ui/core/ListItemIcon'; import Typography from '@material-ui/core/Typography'; import OpenInNewIcon from '@material-ui/icons/OpenInNew'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import _unescape from 'lodash/unescape'; import React from 'react'; import { diff --git a/plugins/stackstorm/src/components/ActionsList/ActionsList.tsx b/plugins/stackstorm/src/components/ActionsList/ActionsList.tsx index bd5fc56c2f..43436b46c1 100644 --- a/plugins/stackstorm/src/components/ActionsList/ActionsList.tsx +++ b/plugins/stackstorm/src/components/ActionsList/ActionsList.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React, { useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Link, Progress, ResponseErrorPanel } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import List from '@material-ui/core/List'; diff --git a/plugins/stackstorm/src/components/ExecutionsTable/ExecutionPanel.tsx b/plugins/stackstorm/src/components/ExecutionsTable/ExecutionPanel.tsx index cd22120898..ccf81763fc 100644 --- a/plugins/stackstorm/src/components/ExecutionsTable/ExecutionPanel.tsx +++ b/plugins/stackstorm/src/components/ExecutionsTable/ExecutionPanel.tsx @@ -21,7 +21,7 @@ import { } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import { Execution, stackstormApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import Button from '@material-ui/core/Button'; import Card from '@material-ui/core/Card'; import CardActions from '@material-ui/core/CardActions'; diff --git a/plugins/stackstorm/src/components/ExecutionsTable/ExecutionsTable.tsx b/plugins/stackstorm/src/components/ExecutionsTable/ExecutionsTable.tsx index f034cb64e8..9f65fc1019 100644 --- a/plugins/stackstorm/src/components/ExecutionsTable/ExecutionsTable.tsx +++ b/plugins/stackstorm/src/components/ExecutionsTable/ExecutionsTable.tsx @@ -24,7 +24,7 @@ import { useApi } from '@backstage/core-plugin-api'; import { Execution, stackstormApiRef } from '../../api'; import { Status } from './Status'; import { ExecutionPanel } from './ExecutionPanel'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; type DenseTableProps = { executions: Execution[]; diff --git a/plugins/stackstorm/src/components/PacksTable/PacksTable.tsx b/plugins/stackstorm/src/components/PacksTable/PacksTable.tsx index 2167200e8e..d4e80179cd 100644 --- a/plugins/stackstorm/src/components/PacksTable/PacksTable.tsx +++ b/plugins/stackstorm/src/components/PacksTable/PacksTable.tsx @@ -20,7 +20,7 @@ import { Table, TableColumn, } from '@backstage/core-components'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { Pack, stackstormApiRef } from '../../api'; diff --git a/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx b/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx index 7f69b9432d..e8fee36031 100644 --- a/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx +++ b/plugins/tech-insights/src/components/ScorecardsCard/ScorecardsCard.tsx @@ -15,7 +15,7 @@ */ import React, { useMemo } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { ErrorPanel, Progress } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import { ScorecardInfo } from '../ScorecardsInfo'; diff --git a/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx b/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx index c144833ea7..b13d13a986 100644 --- a/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx +++ b/plugins/tech-insights/src/components/ScorecardsContent/ScorecardContent.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { Content, Page, Progress } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import { ScorecardInfo } from '../ScorecardsInfo'; diff --git a/plugins/tech-radar/src/components/RadarComponent.tsx b/plugins/tech-radar/src/components/RadarComponent.tsx index 9437501405..7ab4fcc19b 100644 --- a/plugins/tech-radar/src/components/RadarComponent.tsx +++ b/plugins/tech-radar/src/components/RadarComponent.tsx @@ -17,7 +17,7 @@ import { Progress } from '@backstage/core-components'; import { errorApiRef, useApi } from '@backstage/core-plugin-api'; import React, { useEffect } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { type RadarEntry, techRadarApiRef, diff --git a/plugins/techdocs-react/src/context.tsx b/plugins/techdocs-react/src/context.tsx index 608dbc59b3..43fdada98e 100644 --- a/plugins/techdocs-react/src/context.tsx +++ b/plugins/techdocs-react/src/context.tsx @@ -23,8 +23,8 @@ import React, { ReactNode, useEffect, } from 'react'; -import useAsync, { AsyncState } from 'react-use/lib/useAsync'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsync, { AsyncState } from 'react-use/esm/useAsync'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { CompoundEntityRef, diff --git a/plugins/techdocs/src/home/components/Tables/DocsTable.tsx b/plugins/techdocs/src/home/components/Tables/DocsTable.tsx index 89ee236029..c0b39878cd 100644 --- a/plugins/techdocs/src/home/components/Tables/DocsTable.tsx +++ b/plugins/techdocs/src/home/components/Tables/DocsTable.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; import { configApiRef, useApi, useRouteRef } from '@backstage/core-plugin-api'; import { Entity, RELATION_OWNED_BY } from '@backstage/catalog-model'; diff --git a/plugins/techdocs/src/home/components/Tables/EntityListDocsTable.tsx b/plugins/techdocs/src/home/components/Tables/EntityListDocsTable.tsx index 0042cc9418..563bec4d22 100644 --- a/plugins/techdocs/src/home/components/Tables/EntityListDocsTable.tsx +++ b/plugins/techdocs/src/home/components/Tables/EntityListDocsTable.tsx @@ -15,7 +15,7 @@ */ import React from 'react'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; import { capitalize } from 'lodash'; import { CodeSnippet, diff --git a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx index 95c50d3912..70bd946256 100644 --- a/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx +++ b/plugins/techdocs/src/home/components/TechDocsCustomHome.tsx @@ -15,7 +15,7 @@ */ import React, { useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { makeStyles } from '@material-ui/core/styles'; import { CSSProperties } from '@material-ui/styles/withStyles'; import { diff --git a/plugins/techdocs/src/reader/components/useRawPage.ts b/plugins/techdocs/src/reader/components/useRawPage.ts index 311f8554a9..eee5770b6b 100644 --- a/plugins/techdocs/src/reader/components/useRawPage.ts +++ b/plugins/techdocs/src/reader/components/useRawPage.ts @@ -14,8 +14,8 @@ * limitations under the License. */ import { CompoundEntityRef } from '@backstage/catalog-model'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; -import { AsyncState } from 'react-use/lib/useAsync'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; +import { AsyncState } from 'react-use/esm/useAsync'; import { techdocsStorageApiRef } from '../../api'; import { useApi } from '@backstage/core-plugin-api'; diff --git a/plugins/techdocs/src/reader/components/useReaderState.ts b/plugins/techdocs/src/reader/components/useReaderState.ts index c9dc9b5dbf..251ae6e3d5 100644 --- a/plugins/techdocs/src/reader/components/useReaderState.ts +++ b/plugins/techdocs/src/reader/components/useReaderState.ts @@ -16,8 +16,8 @@ import { useApi } from '@backstage/core-plugin-api'; import { useMemo, useReducer, useRef } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useAsyncRetry from 'react-use/lib/useAsyncRetry'; +import useAsync from 'react-use/esm/useAsync'; +import useAsyncRetry from 'react-use/esm/useAsyncRetry'; import { techdocsStorageApiRef } from '@backstage/plugin-techdocs-react'; /** diff --git a/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts b/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts index 604957d5cd..70be7e50f0 100644 --- a/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts +++ b/plugins/techdocs/src/reader/transformers/copyToClipboard.test.ts @@ -18,7 +18,7 @@ import { createTestShadowDom } from '../../test-utils'; import { copyToClipboard } from './copyToClipboard'; import { lightTheme } from '@backstage/theme'; import { act, waitFor } from '@testing-library/react'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; const clipboardSpy = jest.fn(); Object.defineProperty(window.navigator, 'clipboard', { diff --git a/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx b/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx index 0d178c2970..70868baa21 100644 --- a/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx +++ b/plugins/techdocs/src/reader/transformers/copyToClipboard.tsx @@ -22,7 +22,7 @@ import Tooltip from '@material-ui/core/Tooltip'; import { withStyles, Theme } from '@material-ui/core/styles'; import IconButton from '@material-ui/core/IconButton'; import type { Transformer } from './transformer'; -import useCopyToClipboard from 'react-use/lib/useCopyToClipboard'; +import useCopyToClipboard from 'react-use/esm/useCopyToClipboard'; const CopyToClipboardTooltip = withStyles(theme => ({ tooltip: { diff --git a/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx index 337960932e..1e3ba793f6 100644 --- a/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsLanguageToggle.tsx @@ -25,7 +25,7 @@ import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; import { makeStyles } from '@material-ui/core/styles'; import { userSettingsTranslationRef } from '../../translation'; import { useApi } from '@backstage/core-plugin-api'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import { Select } from '@backstage/core-components'; const useStyles = makeStyles(theme => ({ diff --git a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx index 3c19b0ab88..cfa9873531 100644 --- a/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx +++ b/plugins/user-settings/src/components/General/UserSettingsThemeToggle.tsx @@ -15,7 +15,7 @@ */ import React, { cloneElement } from 'react'; -import useObservable from 'react-use/lib/useObservable'; +import useObservable from 'react-use/esm/useObservable'; import AutoIcon from '@material-ui/icons/BrightnessAuto'; import ToggleButton from '@material-ui/lab/ToggleButton'; import ToggleButtonGroup from '@material-ui/lab/ToggleButtonGroup'; diff --git a/plugins/user-settings/src/components/useUserProfileInfo.ts b/plugins/user-settings/src/components/useUserProfileInfo.ts index 8b2a41a55f..ee4578cd6b 100644 --- a/plugins/user-settings/src/components/useUserProfileInfo.ts +++ b/plugins/user-settings/src/components/useUserProfileInfo.ts @@ -21,7 +21,7 @@ import { useApi, } from '@backstage/core-plugin-api'; import { useEffect } from 'react'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; /** @public */ export const useUserProfile = () => { diff --git a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx index 412a3404d1..d658fd2170 100644 --- a/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx +++ b/plugins/vault/src/components/EntityVaultTable/EntityVaultTable.tsx @@ -22,7 +22,7 @@ import Typography from '@material-ui/core/Typography'; import Edit from '@material-ui/icons/Edit'; import Visibility from '@material-ui/icons/Visibility'; import Alert from '@material-ui/lab/Alert'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { VaultSecret, vaultApiRef } from '../../api'; import { VAULT_SECRET_ENGINE_ANNOTATION, diff --git a/plugins/xcmetrics/src/components/BuildDetails/BuildDetails.tsx b/plugins/xcmetrics/src/components/BuildDetails/BuildDetails.tsx index 52806797dc..fd0308b594 100644 --- a/plugins/xcmetrics/src/components/BuildDetails/BuildDetails.tsx +++ b/plugins/xcmetrics/src/components/BuildDetails/BuildDetails.tsx @@ -21,7 +21,7 @@ import React from 'react'; import { BuildResponse, xcmetricsApiRef } from '../../api'; import { Progress, StructuredMetadataTable } from '@backstage/core-components'; import Alert from '@material-ui/lab/Alert'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { formatDuration, formatStatus, formatTime } from '../../utils'; import { StatusIcon } from '../StatusIcon'; diff --git a/plugins/xcmetrics/src/components/BuildListFilter/BuildListFilter.tsx b/plugins/xcmetrics/src/components/BuildListFilter/BuildListFilter.tsx index 121a5cafab..92b2ff247c 100644 --- a/plugins/xcmetrics/src/components/BuildListFilter/BuildListFilter.tsx +++ b/plugins/xcmetrics/src/components/BuildListFilter/BuildListFilter.tsx @@ -22,7 +22,7 @@ import { makeStyles } from '@material-ui/core/styles'; import FilterList from '@material-ui/icons/FilterList'; import { InfoCard, Select } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { BuildFilters, BuildStatus, xcmetricsApiRef } from '../../api'; import { DatePicker } from '../DatePicker'; diff --git a/plugins/xcmetrics/src/components/Overview/Overview.tsx b/plugins/xcmetrics/src/components/Overview/Overview.tsx index 84e0b5e23e..11f7b015ab 100644 --- a/plugins/xcmetrics/src/components/Overview/Overview.tsx +++ b/plugins/xcmetrics/src/components/Overview/Overview.tsx @@ -24,7 +24,7 @@ import { } from '@backstage/core-components'; import { useApi } from '@backstage/core-plugin-api'; import { xcmetricsApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import Alert from '@material-ui/lab/Alert'; import { StatusMatrix } from '../StatusMatrix'; import Grid from '@material-ui/core/Grid'; diff --git a/plugins/xcmetrics/src/components/OverviewTrends/OverviewTrends.tsx b/plugins/xcmetrics/src/components/OverviewTrends/OverviewTrends.tsx index 012b1a5df2..d1611abc12 100644 --- a/plugins/xcmetrics/src/components/OverviewTrends/OverviewTrends.tsx +++ b/plugins/xcmetrics/src/components/OverviewTrends/OverviewTrends.tsx @@ -22,7 +22,7 @@ import { Trend } from '../Trend'; import Alert from '@material-ui/lab/Alert'; import AlertTitle from '@material-ui/lab/AlertTitle'; import { xcmetricsApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { DataValueGridItem } from '../DataValue'; import { diff --git a/plugins/xcmetrics/src/components/StatusCell/StatusCell.tsx b/plugins/xcmetrics/src/components/StatusCell/StatusCell.tsx index 7e73d8483a..4525c028b2 100644 --- a/plugins/xcmetrics/src/components/StatusCell/StatusCell.tsx +++ b/plugins/xcmetrics/src/components/StatusCell/StatusCell.tsx @@ -19,7 +19,7 @@ import { makeStyles, Theme } from '@material-ui/core/styles'; import React from 'react'; import { BuildStatus, BuildStatusResult, xcmetricsApiRef } from '../../api'; import { cn, formatDuration, formatStatus } from '../../utils'; -import useAsync from 'react-use/lib/useAsync'; +import useAsync from 'react-use/esm/useAsync'; import { useApi } from '@backstage/core-plugin-api'; import { Progress } from '@backstage/core-components'; diff --git a/plugins/xcmetrics/src/components/StatusMatrix/StatusMatrix.tsx b/plugins/xcmetrics/src/components/StatusMatrix/StatusMatrix.tsx index b51852607f..83988af3ab 100644 --- a/plugins/xcmetrics/src/components/StatusMatrix/StatusMatrix.tsx +++ b/plugins/xcmetrics/src/components/StatusMatrix/StatusMatrix.tsx @@ -17,8 +17,8 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { xcmetricsApiRef } from '../../api'; -import useAsync from 'react-use/lib/useAsync'; -import useMeasure from 'react-use/lib/useMeasure'; +import useAsync from 'react-use/esm/useAsync'; +import useMeasure from 'react-use/esm/useMeasure'; import { cn } from '../../utils'; import { useApi } from '@backstage/core-plugin-api'; import Alert from '@material-ui/lab/Alert';