Commit 331bc173 by Boyko Committed by Dominik Prokop

Chore: Upgrade react, react-dom, react-test-renderer versions (#21130)

* Chore: Upgrade react, react-dom, react-test-renderer versions

* Chore: Normalize windows path for webpack plugin test

* Chore: Replace deprecated react-testing-hooks-library
parent f8fa140a
......@@ -16,6 +16,7 @@
"@babel/preset-typescript": "7.6.0",
"@emotion/core": "10.0.10",
"@rtsao/plugin-proposal-class-properties": "7.0.1-patch.1",
"@testing-library/react-hooks": "^3.2.1",
"@types/angular": "1.6.56",
"@types/angular-route": "1.7.0",
"@types/classnames": "2.2.7",
......@@ -46,7 +47,7 @@
"@types/react-redux": "7.1.2",
"@types/react-select": "2.0.15",
"@types/react-table": "6.8.5",
"@types/react-test-renderer": "16.8.2",
"@types/react-test-renderer": "16.9.0",
"@types/react-transition-group": "2.0.16",
"@types/react-virtualized": "9.18.12",
"@types/react-window": "1.7.0",
......@@ -56,6 +57,7 @@
"@types/slate": "0.47.1",
"@types/slate-plain-serializer": "0.6.1",
"@types/slate-react": "0.22.5",
"@types/testing-library__react-hooks": "^3.1.0",
"@types/tinycolor2": "1.4.2",
"angular-mocks": "1.6.6",
"autoprefixer": "9.5.0",
......@@ -119,9 +121,8 @@
"postcss-reporter": "6.0.1",
"prettier": "1.19.1",
"puppeteer-core": "1.15.0",
"react-hooks-testing-library": "0.3.7",
"react-hot-loader": "4.8.0",
"react-test-renderer": "16.8.4",
"react-test-renderer": "16.9.0",
"redux-mock-store": "1.5.3",
"regexp-replace-loader": "1.0.1",
"rimraf": "2.6.3",
......@@ -237,8 +238,8 @@
"prismjs": "1.16.0",
"prop-types": "15.7.2",
"rc-cascader": "0.17.5",
"react": "16.8.6",
"react-dom": "16.8.6",
"react": "16.12.0",
"react-dom": "16.12.0",
"react-grid-layout": "0.16.6",
"react-highlight-words": "0.11.0",
"react-loadable": "5.5.0",
......
......@@ -23,7 +23,8 @@ describe('Plugin webpack config', () => {
it('finds module.ts and module.tsx files', () => {
const moduleFiles = findModuleFiles('/', modulePathsMock);
expect(moduleFiles.length).toBe(2);
expect(moduleFiles).toEqual(['/some/path/module.ts', '/some/path/module.tsx']);
// normalize windows path - \\ -> /
expect(moduleFiles.map(p => p.replace(/\\/g, '/'))).toEqual(['/some/path/module.ts', '/some/path/module.tsx']);
});
});
});
......@@ -42,11 +42,11 @@
"rc-cascader": "0.17.5",
"rc-drawer": "3.0.2",
"rc-time-picker": "^3.7.2",
"react": "16.8.6",
"react": "16.12.0",
"react-calendar": "2.18.1",
"react-color": "2.17.0",
"react-custom-scrollbars": "4.2.1",
"react-dom": "16.8.6",
"react-dom": "16.12.0",
"react-highlight-words": "0.11.0",
"react-popper": "1.3.3",
"react-storybook-addon-props-combinations": "1.1.0",
......@@ -73,7 +73,7 @@
"@types/pretty-format": "20.0.1",
"@types/react": "16.8.16",
"@types/react-custom-scrollbars": "4.0.5",
"@types/react-test-renderer": "16.8.1",
"@types/react-test-renderer": "16.9.0",
"@types/react-transition-group": "2.0.16",
"@types/storybook__addon-info": "4.1.2",
"@types/storybook__react": "4.0.2",
......@@ -81,7 +81,7 @@
"common-tags": "^1.8.0",
"pretty-format": "24.9.0",
"react-docgen-typescript-loader": "3.3.0",
"react-test-renderer": "16.8.4",
"react-test-renderer": "16.9.0",
"rollup": "1.6.0",
"rollup-plugin-commonjs": "9.2.1",
"rollup-plugin-node-resolve": "4.0.1",
......
import { renderHook, act } from 'react-hooks-testing-library';
import { renderHook, act } from '@testing-library/react-hooks';
import LanguageProvider from 'app/plugins/datasource/loki/language_provider';
import { useLokiLabels } from './useLokiLabels';
import { AbsoluteTimeRange } from '@grafana/data';
......
import { renderHook, act } from 'react-hooks-testing-library';
import { renderHook, act } from '@testing-library/react-hooks';
import { AbsoluteTimeRange } from '@grafana/data';
import { CascaderOption } from '@grafana/ui';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment