Skip to content

Commit

Permalink
Chore: Update react (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
Onokaev authored Nov 24, 2022
1 parent 0fb09e6 commit b1daf54
Show file tree
Hide file tree
Showing 61 changed files with 17,824 additions and 18,386 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ module.exports = {
}],
'spaced-comment': 'off',
'use-isnan': 'error',
'valid-typeof': 'off'
'valid-typeof': 'off',
'react/react-in-jsx-scope': 'off'
},
settings: {
react: {
Expand Down
2 changes: 0 additions & 2 deletions __mocks__/react-monaco-editor.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import * as React from 'react';

function MonacoEditor() {
return (<div />);
}
Expand Down
35,782 changes: 17,769 additions & 18,013 deletions package-lock.json

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"adaptive-expressions": "4.17.1",
"adaptivecards": "2.11.1",
"adaptivecards-templating": "2.3.1",
"ajv": "8.11.0",
"apg-js": "4.1.2",
"babel-loader": "8.2.5",
"babel-preset-react-app": "10.0.1",
Expand Down Expand Up @@ -45,9 +46,9 @@
"postcss-loader": "7.0.1",
"postcss-preset-env": "7.8.2",
"re-resizable": "6.9.9",
"react": "16.14.0",
"react": "18.2.0",
"react-app-polyfill": "3.0.0",
"react-dom": "16.14.0",
"react-dom": "18.2.0",
"react-intl": "6.2.1",
"react-redux": "8.0.4",
"redux": "4.2.0",
Expand Down Expand Up @@ -95,8 +96,8 @@
"@types/isomorphic-fetch": "0.0.36",
"@types/jest": "27.4.1",
"@types/lodash.debounce": "4.0.7",
"@types/react": "17.0.44",
"@types/react-dom": "17.0.11",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.8",
"@types/react-intl": "3.0.0",
"@types/react-redux": "7.1.23",
"@types/redux-logger": "3.0.9",
Expand Down Expand Up @@ -131,6 +132,6 @@
"indent": 4
},
"resolutions": {
"@types/react": "17.0.30"
"axe-core": "4.4.3"
}
}
3 changes: 2 additions & 1 deletion src/app/services/actions/ocps-action-creators.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ describe('OCPS action creators', () => {
const store = mockStore({});
const expectedActions = [
{
type: GET_POLICY_PENDING
type: GET_POLICY_PENDING,
response: null
},
{
type: GET_POLICY_SUCCESS,
Expand Down
3 changes: 2 additions & 1 deletion src/app/services/actions/snippet-action-creator.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ describe('Snippet actions creators', () => {
// Arrange
const expectedActions = [
{
type: 'GET_SNIPPET_PENDING'
type: 'GET_SNIPPET_PENDING',
response: null
},
{
type: GET_SNIPPET_SUCCESS,
Expand Down
231 changes: 0 additions & 231 deletions src/app/views/App.spec.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/app/views/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Announced, getTheme, ITheme, styled } from '@fluentui/react';
import { Resizable } from 're-resizable';
import React, { Component } from 'react';
import { Component } from 'react';
import { injectIntl } from 'react-intl';
import { connect } from 'react-redux';
import { bindActionCreators, Dispatch } from 'redux';
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/app-sections/FeedbackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DirectionalHint, IconButton, IIconProps, TooltipHost } from '@fluentui/react';
import React, { useState } from 'react';
import { useState } from 'react';
import { translateMessage } from '../../utils/translate-messages';
import FeedbackForm from '../query-runner/request/feedback/FeedbackForm';
import { ACCOUNT_TYPE } from '../../services/graph-constants';
Expand Down
1 change: 0 additions & 1 deletion src/app/views/app-sections/HeaderMessaging.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Link, MessageBar, MessageBarType } from '@fluentui/react';
import React from 'react';
import { FormattedMessage } from 'react-intl';

import { getLoginType } from '../../../modules/authentication/authUtils';
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/app-sections/StatusMessages.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link, MessageBar } from '@fluentui/react';
import React, { Fragment } from 'react';
import { Fragment } from 'react';
import { FormattedMessage } from 'react-intl';
import { useDispatch } from 'react-redux';

Expand Down
1 change: 0 additions & 1 deletion src/app/views/app-sections/TermsOfUseMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Link, MessageBar, MessageBarType, styled } from '@fluentui/react';
import React from 'react';
import { FormattedMessage } from 'react-intl';
import { useDispatch } from 'react-redux';

Expand Down
2 changes: 1 addition & 1 deletion src/app/views/authentication/Authentication.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MessageBarType, Spinner, SpinnerSize, styled } from '@fluentui/react';
import { SeverityLevel } from '@microsoft/applicationinsights-web';
import React, { useState } from 'react';
import { useState } from 'react';
import { injectIntl } from 'react-intl';
import { useDispatch } from 'react-redux';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ActionButton, getId, getTheme, TooltipHost } from '@fluentui/react';
import React from 'react';
import { translateMessage } from '../../../utils/translate-messages';
import Profile from '../profile/Profile';
import { profileButtonStyles } from './ProfileButton.styles';
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/authentication/profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ActionButton, Callout, FontSizes, getTheme, IPersonaProps, IPersonaSharedProps, mergeStyleSets,
Persona, PersonaSize, Spinner, SpinnerSize, Stack, styled
} from '@fluentui/react';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { useDispatch } from 'react-redux';
import { useId } from '@fluentui/react-hooks';

Expand Down
4 changes: 2 additions & 2 deletions src/app/views/common/copy/CopyButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { IButton, IconButton, IIconProps, PrimaryButton } from '@fluentui/react';
import React, { useState } from 'react';
import { createRef, useState } from 'react';
import { translateMessage } from '../../../utils/translate-messages';

interface ICopyButtonProps {
Expand All @@ -18,7 +18,7 @@ export function CopyButton(props:ICopyButtonProps) {

const copyLabel: string = !copied ? translateMessage('Copy') : translateMessage('Copied');

const copyRef = React.createRef<IButton>();
const copyRef = createRef<IButton>();
const onSetFocus = () => copyRef.current!.focus();

const handleCopyClick = async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/common/image/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { IImageComponentProps } from '../../../../types/image';

export const Image = ({ styles, alt, body }: IImageComponentProps): JSX.Element => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/common/monaco/Monaco.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FocusZone } from '@fluentui/react';
import Editor, { OnChange, useMonaco } from '@monaco-editor/react';
import React, { useEffect } from 'react';
import { useEffect } from 'react';

import { ThemeContext } from '../../../../themes/theme-context';
import './monaco.scss';
Expand Down
Loading

0 comments on commit b1daf54

Please sign in to comment.