Commit graph

856 commits

Author SHA1 Message Date
Jonathan Budzenski d112a6a1ee
Update package.json (#20353)
* Update package.json

* skip root before resolving
2018-09-17 11:46:03 -05:00
dave.snider@gmail.com f1eb1f2e93
EUI 4.0.1 (#23009) 2018-09-13 16:14:17 -07:00
Spencer b55705e9b4
[ts] enable support for iterators in browsers (#22986)
I was surprised when I tried to spread a `Set` in TypeScript and the browser complained about `Set.slice()` not being defined. This is because TypeScript does not automatically enable support for iterators when targeting earlier ES versions, like we do in the browser, unless you use the `"downlevelIteration": true` compiler option. This injects some helpers into the necessary files for reading/spreading iterators, which can be stuffed behind an import statement with using the `"importHelpers": true` compiler option and include `tslib` in our dependencies. This is already a dependency of several of our packages, so it shouldn't cause any additional modules.
2018-09-13 14:18:13 -07:00
Nathan Reese 5f6a9a628e
bump EUI to 3.11.0 (#22745)
* bump EUI to 3.9.0

* add @types/react-virtualized

* remove react-virtualized from x-pack package.json

* bump to 3.11.0
2018-09-13 06:20:01 -06:00
Spencer 6ded193260 Upgrade to TypeScript 3 (#22792)
LGTM 🎉 🎉 🎉
2018-09-11 08:38:41 +03:00
Spencer 7e94eccc2e
Upgrade to Jest 23.5.0 (#22791)
I'd really like to upgrade to Typescript 3 for its `unknown` type, but we need to upgrade to `jest@23` to support a recent version of `ts-jest@23`. 

The [jest changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) breaks down the breaking changes in 23.x, but I found it to be slightly incomplete so I've broken down the changes that actually caused breaks for us here, and addressed each in individual commits to make review a little easier:

- the `testURL` config default was changed from `about:blank` to `http://localhost`
    - this cause some XHR requests powered by JSdom to start failing. It seems these requests just do nothing in master but start to fail when JSdom is initialized with an actual URL... I think we would ideally stop sending meaningless XHR requests in the tests, but it was a lot easier to just set the config to `about:blank` for now, and we can worry about cleanup later if necessary
- `expect(...).toThrow()` only passes if an actual error was thrown.
     - In two places in the index pattern code we were throwing strings, which broke the assertions. Fortunately/Unfortunately the errors are not being consumed by anything, so I was able to wrap them in `new Error()` without causing any issues.
- snapshots of mock functions now include a `results` array, detailing the return values of the function
- React fragments are now serialized as `<React.Fragment>` instead of `<UNDEFINED>`
- undefined props in React components are now stripped from snapshots
- minor changes to the ordering of mocks, imports resolution, and before hooks caused the uiSettings API tests to start breaking, but I'm replacing them with totally new tests in #22694 so I just deleted them here
- mocks created with `jest.spyOn()` that are restored now have their `mock.calls` reset, so some of the kbn-pm tests stated failing. This was fixed by restoring them with `jest.restoreAllMocks()` rather than trying to do it before the assertions
2018-09-07 18:36:13 -07:00
Stacey Gammon c9b1d7ad7f
Typings for chromium driver (#22688)
* Typings for chromium driver

* buffer => base64

* remove unused param. consolidate imports
2018-09-07 16:01:39 -04:00
Aleh Zasypkin 3d6de7cbc4
Implement LegacyService. Use core to start legacy Kibana. (#22190)
* Implement `LegacyService`. Use `core` to start legacy Kibana.

* Fix Worker tests

* Do not rely on kbnServer when testing mixins.
2018-09-06 18:39:04 +03:00
Felix Stürmer 3c8d8c622f
Update redux, ,react-redux and corresponding types (#22442) 2018-08-29 13:18:46 +02:00
Søren Louv-Jansen 36a922e0f6
Bump backport to 4.4.1 (#22456)
* Bump backport to 4.4.1

* Update lock file
2018-08-29 00:29:42 +02:00
Spencer c7d451c9a2
[ftr] capture test output and only log on failure (#21903)
This is an attempt to write a log capture integration for the functional test runner that will collect all log output written during a test, prevent it from being written to stdout to lower the amount of work Jenkins master has to do and include the entire log output for each test in the junit report. I'm slightly concerned about the amount of memory we'll be using to store a copy of the logs for each test, but streaming the XML report isn’t easy and there doesn’t seem to be a library out there to help. If we decide it’s torally necessary we might be able to figure it out.
2018-08-27 17:26:30 -07:00
Larry Gregory 1cf1fb7ca0
Bump EUI to 3.7.0 (#22287)
Upgrades EUI from 3.6.1 => 3.7.0
2018-08-24 07:43:01 -04:00
Leanid Shutau ceafa483be
Add ability to skip file writing for messages extraction tool (#21588)
* Add ability to skip 'en.json' file writing for default messages extraction tool

* Update default messages extractor

* Add namespace validation

* Update tests

* Fix i18n config file

* Add ability to choose output JSON format

* Update output json properties keys
2018-08-22 14:57:32 +03:00
Jonathan Budzenski 5df22e531f
Bump node to 8.11.4 (#22048) 2018-08-16 13:05:17 -05:00
dave.snider@gmail.com f089427f84
EUI 3.6.1 (#22034) 2018-08-15 16:33:27 -07:00
Jonathan Budzenski 351cf92d36
Bump chromedriver to 2.41.0 (#21798) 2018-08-15 13:31:39 -05:00
Nathan Reese 67401cea92
Eui 3.6.0 (#21968)
* bump EUI to 3.6.0

* replace CopyButton with EuiCopy

* remove snapshot file from deleted CopyButton component
2018-08-15 06:46:35 -06:00
Jen Huang 1e6fb80be2
Upgrade to EUI 3.4.0 (#21870)
* Upgrade to EUI 3.4.0
* Update snapshots
2018-08-14 08:42:24 -07:00
archana 4ebd3d3534
[rxjs] Establish interop of rxjs-6 and kbn-observable (#21722)
* [rxjs] Establish interop of rxjs-6 and kbn-observable
* Remove symbol-observable
2018-08-13 13:45:02 -05:00
Jonathan Budzenski 31eee3238d
[build] more cleaning (#21746)
* [build] remove npm

* remove angular-ui-bootstrap

* fix

* remove bodyParser, fetch mock to dev

* remove more packages

* remove check-hash;

* remove babel-eslint

* remove marked-text-renderer

* move fetch-mock to dev dependencies

* Revert "remove babel-eslint"

This reverts commit 37d3df9146cdab24661022b9edf4aa2fd3b14e30.

* fix npm path

* fix again

* remove entire node_modules dir

* CleanNodeTask -> CleanNodeBuildsTask

* move to node folder

* remove more
2018-08-13 12:28:23 -05:00
Stacey Gammon 62f35df89b
typescript more dashboard panel code (#21810)
* typescript more dashboard panel code

* use ? instead of | undefined
2018-08-12 06:53:13 -04:00
Tyler Smalley 8769110adf
[scss] Adds autoprefixer support and improves watcher (#21656)
This adds support for autoprefixer which we have been using in Webpack.

Additionally, we have improved the watching functionality and now update builds based directly on their dependencies an not an assumption that the files are children.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-08-10 14:24:14 -07:00
Jonathan Budzenski 9cf108c01d
Remove contributors from package.json (#21815) 2018-08-10 13:12:28 -05:00
Spencer 141a97d93c
[TypeScript] add type-check script (#19325)
* [TypeScript] add type-check script

* [ci] run scripts/type_check after linting

* [ts] improve filterProjectsByFlag readability

* fix typo

* simplify type signature
2018-08-09 17:19:24 -07:00
Tiago Costa 06f76ccf6c Upgrade uglifyJS webpack plugin, disabling compress and enabling parallel (#21809) 2018-08-08 16:00:14 -07:00
Felix Stürmer 1211efdf40
Upgrade prettier to version 1.14.0 (#21466)
This upgrades prettier to version 1.14.0. The main motivation is to gain support for the new TypeScript language features introduced in 2.9 and 3.0.

Prettier versions 1.13 and 1.14 also introduced some other JavaScript and TypeScript style improvements resulting in a few small line break and parenthesis changes.

The relevant release notes are:

* [Prettier 1.13.0 Release Notes](https://prettier.io/blog/2018/05/27/1.13.0.html)
* [Prettier 1.40.0 Release Notes](https://prettier.io/blog/2018/07/29/1.14.0.html)
2018-07-31 15:30:36 +02:00
Nathan Reese 9846120752
bump EUI to 3.2.1 (#21425)
* bump EUI to 3.2.1

* use restrictWidth instead of custom CSS
2018-07-30 16:17:05 -06:00
Spencer 1532c5e9aa
Migrate ui/notify/fatal_error to new platform (#20752)
Fixes #20695

Extracts the "fatal error" handling logic from the `ui/notify` module and reimplements it in the new platform, using EUI for the fatal error page and continuing to support the `fatalError()` and `addFatalErrorCallback()` methods exported by the `ui/notify` module.

![image](https://user-images.githubusercontent.com/1329312/43032175-d37fbafc-8c65-11e8-8f1f-da71f0dac014.png)
2018-07-30 15:06:31 -07:00
Nathan Reese 588bf14dd5
add mutation observer polyfill for jest test env (#20996)
* add mutation observer polyfill for jest test env

* use polyfill from npm

* set bluebird scheduler

* use correct version in comment about bluebird
2018-07-30 08:17:57 -06:00
dave.snider@gmail.com 787c7a246a
EUI@3.0.3 (#21363) 2018-07-27 11:10:02 -07:00
Brandon Kobel 0870fd8f0a
Updating minimatch (#21050) 2018-07-27 07:30:17 -04:00
Brandon Kobel 15e3e59249
Switching from jade to pug (#21047)
* Upgrading pug

* Switching .jade to .pug and fixing templates

* Renaming the I18N usages of jade to pug

* No more jade in I18N
2018-07-27 07:21:27 -04:00
archana d1cb0a44f5
Deprecate test:ui commands (#21092)
* Deprecate test:ui commands
2018-07-23 14:48:27 -05:00
Søren Louv-Jansen 9a13bb0924
Bump backport to 4.2.0 (#21083) 2018-07-23 16:30:19 +02:00
Spencer b434652452
[kfetch] TypeScript-ify (#20914)
In order to make the awesome new kfetch api easier to consume in purely TypeScript projects, and since it's a pretty small module with very few dependencies, I converted it to TypeScript.

Along with kfetch I also started a type definition file for `ui/chrome` that we can extend as we go, but will likely be unnecessary after #19992
2018-07-19 06:31:44 -07:00
Tim Roes 41fd042798
Move del to dependencies (#20921) 2018-07-18 13:55:23 +02:00
Stacey Gammon e90f652875
Bump eui (#20774)
* bump eui

* Fixed breaking `EuiPage` changes

Mainly adding `EuiPageBody`’s where there were none

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* bump eui

* bump to 3.0, remove duplicate declaration of EuiFlyoutBody, update jest snapshots

* Update jest snapshots in xpack
2018-07-17 19:28:07 -04:00
Leanid Shutau 9c9159ce0c
Implement a build tool for default messages extraction (#19620)
* Implement a build tool for default messages extraction

* Refactor extraction tool, resolve review comments, fix bugs

* Resolve comments, refactor extraction tool, fix bugs

* Add context to messages extraction tool

* Resolve comments

* Fix bugs

* Add messages extraction from .jade files, refactor code

* Add template literals parsing

* Return defaultMessages.json to plain structure

* Refactor utils

* Fix bugs

* Refactor code, resolve review comments, fix bugs

* Fix minor bug

* Get rid of '@babel/traverse' and add its native implementation

* Add handlebars messages extraction

* Fix mkdir on macOS

* Fix bugs, inject default formats, finalize the tool

* Fix filsystem permissions

* Refactor nodes traversal

* Update code style

* Downgrade @babel/types to fix build issues

* Resolve comments

* Fix minor bugs
2018-07-17 15:56:55 +03:00
Felix Stürmer 4b255e9fe9
Upgrade typescript to 2.9.2 (#20757)
This upgrades TypeScript to version 2.9.2. My main motivation is the support for generic type arguments in JSX elements and tagged templates (e.g. for `styled-components`).

Problems arising from breaking changes in the new TypeScript version have been mitigated by:

* setting the `keyofStringsOnly` option until impacted code has been
  future-proofed
* Restricting some joi-related generics

See the [release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html) for details.

Some follow-up tasks should be:

* Update EUI to support the new `keyof` behaviour
* Update new platform TypeScript code to support new `keyof` behaviour
* Remove `keyofStringsOnly` setting
2018-07-17 00:31:05 +02:00
Tiago Costa b142f80d7d
Match chalk dependency version on kibana with the one used on x-pack (#20621)
* chore(NA): match chalk dependency version on kibana with x-pack to ^2.3.2.

* chore(NA): bump chalk version dependencies and update lock files.
2018-07-13 00:26:57 +01:00
CJ Cenizal d04bc1f324
Add ability to abort a kfetch call. (#20700)
* Split kfetch module into kfetch and kfetchAbortable sub-modules.
* Add abortcontroller-polyfill.
2018-07-12 16:11:24 -07:00
Aleh Zasypkin 1418310748
Integrate new platform (core) server side into Kibana (#18951)
Co-authored-by: Kim Joar Bekkelund <kjbekkelund@gmail.com>
Co-authored-by: archana <archanid@users.noreply.github.com>
Co-authored-by: Spencer <spalger@users.noreply.github.com>
Co-authored-by: Court Ewing <court@epixa.com>
2018-07-11 11:19:35 +03:00
Tim Roes bd52c60742
Typescriptify ResizeChecker and render complete (#20531)
* Typescriptify ResizeChecker and render complete

* Simplify getSize method
2018-07-09 12:19:29 +02:00
Nathan Reese 61d7b918c3
Upgrade to EUI 1.1.0 (#20411)
* Upgrade to EUI 1.0.1

* upgraded to eui 1.1.0

* fix setInspectorTablePageSize function in functional tests

* better comment about basic table pagination buttons
2018-07-06 12:15:55 -06:00
Maxim Tolochko f522b31ac9
Add draft implementation of I18n engine (#19555)
* Add draft implementation of I18n engine

* Add i18n loader

* kbn-i18n refactoring

* Fix react i18n context and update doc

* i18n engine refactoring

* Fix locales data loading and add more jsdoc comments

* Fix verify_translations task

* I18n tests refactoring

* Add build scripts to kbn-i18n package

* Fix some bugs

* Move uiI18nMixin into ui_i18n folder

* Add 'browser' field to kbn-i18n package.json

* Get rid of "showError" method

* Make i18n and i18nLoader a singleton object

* Add default locale as fallback if translation files were not registered

* Update yarn.lock

* kbn-i18n fix

* Add default formats

* Try to fix build

* Add more examples into kbn-i18n/README.md

* kbn-i18n fix

* Fix app_bootstrap tests

* Add links to issues in TODO comments
2018-06-28 12:38:39 +03:00
Tim Roes 3ec284c26b
Update makelogs to 4.1.0 (#20232) 2018-06-27 11:48:58 +02:00
Aleh Zasypkin 18037984da
Upgrade rxjs: 6.1.0 ---> 6.2.1. (#20209) 2018-06-25 20:04:19 +02:00
Tim Roes a5810bad98
Add AggTypeFilters to filter out aggs in editor (#19913)
* Add AggTypeFilters to filter out aggs in editor

* Add documentation

* Implement CJ's feedback

* Add link to missing vis variable

* Fix for RxJS 6

* Add babel-core types and fix tests

* Pass index pattern instead of vis

* Fix documentation
2018-06-25 10:34:18 +02:00
Stacey Gammon 2c1fcf9604
Typescript-ify screenshot stitcher code in reporting (#20061)
* typescript screenshot stitcher

* Throw an error if the data captured is not of the expected width and height.

* Import babel-core types

* Add babel-core types to x-pack package.json

* Dimensions => Rectangle
2018-06-22 09:18:29 -04:00
Tyler Smalley 699fb251eb
Adds SCSS support for plugins (#19643)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-06-21 16:25:29 -07:00