Commit graph

217 commits

Author SHA1 Message Date
Spencer f0cc432faf
Apache 2.0 license headers (#19383)
In order to make the license that applies to each file as clear as possible, and to be consistent with elasticsearch, we are adding Apache 2.0 license headers to the top of each file.

Existence of this header is enforced by eslint and tslint and missing headers were automatically added in the last commit by running:

```
node scripts/eslint --fix && node scripts/tslint --fix
```
2018-05-28 20:06:30 -07:00
Tiago Costa 194aba149f
Validate current node version (#19154)
* feat(12976): node version validation at runtime.

* refact(12976): move the code into a static utilities class.

* test(12976): added first test case using jest.

* test(12976): added test cases for node_version.

* feat(12976): create setup env node to bootstrap babel, ts-node and node version validator.

* refact(12976): migrated node version code from es6 to es5.

* feat(12976): node version validation at runtime.

* refact(12976): move the code into a static utilities class.

* test(12976): added first test case using jest.

* test(12976): added test cases for node_version.

* feat(12976): create setup env node to bootstrap babel, ts-node and node version validator.

* refact(12976): migrated node version code from es6 to es5.

* fix(12976): remove one level from ts node register cache directory link.

* chore(12976): added caret to semver dependecy in order to support minor versions.

* refact(12976): small change from named import to default import on node version validator.

* refact(12976): removed ts_node_register and add the code to babel_register.

* feat(12976): split eslint config in order to properly support files built to run before and after node version validator. refact(12976): convert script files to es5 code. refact(12976): delete inline eslint configs from node version check related files.

* refact(12976): remove ts node register file.

* refact(12976): completely port setup_node_env to es5.

* refact(12976): remove babel_register invokation from external dependencies in scripts.

* refact(12976): move node_version code directly into node_version_validator inside setup_node_env folder.

* refact(12976): only node version validator for kbn script.
2018-05-25 18:43:01 +01:00
Spencer 0b03166d2d
[eslint] unify resolver configs (#19102)
* [eslint] unify resolver configs

Our eslint resolver settings currently rely on the fact that we define
our resolver with a string globally, and an object in the overrides.
This causes the override value to completely override/replace the global
setting, which is desired, but when the global setting is converted to
an object they are merged, causing both resolvers to run.

This is a problem because some dependencies in the UI side of things
will resolve with the node resolver, but will resolve incorrectly
because they are intended to use some webpack specific override.

While trying to add TypeScript I needed to pass argument to the node
resolver which uncovered this issue. The change here moves us away from
using the node resolver directly and instead uses the kibana resolver
with `forceNode: true` set when linting server code and `forceNode:
false` when resolving imports that will be handled by webpack.

* [import-resolver] use object spread operator
2018-05-16 10:45:41 -07:00
Tim Roes f579d2299f
Update React to 16.3 (#18768)
* Update React to 16.3

* Switch off specific eslint rules

* Update enzyme snapshots

* Incorporate PR feedback
2018-05-14 14:05:17 +02:00
archana b58e757794
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-09 18:23:49 -05:00
Spencer e1a2fcbd96
[uiExports] migrate uiApp "uses" to explicit imports in apps (#17828)
* [uiExports] migrate uiApp "uses" to explicit imports in apps

* [uiApp] update tests for getModules() method

* [optimize/uiExports] improve naming and comments

* [uiExports] sort imports so they load in the same order as before

* [testHarness] load hacks when testing in the browser

* [x-pack/uiExports] use new uiExports modules

* [testHarness] describe why we import uiExports/hacks

* [optimize] remove needless [].concat()

* [optimize/createUiExportsModule] string.includes > string.indexOf

* [uiExports/createUiExportsModule] remove needless capture of module exports
2018-05-03 12:18:50 -07:00
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Kim Joar Bekkelund ef900fd42d
Enable Prettier for more packages (#17763) 2018-04-20 17:13:34 +02:00
Spencer 4f2a19bd9b
[eslint-import-resolver-kibana] bring in repo as package (#17665)
* [eslint-import-resolver-kibana] bring in repo as package

* [eslint-import-resolver] enable prettier
2018-04-11 15:21:29 -07:00
Tyler Smalley 82e17f435f
[kbn-es] Package for managing Elasticsearch during dev and testing (#17168)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-03-20 08:30:15 -07:00
Spencer ef3339bd7a
[@kbn/ui-framework] move ui-framework to a package (#17085)
* [@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 10:43:39 -07:00
Spencer 4d246a10a8
[kbn-pm] rename from kbn-build (#16739) 2018-02-14 10:57:13 -07:00
Kim Joar Bekkelund 1c3b404774
Production package example: datemath (#16531) 2018-02-13 21:49:55 +01:00
Spencer 2c7a1f34cb
[kbn-plugin-generator] add plugin generator to the repo (#16655)
* [kbn-plugin-generator] add plugin generator to the repo

* [plugin-generator] use snake_case plugin name for directory name

* [plugin-generator] fix typo

* [plugin-generator] remove translation support until we resume i18n efforts

* [yarn] update lockfile

* [mocha] remove plugin-generator selector from mocha tests

* [plugin-generator] update generated readme to recommend yarn

* [plugin-generator] add readme to generator pacakge

* [plugin-generator] link from plugin-resource docs

* [plugin-generator] mention very important `kbn bootstrap` script

* [plugin-generator] rework some parts of the README

* [plugin-generator] log actual directory name with system separators

* [plugin-generator] include bootstrap/yarn preinstall check script
2018-02-12 12:23:23 -07:00
spalger 9f6ebb12b6 [kbn-plugin-helpers] remove redundant configs 2018-02-08 11:57:08 -07:00
Spencer b596ad3d5d
[eslint] un-ignore .eslintrc.js (#16542) 2018-02-05 16:29:30 -07:00
Kim Joar Bekkelund e58b43f744
Prettier + ESLint setup (#16514)
* Move .eslintrc (yaml) to .eslintrc.js (js)

* Add Prettier setup to ESLint

* Run Prettier on @kbn/build

* Update style guide with Prettier
2018-02-05 18:18:43 +01:00