Commit graph

856 commits

Author SHA1 Message Date
Spencer 8a7ed713fd
[6.x] [npm] upgrade to RxJS 6 (#18885) (#20006)
* [npm] upgrade to RxJS 6 (#18885)

This PR upgrades RxJS to version 6 and switches to a fork of `stream-to-observable` which includes an updated version of `any-observable` that supports RxJS 6 until https://github.com/jamestalmage/stream-to-observable/pull/10 is merged. The primary change in this version of RxJS is the movement of stream operators from `Obersable.prototype` to the `rxjs/operators` module. Some of the operators, like `catch` and `do`, have been renamed (`catchError`, and `tap`). The Obsevable factories have also been moved from static methods on the `Observable` class to named exports of the root `rxjs` module. Some of those factories have also changed slightly, like `fromEvent` which now emits arrays if the event handler is called with multiple arguments.

```js
// import the Rx namespace to get the Observable factories
import * as Rx from 'rxjs';
// import the operators as named imports
import { map, tap, switchMap } from 'rxjs/operators';
```

* [rxjs/dev-utils] fix old operator usage

* [rxjs/dev-utils] remove one more old operator
2018-06-18 12:47:51 -07:00
Tiago Costa f0c7782904
chore(19502): change license checker and generator behaviour to only add dev dependencies with --dev flag. (#19626) (#19825) 2018-06-12 09:15:44 -07:00
Spencer 4f29b323bf
Backport/19383/6.x (#19487)
* [eslint][tslint] require Apache 2.0 license headers

(cherry picked from commit 337fea30b9)

* [kbn-eslint-plugin-license-header] don't try to fix files with hashbangs

(cherry picked from commit db79f1501e)

* [eslint][tslint] autofix license headers
2018-05-28 20:24:23 -07:00
Spencer 068b6652c0
[6.x] Check filename casing in CI (#19282) (#19414)
Backports the following commits to 6.x:
 - Check filename casing in CI  (#19282)
2018-05-24 23:09:30 -07:00
spalger 73173f11c3 Revert "enable verbose ftr logging"
This reverts commit 887e528055.
2018-05-24 13:23:57 -07:00
Spencer 37487a8472
[6.x] [tslint] lint typescript code (#19105) (#19331)
Backports the following commits to 6.x:
 - [tslint] lint typescript code  (#19105)
2018-05-22 15:27:06 -07:00
Spencer 07f4e5ad77
[6.x] [typescript] add typescript support for the server and browser (#19104) (#19223)
Backports the following commits to 6.x:
 - [typescript] add typescript support for the server and browser  (#19104)
2018-05-21 10:42:59 -07:00
archana eae18989a3
Functional test setup with kbn-test package (#18568) (#19174)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-17 13:42:43 -05:00
Spencer 7dbec2e1e7
[6.x] [mocha] remove grunt-simple-mocha (#19079) (#19139)
* [mocha] run tests with mocha script, remove grunt-simple-mocha

* [ci] force colored output

* [ci] disable color when reading the yarn bin

* [dev/build/exec] support tooling log having its own chalk

* [dev/mocha] avoid changing the cwd of the process

* [dev/mocha] only match files, speed up negative matches

* [cli/serve/test] strip ansi control characters from logs

* [ci] disable color in all `yarn bin` invocations

* [dev/mocha] cleanup old runInBand check

* [dev/mocha] enable gloabl leak checks
2018-05-16 16:25:59 -07:00
spalger 7df7ab92d6 Revert "Functional test setup with kbn-test package (#18568)"
This reverts commit c2265e3931.
2018-05-15 13:16:36 -07:00
archana c2265e3931 Functional test setup with kbn-test package (#18568)
Restructure testing with kbn-test package

 - Run with multiple configs, move cli options to config
 - Package-ify kbn-test
 - Eventually we'll have functional_test_runner live in a package
of its own, and then this kbn-test will use that as a dependency,
probably still as a devDependency.
 - Implement functional_tests_server
 - Collapse single and multiple config apis into one command

Use kbn-es

Replace es_test_cluster + es_test_config with kbn/test utils

Implement new createEsTestCluster

Improve scripts, jsdocs, cli top-level tools

Lift error handling to the top level
2018-05-15 12:33:01 -05:00
Søren Louv-Jansen d47b685e54
Align x-pack and kibana devDeps (#19022) (#19047)
* Align Node deps

* Added grunt task

* Update name
2018-05-15 02:19:09 +02:00
Jenkins CI bc5b51554d Migrate x-pack-kibana source to kibana 2018-04-24 13:49:26 -07:00
Spencer 383d590cb3
[grunt] remove .rej file check (#17805) (#17806)
The old backport tool we used, Jasper, would create PRs with .rej files
when it couldn't merge a backport cleanly. That lead to this task which
would skip the tests if .rej files were found. Now we don't use Jasper
and this check takes about 1 minute to run on CI, so we can remove it
and save some time.
2018-04-20 02:26:25 -07:00
Spencer 7621b410f9
[6.x] Move to Yarn 1.6.0 (#17741) (#17749) 2018-04-17 10:35:22 -07:00
Aleh Zasypkin 2fe8a8c099
[kbn/pm] Get rid of --skip-kibana in favour of --exclude kibana. (#17686) 2018-04-12 21:57:03 +02:00
archana a03e37cb9c
[CLI] Readable logs on Windows with chalk colors (#15557) (#17636)
* [colors] try new cli colors

* [colors] try magentaBright instead of magenta

* [colors] try white for log text

* [colors] replace all remaining ansicolors with chalk

* [colors] try yellowBright instead of yellow

* remove ansicolors from package.json

* [tests] attempt to fix tests

* [tests] attempt to fix tests again

* [color] backgrounds, cleanup

* [color] update yarn.lock
2018-04-10 10:57:56 -05:00
Spencer a16fa8422e
[6.x] Using Jest on all tests in src/server (#16373) (#17553)
* Move src/server to Jest

* ESLint overrides for src/server tests

* Rename files

* Fix renamed files

* Remove unnecessary changes

* Remove exclude of src/server tests
2018-04-04 16:13:01 -07:00
Spencer af79bdb5fc
[6.x] Add/generate/verify NOTICE.txt file (#17504) (#17550)
* [dev/notice] add scripts for generating NOTICE.txt file

* [notice] react-resize-detector@0.6.0 was removed in b445389b79

* [notice] move notice text into relevant source

* [dev/notice] Generate NOTICE.txt file

* [jenkins] verify that notice.txt is up to date in CI

* [tasks/notice] update test to use new NOTICE.txt file

* [dev/notice] update company name in NOTICE.txt

* [notice/cli] exit with 0 when --help requested

* [notice/cli] add helpful logging

* [notice/cli] use --validate flag name instead

* [notice/cli] simplify NEWLINE_RE, ignore obscure line endings

* [utils/decode_geo_hash] fixup comment

* [utils/decode_geo_hash] remove useless comment
2018-04-04 11:52:58 -07:00
Spencer c462488853
[licenses] resolve license for private:true packages (#17537) (#17547)
* [licenses] resolve license for private:true packages

* [licenses] remove outdated test

* [licenses] fix test
2018-04-04 09:35:30 -07:00
Jen Huang c0b715dde7
Add aria-label attributes to indexed fields table, and use EuiIconTip (#17427) (#17436)
* Add aria-label attributes to indexed fields table, and use EuiIconTip
* Use EUI 0.0.35
* Add `Apache License, Version 2.0` to list
2018-03-28 11:26:43 -07:00
Rashmi Kulkarni 54f3a803a8
Large fileds 6.x (#17404)
* adding large_string_test (#17312)

* adding large_string_test

* removed a failing test, modified the existing one

* new line at the end of mappings.json

* removed the data.json file and also removed the navigateTo() and clickKibanaIndices() as createIndexPattern() takes care of it

* more modifications

* Test for Large number of Fields in Kibana.  (#16237)

* test huge data

* new file for testing large number of fields
*  testing large fields
* large_fields_test
* add the unload of es_archiver
* incorporated the changes in kibana.yml
* Revert "incorporated the changes in kibana.yml"
This reverts commit 8682121678.
* cleanup
* code simplification
* removed commented code
2018-03-26 13:29:39 -07:00
Tyler Smalley ffd2fe83e3
[kbn-es] Package for managing Elasticsearch during dev and testing (#17168) (#17273)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-21 17:48:49 -07:00
Lukas Olson 12246483d6 Create grunt task to generate parsers from peg files (#17069)
* Create grunt task to generate parsers from peg files

* Leave comment

* Move grunt config to config/
2018-03-21 16:56:18 -07:00
Spencer 3ba95d2bff
[yarn] upgrade sha.js pre-emptively due to license changes (#17292) (#17293) 2018-03-20 16:32:33 -07:00
Tyler Smalley 9f16b6af66 Adds additional CC licenses (#16969)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-16 16:41:25 -07:00
Jonathan Budzenski 209c4df1c0
[build] Turn on optimizeBuild logging (#16205) 2018-03-15 12:34:49 -05:00
archana aa81248d5a Move proc_runner from x-pack-kibana into kibana (#17120)
* [tests] add proc_runner from x-pack-kibana

* [tests] implement proc_runner deps

* [tests] fix proc_runner dep

* [packages] move proc_runner into kbn-proc-runner

* [kbn-proc-runner] Package it

* [kbn-proc-runner] Chalk it up

* [kbn-proc-runner] Package.json

* Both kbn-proc-runner and kbn-utils depending on review. Sigh.

* Rename to kbn-dev-util, remove kbn-proc-runner

* Test proc-runner

* Add babel

* [proc-runner] build fixes

* Recreate yarn.locks, add mocha tests to simplemocha config
2018-03-15 01:59:22 -05:00
Spencer 2013bb986d
[@kbn/ui-framework] move ui-framework to a package (#17085) (#17128)
* [@kbn/ui-framework] move ui-framework to a package

* [@kbn/ui-framework] restore doc_site index.html and fix build task names

* [jest] always ignore modules in target dirs
2018-03-13 12:54:05 -07:00
Kim Joar Bekkelund 1429347c97
[kbn-pm] Include Kibana's transitive _projects_ in build (#16813) (#17097) 2018-03-12 12:01:11 +01:00
Jonathan Budzenski 1def6ed78f
[6.x][license csv report] Support directory flag (#17075)
* [license csv report] Support directory flag (#17070)

* [license report] support directory flag

* override png-js

* override eslint-plugin-kibana-custom

* remove eslint-plugin-kibana-custom override
2018-03-09 16:53:39 -06:00
Kim Joar Bekkelund d346ebae54
Move running projects tests into Grunt task (#16946) (#17063) 2018-03-09 16:00:49 +01:00
Aleh Zasypkin 1ee793c633
[6.x] Introduce Jest integration tests. (#16830) 2018-02-20 23:02:29 +01:00
Spencer 2197cdab12
[kbn-pm] rename from kbn-build (#16739) (#16742) 2018-02-14 11:51:40 -07:00
Kim Joar Bekkelund 352966720e
Production package example: datemath (#16531) (#16719) 2018-02-13 23:58:49 +01:00
CJ Cenizal 358d0d82bb
Add test-subj-selector module to packages dir. (#16623) (#16709)
* Add test-subj-selector module to packages dir.
* Rename to @kbn/test-subj-selector.
* Simplify rejectRejFiles Grunt task and ignore nested node_modules.
* Update jenkins_unit script to use yarn kbn CLI.
2018-02-13 12:56:25 -08:00
Spencer acd74a2b6b
[6.x] Condense build task (#16687) (#16689)
* [build] don't copy unwanted files

* [build] condense mkdir/touch tasks

* [i18n] verifyTranslations task has nothing to do with the build, just run in tests
2018-02-12 17:46:12 -07:00
Kim Joar Bekkelund 6e393901cf
Use execFile instead of exec when installing deps in build (#16587) (#16589)
* Clarify lockfile is used for resolution

* Use 'execFile' instead of 'exec'
2018-02-08 09:00:57 +01:00
Spencer 73ad7e0545
[6.x] Babel preset package (#16479) (#16511)
* [babel-preset] turn into a package

* switch to @kbn namespace

* [babel] pin babel-preset-env to 1.4.0, newer versions don't shim symbols

* [yarn] update lockfile
2018-02-05 08:49:10 -07:00
Kim Joar Bekkelund 20d8d8c15d
Rename @elastic/kbn-build to @kbn/build (#16507) (#16508) 2018-02-03 13:39:40 +01:00
Kim Joar Bekkelund 96d8995315
Build multiple Kibana packages for production (#16313) (#16496)
* Build packages before running ESLint on CI

* Add production task to kbn-build

* Ensure packages are bootstrapped before running the build

* Run ESLint on kbn-build
2018-02-02 22:47:18 +01:00
Kim Joar Bekkelund c9b602b395
Handle licenses for 'private: true' packages (#16480) (#16494) 2018-02-02 21:55:34 +01:00
CJ Cenizal 7bd9876453
Extract fatal notification into fatalError service, add support for EuiToast notifications (#15749) (#16330)
* Reorganize notify/lib files. Extract fatal notification into a fatalError service.
* Convert notify/lib tests to use Jest.
* Add ToastNotifications, GlobalToastList, and documentation.
* Remove notify.info method.
* Add createFirstIndexPatternPrompt.
* Update testSubjects.exists to accept a timeout argument.
* Skip some flaky tests.
2018-01-27 18:00:51 -08:00
Court Ewing 9f76635fdf
Remove angular-translate (#13066) (#16015)
* remove angular translate

* remove angular-translate deps from yarn.lock
2018-01-27 10:47:35 -08:00
Kim Joar Bekkelund 9c38fae1e2
Upgrade license checker (#16147) (#16149) 2018-01-19 09:46:46 +01:00
Kim Joar Bekkelund 9b3524d5a7
Licenses csv overrides (#16136) (#16138)
* Actually override licenses when writing csv

* Cleaner overrides

* Remove all the unnecessary overrides
2018-01-18 22:42:44 +01:00
Tyler Smalley 1a79309a2e
[optimizer] More aggressive chunking of common/vendor code (#15907) (#16051)
Previously, we were not aggressive in combining common code which resulted in duplicates included in the bundles.

As an example `node_modules/elasticsearch-browser/elasticsearch.angular.js` is present in the following chunks:

* kibana.bundle.js
* dashboardViewer.bundle.js
* apm.bundle.js
* monitoring.bundle.js
* ml.bundle.js
* timelion.bundle.js
* graph.bundle.js

Vendored code (anything inside node_modules) is placed in vendors.bundle.js while everything else with more than two references is placed in commons.bundle.js.

This has a couple positive side-effects (numbers are with x-pack & canvas):

* Decreased build time. Seeing builds go from 475.76 seconds to 274.72.
* Decreased memory overhead. Uses roughly 1/3 the memory overhead.
* Decreased bundle size. A 68% reduction in overall bundle size. Going from 66.16 MB to 21.13 MB.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-01-15 12:38:19 -08:00
Kim Joar Bekkelund a817517574
[6.x] Switch to Yarn (#15485) (#15955)
* Switch to Yarn (#15485)

* switch to yarn

* cleanup misc references to npm

* [yarn] loosen dependency ranges so yarn will merge more deps

* fix linting error now that moment uses ESM

* [licenses] font-awesome changed the format of its license id

* Use local yarn

* Misc fixes

* eslintignore built yarn file

* Remove mkdir which doesn't do what it should do

* Check build without upgrading lots of versions

* Fix license check

* too many moments

* Better description

* Review fixes

* Lock to angular@1.6.5

* More specific version locks

* Revert "More specific version locks"

This reverts commit 11ef81102e.

* Revert "Lock to angular@1.6.5"

This reverts commit 3ade68c14c.

* rm yarn.lock; yarn

* Forcing a specific version of React, Angular, Moment

* Using vendored version of yarn in ci

* Use --frozen-lockfile

* fixes

* Update lockfile
2018-01-10 16:54:20 +01:00
Spencer ccb794980a
[6.x] [optimizer] run webpack compilation ASAP (no more laziness) (#15795) (#15917)
* [optimizer] run webpack compilation ASAP (no more laziness)

* [optimize] fix variable reference
2018-01-09 10:09:44 -07:00
Court Ewing 73eced9e52
Revert "[optimizer] More aggressive chunking of common/vendor code (#15816)" (#15878) (#15879)
This reverts commit 92b373b304.
2018-01-07 09:31:15 -05:00