[Logs + Metrics UI] Update constate and remove unused legacy v… (#48752)

This removes the outdated and unused 0.x version of `constate` and instead depends on a recent version. It also removes the aliasing to `constate-latest`.

closes #48606
This commit is contained in:
Felix Stürmer 2019-10-21 19:36:36 +02:00 committed by GitHub
parent 3236509ffc
commit a1e3a3e24d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 39 additions and 48 deletions

View file

@ -817,14 +817,6 @@
'@types/tinycolor2',
],
},
{
groupSlug: 'xml2js',
groupName: 'xml2js related packages',
packageNames: [
'xml2js',
'@types/xml2js',
],
},
{
groupSlug: 'xml-crypto',
groupName: 'xml-crypto related packages',
@ -833,6 +825,14 @@
'@types/xml-crypto',
],
},
{
groupSlug: 'xml2js',
groupName: 'xml2js related packages',
packageNames: [
'xml2js',
'@types/xml2js',
],
},
{
groupSlug: 'intl-relativeformat',
groupName: 'intl-relativeformat related packages',

View file

@ -4,7 +4,6 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { Provider as ConstateProvider } from 'constate';
import { createHashHistory } from 'history';
import React from 'react';
import { ApolloProvider } from 'react-apollo';
@ -46,19 +45,17 @@ export async function startApp(libs: InfraFrontendLibs) {
<I18nContext>
<UICapabilitiesProvider>
<EuiErrorBoundary>
<ConstateProvider devtools>
<ReduxStoreProvider store={store}>
<ApolloProvider client={libs.apolloClient}>
<ApolloClientContext.Provider value={libs.apolloClient}>
<EuiThemeProvider darkMode={darkMode}>
<HistoryContext.Provider value={history}>
<PageRouter history={history} />
</HistoryContext.Provider>
</EuiThemeProvider>
</ApolloClientContext.Provider>
</ApolloProvider>
</ReduxStoreProvider>
</ConstateProvider>
<ReduxStoreProvider store={store}>
<ApolloProvider client={libs.apolloClient}>
<ApolloClientContext.Provider value={libs.apolloClient}>
<EuiThemeProvider darkMode={darkMode}>
<HistoryContext.Provider value={history}>
<PageRouter history={history} />
</HistoryContext.Provider>
</EuiThemeProvider>
</ApolloClientContext.Provider>
</ApolloProvider>
</ReduxStoreProvider>
</EuiErrorBoundary>
</UICapabilitiesProvider>
</I18nContext>

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useMemo, useState, useEffect } from 'react';
import { kfetch } from 'ui/kfetch';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useMemo } from 'react';
import { useTrackedPromise } from '../../../utils/use_tracked_promise';
import { callDeleteJobs, callStopDatafeed, callGetJobDeletionTasks } from './api/ml_cleanup';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useMemo, useCallback, useEffect } from 'react';
import { callGetMlModuleAPI } from './api/ml_get_module';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useMemo, useEffect } from 'react';
import { useLogEntryRate } from './log_entry_rate';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { isString } from 'lodash';
import React, { useContext, useEffect, useMemo, useState } from 'react';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useState, useContext } from 'react';
import { useLogEntryHighlights } from './log_entry_highlights';

View file

@ -5,7 +5,7 @@
*/
import { i18n } from '@kbn/i18n';
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useState } from 'react';
export type TextScale = 'small' | 'medium' | 'large';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import React, { useContext, useState, useMemo, useCallback } from 'react';
import { isNumber } from 'lodash';
import moment from 'moment';

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useState, useEffect, Dispatch, SetStateAction } from 'react';
import { MetricsExplorerColor } from '../../../common/color_palette';
import {

View file

@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import createContainer from 'constate-latest';
import createContainer from 'constate';
import { useEffect, useMemo, useState } from 'react';
import {

View file

@ -109,8 +109,8 @@
"@types/tar-fs": "^1.16.1",
"@types/tinycolor2": "^1.4.1",
"@types/uuid": "^3.4.4",
"@types/xml2js": "^0.4.5",
"@types/xml-crypto": "^1.4.0",
"@types/xml2js": "^0.4.5",
"abab": "^1.0.4",
"ansicolors": "0.3.2",
"axios": "^0.19.0",
@ -139,10 +139,10 @@
"graphql-code-generator": "^0.18.2",
"graphql-codegen-add": "^0.18.2",
"graphql-codegen-introspection": "^0.18.2",
"graphql-codegen-typescript-resolvers": "^0.18.2",
"graphql-codegen-typescript-common": "^0.18.2",
"graphql-codegen-typescript-server": "^0.18.2",
"graphql-codegen-typescript-client": "^0.18.2",
"graphql-codegen-typescript-common": "^0.18.2",
"graphql-codegen-typescript-resolvers": "^0.18.2",
"graphql-codegen-typescript-server": "^0.18.2",
"gulp": "4.0.2",
"gulp-mocha": "^7.0.2",
"gulp-multi-process": "1.3.1",
@ -194,8 +194,8 @@
"@elastic/ctags-langserver": "^0.1.11",
"@elastic/datemath": "5.0.2",
"@elastic/ems-client": "1.0.5",
"@elastic/filesaver": "1.1.2",
"@elastic/eui": "14.5.0",
"@elastic/filesaver": "1.1.2",
"@elastic/javascript-typescript-langserver": "^0.3.3",
"@elastic/lsp-extension": "^0.1.2",
"@elastic/maki": "6.1.0",
@ -235,8 +235,7 @@
"chroma-js": "^1.4.1",
"classnames": "2.2.6",
"concat-stream": "1.6.2",
"constate": "^0.9.0",
"constate-latest": "npm:constate@^1.2.0",
"constate": "^1.2.0",
"content-disposition": "0.5.3",
"copy-to-clipboard": "^3.0.8",
"cronstrue": "^1.51.0",

View file

@ -8638,15 +8638,10 @@ constants-browserify@^1.0.0:
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=
"constate-latest@npm:constate@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/constate/-/constate-1.2.0.tgz#2e1e608a8ecb91381fb850810ace712f1e45a504"
integrity sha512-cdcCg5MFSIU1sq091lpqi7RhY0KB6zYuSFtYOF9fLQRaudZVybRo7IahFxi7vvtfsuAysrTPAMmv5FDHLJ6K8Q==
constate@^0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/constate/-/constate-0.9.0.tgz#877197ef8fbcacee95672a7e98f7b21dec818891"
integrity sha512-Cgkqefi4GrepnA7gwqbrsU+Kf/xl0sPv3O1UNE/vUZtTgpWlkd+/rSZjjd7npICtExn6yuICro7Vb2zoFCnS/A==
constate@^1.2.0:
version "1.3.2"
resolved "https://registry.yarnpkg.com/constate/-/constate-1.3.2.tgz#fa5f0fc292207f1ec21b46a5eb81f59c8b0a8b84"
integrity sha512-aaILV4vXwGTUZaQZHS5F1xBV8wRCR0Ow1505fdkS5/BPg6hbQrhNqdHL4wgxWgaDeEj43mu/Fb+LhqOKTMcrgQ==
contains-path@^0.1.0:
version "0.1.0"