Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency rxjs to ^6.5.3 #49837

Merged
merged 16 commits into from
Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
"reselect": "^3.0.1",
"resize-observer-polyfill": "^1.5.0",
"rison-node": "1.0.2",
"rxjs": "^6.2.1",
"rxjs": "^6.5.3",
"script-loader": "0.7.2",
"semver": "^5.5.0",
"style-it": "^2.1.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"exit-hook": "^2.2.0",
"getopts": "^2.2.5",
"moment": "^2.24.0",
"rxjs": "^6.2.1",
"rxjs": "^6.5.3",
"tree-kill": "^1.2.1",
"tslib": "^1.9.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/kbn-dev-utils/src/proc_runner/proc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) {

const outcome$: Rx.Observable<number | null> = Rx.race(
// observe first exit event
Rx.fromEvent(childProcess, 'exit').pipe(
Rx.fromEvent<[number]>(childProcess, 'exit').pipe(
take(1),
map(([code]: [number]) => {
map(([code]) => {
if (stopCalled) {
return null;
}
Expand Down
4,730 changes: 2,410 additions & 2,320 deletions packages/kbn-pm/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/kbn-pm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"ora": "^1.4.0",
"prettier": "^1.18.2",
"read-pkg": "^5.2.0",
"rxjs": "^6.2.1",
"rxjs": "^6.5.3",
"spawn-sync": "^1.0.15",
"string-replace-loader": "^2.2.0",
"strip-ansi": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"glob": "^7.1.2",
"parse-link-header": "^1.0.1",
"strip-ansi": "^5.2.0",
"rxjs": "^6.2.1",
"rxjs": "^6.5.3",
"tar-fs": "^1.16.3",
"tmp": "^0.1.0",
"xml2js": "^0.4.22",
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/ui/header/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ interface Props {
navLinks$: Rx.Observable<ChromeNavLink[]>;
recentlyAccessed$: Rx.Observable<ChromeRecentlyAccessedHistoryItem[]>;
forceAppSwitcherNavigation$: Rx.Observable<boolean>;
helpExtension$: Rx.Observable<ChromeHelpExtension>;
helpExtension$: Rx.Observable<ChromeHelpExtension | undefined>;
legacyMode: boolean;
navControlsLeft$: Rx.Observable<readonly ChromeNavControl[]>;
navControlsRight$: Rx.Observable<readonly ChromeNavControl[]>;
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/ui/header/header_help_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { HeaderExtension } from './header_extension';
import { ChromeHelpExtension } from '../../chrome_service';

interface Props {
helpExtension$: Rx.Observable<ChromeHelpExtension>;
helpExtension$: Rx.Observable<ChromeHelpExtension | undefined>;
intl: InjectedIntl;
kibanaVersion: string;
useDefaultContent?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/legacy/plugins/find_legacy_plugin_specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export async function findLegacyPluginSpecs(settings: unknown, loggerFactory: Lo
invalidDirectoryError$: Observable<{ path: string }>;
invalidPackError$: Observable<{ path: string }>;
otherError$: Observable<unknown>;
deprecation$: Observable<unknown>;
deprecation$: Observable<{ spec: LegacyPluginSpec; message: string }>;
invalidVersionSpec$: Observable<LegacyPluginSpec>;
spec$: Observable<LegacyPluginSpec>;
disabledSpec$: Observable<LegacyPluginSpec>;
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/plugins/discovery/plugins_discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { PluginsConfig } from '../plugins_config';
import { PluginDiscoveryError } from './plugin_discovery_error';
import { parseManifest } from './plugin_manifest_parser';

const fsReadDir$ = bindNodeCallback(readdir);
const fsReadDir$ = bindNodeCallback<string, string[]>(readdir);
const fsStat$ = bindNodeCallback(stat);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/lib/scan_delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { count, map, mergeAll, mergeMap } from 'rxjs/operators';
import { assertAbsolute } from './fs';

const getStat$ = Rx.bindNodeCallback(Fs.stat);
const getReadDir$ = Rx.bindNodeCallback(Fs.readdir);
const getReadDir$ = Rx.bindNodeCallback<string, string[]>(Fs.readdir);

interface Options {
directory: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { useRef, useEffect, useState } from 'react';
import React from 'react';
import classNames from 'classnames';
import { EuiLoadingChart, EuiProgress } from '@elastic/eui';
import { ExpressionAST, IExpressionLoaderParams, IInterpreterErrorResult } from './types';
import { ExpressionAST, IExpressionLoaderParams } from './types';
import { ExpressionLoader } from './loader';

// Accept all options of the runner as props except for the
Expand All @@ -35,7 +35,7 @@ export interface ExpressionRendererProps extends IExpressionLoaderParams {
interface State {
isEmpty: boolean;
isLoading: boolean;
error: null | Error;
error: null | { message: string };
}

export type ExpressionRenderer = React.FC<ExpressionRendererProps>;
Expand Down Expand Up @@ -82,7 +82,7 @@ export const ExpressionRendererImplementation = ({
}
setState(prevState => ({ ...prevState, isLoading: true }));
});
handlerRef.current.render$.subscribe((item: number | IInterpreterErrorResult) => {
handlerRef.current.render$.subscribe(item => {
if (!handlerRef.current) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,22 @@ import { share } from 'rxjs/operators';
import { event, RenderId, Data, IInterpreterRenderHandlers } from './types';
import { getRenderersRegistry } from './services';

interface RenderError {
type: 'error';
error: { type?: string; message: string };
}

export type IExpressionRendererExtraHandlers = Record<string, any>;

export class ExpressionRenderHandler {
render$: Observable<RenderId>;
render$: Observable<RenderId | RenderError>;
update$: Observable<any>;
events$: Observable<event>;

private element: HTMLElement;
private destroyFn?: any;
private renderCount: number = 0;
private renderSubject: Rx.Subject<unknown>;
private renderSubject: Rx.Subject<RenderId | RenderError>;
private eventsSubject: Rx.Subject<unknown>;
private updateSubject: Rx.Subject<unknown>;
private handlers: IInterpreterRenderHandlers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import { getElementPositionAndAttributes } from './get_element_position_data';
import { getScreenshots } from './get_screenshots';
import { skipTelemetry } from './skip_telemetry';

// NOTE: Typescript does not throw an error if this interface has errors!
interface ScreenshotResults {
timeRang: TimeRange;
timeRange: TimeRange;
screenshots: Screenshot[];
}

Expand All @@ -49,6 +48,7 @@ export function screenshotsObservableFactory(server: ServerFacade) {
browserTimezone,
});

// @ts-ignore this needs to be refactored to use less random type declaration and instead rely on structures that work with inference
return create$.pipe(
mergeMap(({ driver$, exit$ }) => {
const screenshot$ = driver$.pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ export class HeadlessChromiumDriverFactory {
}

getBrowserLogger(page: Page): Rx.Observable<ConsoleMessage> {
return Rx.fromEvent(page as NodeJS.EventEmitter, 'console').pipe(
tap((line: ConsoleMessage) => {
return Rx.fromEvent<ConsoleMessage>(page, 'console').pipe(
tap(line => {
if (line.type() === 'error') {
this.logger.error(line.text(), ['headless-browser-console']);
} else {
Expand All @@ -185,14 +185,14 @@ export class HeadlessChromiumDriverFactory {
);
}

getProcessLogger(browser: Browser): Rx.Observable<string> {
getProcessLogger(browser: Browser) {
const childProcess = browser.process();
// NOTE: The browser driver can not observe stdout and stderr of the child process
// Puppeteer doesn't give a handle to the original ChildProcess object
// See https://github.com/GoogleChrome/puppeteer/issues/1292#issuecomment-521470627

// just log closing of the process
const processClose$: Rx.Observable<string> = Rx.fromEvent(childProcess, 'close').pipe(
const processClose$ = Rx.fromEvent<void>(childProcess, 'close').pipe(
tap(() => {
this.logger.debug('child process closed', ['headless-browser-process']);
})
Expand All @@ -201,17 +201,15 @@ export class HeadlessChromiumDriverFactory {
return processClose$; // ideally, this would also merge with observers for stdout and stderr
}

getPageExit(browser: Browser, page: Page): Rx.Observable<never> {
const pageError$: Rx.Observable<never> = Rx.fromEvent(page, 'error').pipe(
mergeMap((err: Error) => Rx.throwError(err))
);
getPageExit(browser: Browser, page: Page) {
const pageError$ = Rx.fromEvent<Error>(page, 'error').pipe(mergeMap(err => Rx.throwError(err)));

const uncaughtExceptionPageError$: Rx.Observable<never> = Rx.fromEvent(page, 'pageerror').pipe(
mergeMap((err: Error) => Rx.throwError(err))
const uncaughtExceptionPageError$ = Rx.fromEvent<Error>(page, 'pageerror').pipe(
mergeMap(err => Rx.throwError(err))
);

const pageRequestFailed$: Rx.Observable<never> = Rx.fromEvent(page, 'requestfailed').pipe(
mergeMap((req: PuppeteerRequest) => {
const pageRequestFailed$ = Rx.fromEvent<PuppeteerRequest>(page, 'requestfailed').pipe(
mergeMap(req => {
const failure = req.failure && req.failure();
if (failure) {
return Rx.throwError(
Expand Down
5 changes: 2 additions & 3 deletions x-pack/legacy/plugins/siem/public/store/timeline/epic_note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ export const epicPersistNote = (

export const createTimelineNoteEpic = <State>(): Epic<Action, Action, State> => action$ =>
action$.pipe(
withLatestFrom(),
filter(([action]) => timelineNoteActionsType.includes(action.type)),
switchMap(([action]) => {
filter(action => timelineNoteActionsType.includes(action.type)),
switchMap(action => {
dispatcherTimelinePersistQueue.next({ action });
return empty();
})
Expand Down
2 changes: 1 addition & 1 deletion x-pack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
"reselect": "3.0.1",
"resize-observer-polyfill": "^1.5.0",
"rison-node": "0.3.1",
"rxjs": "^6.2.1",
"rxjs": "^6.5.3",
"semver": "5.7.0",
"squel": "^5.13.0",
"stats-lite": "^2.2.0",
Expand Down
30 changes: 1 addition & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24592,41 +24592,13 @@ rxjs@^5.0.0-beta.11, rxjs@^5.5.0, rxjs@^5.5.2:
dependencies:
symbol-observable "1.0.1"

rxjs@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.1.0.tgz#833447de4e4f6427b9cec3e5eb9f56415cd28315"
integrity sha512-lMZdl6xbHJCSb5lmnb6nOhsoBVCyoDC5LDJQK9WWyq+tsI7KnlDIZ0r0AZAlBpRPLbwQA9kzSBAZwNIZEZ+hcw==
dependencies:
tslib "^1.9.0"

rxjs@^6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.1.tgz#246cebec189a6cbc143a3ef9f62d6f4c91813ca1"
integrity sha512-OwMxHxmnmHTUpgO+V7dZChf3Tixf4ih95cmXjzzadULziVl/FKhHScGLj4goEw9weePVOH2Q0+GcCBUhKCZc/g==
dependencies:
tslib "^1.9.0"

rxjs@^6.3.3:
rxjs@^6.1.0, rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.5.1, rxjs@^6.5.3:
version "6.5.3"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a"
integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==
dependencies:
tslib "^1.9.0"

rxjs@^6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504"
integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==
dependencies:
tslib "^1.9.0"

rxjs@^6.5.1:
version "6.5.2"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7"
integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==
dependencies:
tslib "^1.9.0"

[email protected]:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
Expand Down