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 new-platform dependencies. #13338

Merged

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Aug 4, 2017

Most of the changes in the source code are caused by node 8 typings.

I won't merge this PR until it's clear what to do with defaultEncoding, see bug I filed nodejs/node#14611. Same thing is related to node 6, i.e. master branch.

/cc @kjbekkelund

export function captureTerminal<T extends string[]>(
fn: (argv: T) => any,
argv: T
) {
const _exit = process.exit;
const _emit = process.emit;
let mockProcessExit = jest.spyOn(global.process, 'exit')
Copy link
Member Author

@azasypkin azasypkin Aug 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I wouldn't touch this file at all but the problem is that in node 8 typings process.exit has never return type that is incompatible with void so it's hard to simulate in tests (it should never return). spyOn was an easy solution :)

@@ -1,7 +1,7 @@
import { pick } from '../../../lib/utils';

export interface Headers {
[key: string]: string;
[key: string]: string | string[];
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corresponds to new node 8 typings.

@@ -23,8 +23,8 @@
"html"
],
"globals": {
"__TS_CONFIG__": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azasypkin azasypkin force-pushed the issue-xxx-update-node-types branch from 080d5f4 to 0d2ed49 Compare August 8, 2017 13:49
@azasypkin
Copy link
Member Author

Okay, there is no any movement in the node issue mentioned above, so I'll merge this PR and keep tracking that issue for any updates.

@azasypkin azasypkin merged commit 32b12c7 into elastic:new-platform Aug 8, 2017
@azasypkin azasypkin deleted the issue-xxx-update-node-types branch August 8, 2017 13:50
@kimjoar kimjoar added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants