Commit graph

42 commits

Author SHA1 Message Date
Tiago Costa ed795d28ee
Migrate from tslint (#33826)
* chore(NA): remove tslint dependencies, configs and enable eslint typescript parser.

* fix(NA): apply recommend eslint typescript rule.s

* chore(NA): upgrade eslint package versions.

* chore(NA): split javascript eslint config in an override section.

* chore(NA): split all eslint configs with overrides.

* chore(NA): remove missing console.log.

* chore(NA): change eslint splits and overrides order.

* chore(NA): replace tslint disable comments with eslint ones.

* chore(NA): solve eslint typescript errors for elastic/kibana-custom/no-default-export

* chore(NA): fixed multiple eslint typescript rule failures.

* chore(NA): add tarfet folder to the eslint ignore.

* chore(NA): apply prettier rule to ts type file.

* chore(NA): remove last mentions to tslint

* chore(NA): add old defined rules

* chore(NA): missing port rules website

* chore(na): ordered rules

* chore(NA): solved eslint typescript problems.

* chore(NA): fix spaced comment problems.

* chore(NA): fix some more eslint typescript rules: import/order no-empty-interface

* chore(NA): fix last rules and comment out what are the ones still failing.

* chore(NA): comment out camelcase rule.

* chore(NA): regenerate kbn pm dist.

* chore(NA): updated snapshots.

* chore(NA): updated snapshots.

* chore(NA): disabled sort-keys rule.

* chore(NA): remove rule prefer-arrow/prefer-arrow-functions.

* chore(NA): fix for @typescript-eslint/no-var-requires rule.

* chore(NA): fixes for @typescript-eslint/camelcase rule.

* chore(NA): fix typo on eslint config kibana typescript.

Co-Authored-By: mistic <tiagoffcc@hotmail.com>

* chore(NA): remove legacy note after the intellij upgrade to 2019.1

* fix(NA): import order plugin.

* chore(NA): fix ts ignore positions after auto fix.

* fix(NA): performance issue with typescript eslint.

* refact(NA): eslint configs organization.

* chore(NA): apply resticted paths to ts files too.

* chore(NA): split comment from eslint ignore.
2019-04-05 17:45:23 +01:00
Spencer 96206bd092
[eslint] merge custom rules into a single plugin (#33733)
I'd like to add another custom eslint rule, but there isn't a very good place to do that right now. We have the `eslint-plugin-kibana-custom` package, which is super simple but isn't in the `@kbn` namespace and isn't included in the root eslint config, and `@kbn/eslint-plugin-license-header` is too specific, so I've merged those two packages into `@kbn/eslint-plugin-eslint`, which is a little redundant but allows is to refer to the rules within it as `@kbn/eslint/{rule}`, which feels nice.

Thoughts?

_**NOTE:**_ merging the eslint rules from the two packages means enabling prettier for the code from `@kbn/eslint-plugin-license-header`, all those changes are made in 42c7da6fe2. [View the changes without the prettier updates](b647f2b...74e07a0)
2019-03-22 17:12:14 -07:00
Mike Côté 8ac6d6991a
Exclude /html_docs from eslint (#32314) 2019-03-01 11:43:06 -05:00
Court Ewing 2ce51a5be5 Update paths to ui, server, deprecation, plugin_discovery in src/legacy
This commit accompanies the four that precede it. Rather than squash
them altogether, the four previous commits all do nothing except move
files to help avoid conflicts.
2019-02-11 10:41:37 -05:00
Thomas Neirynck 52fed8a52d
[Maps] Remove usage of gis from user-facing api (#29800)
This also renames the gis-folders to maps for consistency.
2019-02-01 12:07:05 -05:00
Spencer e8ba176f87
Implement built_assets directory (#27468)
* [sass] build sass into built_assets directory

* [optimize/dlls] move dll optimization into built_assets directory

* [dlls] update path to dll manifest

* [built_assets] ignore when searching for notice files

* [sass] build into variable directory

* revert changes to ui_export_types/style_sheet_paths.js

* revert changes to ui_export_types/style_sheet_paths.test.js

* [uiExports/styleSheetPaths] switch .scss extension for stylesheets that are already compiled

* update comment for clarity

* [testBundle] include css from built_assets

* [dlls] move url to built_assets/dlls

* fix merge conflict issues

* [server/sass] pass log in test
2019-01-09 17:30:29 -07:00
Thomas Neirynck ffc8bae820
[GIS] Add Maps Plugin (#24804)
This adds the MVP of the Phase 1 version of the Maps Plugin to Kibana (https://github.com/elastic/kibana/issues/19582).

This is added as a new Stack Feature, requiring a basic license.
2018-12-19 16:14:41 -05:00
Tiago Costa d5b2c8eaf2
Create vendor dll for the client modules (#22618)
* feat(NA): first dll bundler code.

* chore(NA): upgrade to webpack 4.

* chore(NA): updated package.json

* chore(NA): removed old code.

* chore(NA): add parallel option.

* chore(NA): removed console log and old var about  node modules.

* chore(NA): turn off unsafe cache.

* chore(NA): update lock files.

* chore(NA): new config for dll generation.

* chore(NA): update stats emit.

* chore(NA): update dependencies.

* chore(NA): right cache loaders.

* chore(NA): remove ui_bundles alias.

* feat(20749): init implementation on bridge plugin for dll bundler.

* feat(20749): init implementation for dll compiler.

* feat(20749): dll bundler init from other process and webpack wrapper..

* feat(20749): optimizer changes to integrate with  dll bundler.

* chore(20749): split into different processes.

* refact(20749): change to single running process.

* refact(NA): improvements on dll bundler plugin.

* refact(NA): removing including loop on plugins.

* refact(20749): only run dllReference once.

* chore(20749): todo on result.request path building.

* chore(NA): lock files updated.

* chore(NA): avoiding dll paths being removed.

* chore(NA): tests on sync generation.

* chore(NA): changes on entry paths compiler.

* chore(NA): different hooks tests.

* chore(20749): first working version, single process, for dynamic building dll.

* feat(20749): last gross features for the dynamicdllplugin.

* refact(20749): string interpolation when creating the path to delete in every optimizer cycle. feat(20749): creating the DynamicDllPlugin foundations.

* chore(NA): updated base optimizer run function args.

* chore(20749): first working solution with vendor dll both for prod and dev.

* chore(20749): useful todos on client dlls.

* feat(NA): auto built blacklist for server node_modules.

* refact(NA): removed unused code.

* chore(NA): update all webpack and loaders stuff to last versions.

* refact(NA): first refacts on clean taks related with dll. feat(NA): added clean empty folders task.

* refact(NA): removed support for console logs during the build.

* refact(NA): removed extra space.

* refact(NA): removed extra space.

* refact(NA): getDllModules function.

* chore(NA): removed unsafeCache option.

* feat(NA): removed unsafeCache option.

* refact(NA): apply general inheritance principles to the optimizer: hooks, and init. refact(NA): merge dynamic dll plugin into the common config. refact(NA): restore old template structure - vendors.dll style is always emitted.

* fix(NA): fs_optimizer run function by not returning inside async func.

* fix(NA): change template anchor name from vendor to vendors.

* docs(NA): added info about files were keeping when cleaning the bundles.

* fix(NA): filtering elible dll modules to delete.

* refact(NA): removed old dll bundler in favor on new dynamic dll plugin.

* refact(NA): initial split for clean modules on dll task.

* refact(NA): update new dll config model. refact(NA): update config on dynamicdllplugin.

* refact(NA): major work refactor for dynamic dll plugin.

* refact(NA): extract clean node modules on dll task to its own folder.

* refact(NA): organize imports.

* docs(NA): add docs to registerCompilerHooks function for the optimizer.

* refact(NA): finished refactor for dynamic dll plugin with correct error handling for runWebpack function.

* refact(NA): basic structure for clean client modules on dll task.

* fix(NA): resolve path for dll manifest during cclean build tasks.

* refact(NA): split webpack dll related functions to their own file for clean client modules on dll task.

* refact(NA): added error handling for the clean client modules on dll task - webpack dll related functions.

* docs(NA): added license header.

* refact(NA): complete split out the functions from the clean modules on dll task to the code_parser file.

* refact(NA): main task entries compose.

* docs(NA): extend docs for the getDependenciesFromFile function.

* refact(NA): final structure split for clean client node modules dll task.

* fix(NA): added missing param to calculate top level dependencies.

* docs(NA): completed todo description about dll location.

* fix(NA): add production option to webpack config on kbn-pm.

* docs(NA): extended documentation about style extraction.

* refact(NA): removed extra comments.

* feat(NA): env variable to force dll creation.

* feat(NA): include option to define folders to keep on delete empty folders task.

* refact(NA): remove unused method from dll compiler.

* feat(NA): move dlls outside bundles folder and support request for /dlls from a browser perspective.

* chore(NA): gitignore updated to include new dlls folder.

* chore(NA): eslintignore updated.

* chore(NA): removed strange file from repo.

* test(NA): fix failing tests for bundles_route.

* fix(NA): change paths array to path string in a server route config.

* fix(NA): remove infinite loop calls on register hooks functions.

* fix(NA): readFile should only override the file in case it not exists.

* refact(NA): removed dll compiler finish log on success with stats.

* fix(NA): dll compiler alias.

* fix(NA): dynamic dll plugin flow on needs compile.

* fix(NA): raw alias config.

* Revert "fix(NA): raw alias config."

This reverts commit ebb245a786.

* feat(NA): raw alias for moment on dll config model.

* fix(NA): removed uiBundles from base_optimizer call on dynamicdllplugin.

* chore(NA): decrease moment versions.

* chore(NA): temporary changes on dll compiler.

* fix(NA): majority of problems between dll approach, webpackshims and browser tests.

* fix(NA): webpackShims integration with client vendors dll. fix(NA): enable esm modules mutability for development. fix(NA): only clean dll contents from build when they belong to node_modules.

* fix(NA): fix for endless dll compilation loop.

* fix(NA): removed esm plugin and skipped test using wrong stub strategy.

* docs(NA): added some comments for the skipped test.

* feat(NA): considering requires inside webpackShims valid entry paths to add to the dll entry file.

* fix(NA): small fix for the max compilation logic.

* docs(NA): add small explanatory note.

* fix(NA): building requires results with relative requires found onn webpackShims.

* docs(NA): add small note for error handling on dll compiler.

* fix(NA): move precinct to prod dependencies.

* test(NA): testing running functional tests on production.

* fix(NA): restore tests run config for development flag. feat(NA): force dll creation with uiBundles is Dev flag.

* chore(NA): update dependencies.

* feat(NA): test update dll to completely match base optimizer one.

* fix(NA): removed ts.

* refact(NA): removed unused consts.

* fix(NA): set back transpile sacss task in place.

* fix(NA): fix resolve remoing ts and tsx.

* fix(NA): set back transpile sacss task in place.

* fix(NA): removing isDevmode from mustCompileDll.

* fix(NA): add search for import statements into the dependencies visitor.

* fix(NA): add dll suffix to vendors resource on ui bootstrap template.

* fix(NA): some configs for unrelated dll work projects.

* chore(NA): upgrade canvas plugins webpack build to webpack4.

* chore(NA): add shim for moment-duration-format.

* chore(NA): stup moment-duration-format into the moment webpackShim.

* chore(NA): setup moment-duration-format into the moment-timezone webpackShim.

* fix(NA): moment and moment-timezone webpackShims

* chore(NA): added moment and moment-timezone webpackShims to x-pack. fix(NA): revert changes on webpackShims for oss kibana.

* fix(NA): xpack webpackshims for moment.

* fix(NA): remove xpack webpakcshims for moment.

* fix(NA): webpakcshims for moment.

* fix(NA): remove every changes from webpackShims and xpack webpackShims.

* fix(NA): fix visitors to gather server dependencies resulting from export * from and export x, 'x' from.

* chore(NA): update some webpack related dependencies.

* fix(NA): in the dll the plugins need to have their own dependencies. It is the same for the ones into the tests relying on test against distributable.

* feat(NA): including test/plugin_functional plugins into the kbn-pm bootstrap tasks.

* fix(NA): wrong built yarn lock files.

* chore(NA): updated webpack related dependencies.

* feat(NA): add missing color for dynamic_dll_plugin logging tag.

* chore(NA): removed forgotten console.log.

* chore(NA): removed forgotten dead code.

* chore(NA): removed missing old comment.

* docs(NA): added missing notice for 2 tools we have relied on.

* refact(NA): added is to a boolean variable to keep the consistency inside the code parser strategies.

* fix(NA): update notice cli to exclude search inside dlls bundles. chore(NA): update notice file.

* feat(NA): use lodash matches in the code parser visitors logic.

* docs(NA): updated notice file related with the code parser visitors logic..

* docs(NA): added explanation for the process that decides if we should build a new dll or not.

* test(NA): added missing tests for some usefull parts of the code.

* refact(NA): split registerCompileHook function into small ones.

* chore(NA): uncomment scripts from tests.

* feat(NA): isolate code-parser in a kbn package

* fix(NA): missing relative dot into the cwd function.

* chore(NA): update all inter deps to match.

* fix(NA): rebuild the yarn locks and the package jsons based on master ones.

* fix(NA): move babel-code-parser to the prod deps.

* chore(NA): include build path instead of the base root path.

* refact(NA): integrate plugin_functional test plugins with workspaces.

* fix(NA): include missing license for plugin functional test plugins.

* fix(NA): always write posix paths into the dll entry file in order to make the dlls compilation working on windows too. chore(NA): improve error handling into dll compiler.

* fix(NA): revert wrong moved line from canvas.

* fix(NA): match ts-loader version between kibana and x-pack.

* fix(NA): sync dll compiler with base_optimizer.

* fix(NA): exclude kbn-interpreter from the dll.

* refact(NA): remove exclusion of kbn-interpretor from base_optimizer.

* chore(NA): add dlls folder to the yarn kbn clean script.

* fix(NA): missing utf8 input format encoding when reading a file to create the hash into the watch optimizer cahce.

* refact(NA): re-engineering to the dynamic_dll_plugin logs and lifecycle.

* fix(NA): update clean node modules task to search under legacy/core_plugins.

* fix(NA): fix build on windows with globby on cleaning dlls for the watch optimizer cache.

* docs(NA): update documentation for the clean client node modules build task.

* docs(NA): added extra comment to clarify the purpose for the built entrypoints.

* chore(NA): update clean client node_modules code to use posix path.

* feat(NA): add support for discovering server entries over the legacy plugins and the new plugins.
2018-12-05 15:45:19 +00:00
Aleh Zasypkin db3d727fdb [common] fix paths. 2018-12-03 13:03:14 +01:00
Spencer 54f1a739cd
[@kbn/interpreter] improve build/packaging (#26096)
Summary of changes:

 - move all build artifacts under `target` directory
 - run babel and webpack in parallel
 - support optional watch and sourcemaps in build
 - expose /common /public /plugin /server sub-exports as index.js
 - avoid importing deeply from `@kbn/interpreter`
 - move a couple missed dependencies from x-pack to kibana
 - remove custom babel-register implementation
2018-11-23 14:16:38 -07:00
Peter Pisljar f82d73285a
Ref/canvas interpreter2 oss take5 (#26068) 2018-11-23 06:37:25 +01:00
Lukas Olson e36767a4b3 Move buildEsQuery to a package (#23345)
* fix: move buildEsQuery to utils

* fix: tests that I broke

* fix: add back link to the docs

* fix: don't export from ui/ and link to utils

* fix: move to a package

* fix: move error to errors.js

* fix: paths for peg task

* fix: update reference to kuery

* fix: build step for transpilation

* fix: add typescript declaration file

* fix: test

* tmp: debug individual tests

* debug: add debug stuff for reporting tests

* try to debug test

* Testing splitting reporting jobs in two

* Testing splitting each job

* Fix ci yaml

* Skipping job to check failing test

* debug - adding a catch to jobResponseHandler on report

* Testing a different job and enabling verbose mode

* Testing verbose on phantom_api skipping other CI tests

* Fix script mode

* fix: try running tests in chromium

* fix: move out of devDependencies

* fix: remove commented test

* Revert "fix: try running tests in chromium"

This reverts commit 991d46f051.

* Revert testing changes

* Fixing build for phantomjs

* Revert CI configuration to master. Remove verbose logging for tests
2018-11-22 15:24:19 +01:00
Joe Fleming 4f1ca7e07f
Fix: revert and enable canvas tests (#26054)
## Summary

CI was broken when enabling functional smoke tests via #25262. The problem is that the Kibana build is broken in master...

I think #25711 broke it, which was merged in between #25262 passing and it being merged (and then CI breaking). So this PR reverts that PR and enabled canvas smoke tests again to see if CI will pass.

- Revert #25711
- Revert 7ae0d28d87
2018-11-21 16:25:12 -07:00
Peter Pisljar 43b1d00128
move canvas interpreter to OSS (#25711) 2018-11-20 09:56:50 +01:00
Spencer cfaa1783c3
[canvas] move yarn scripts to node scripts (#25258)
* [canvas] move yarn scripts to node scripts

* [canvas/eslint] allow scripts to access devDeps

* [canvas/eslint] remove packageDir override

* [x-pack] move babel-register to deps for canvas

* [canvas] rename scripts from : to _

* [canvas] update readme with correct script paths

* [canvas] remove yarn.lock file

* Remove redundant require
2018-11-07 10:53:06 -08:00
joe fleming af84ecca84 chore: eslint fixes in canvas
adds license headers and includes project linting overrides
2018-09-13 14:58:36 -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
Jenkins CI fe4609647d Migrate x-pack-kibana source to kibana 2018-04-24 13:48:10 -07:00
Kim Joar Bekkelund 6be9df01af Move to Yarn 1.6.0 (#17741) 2018-04-17 09:53:12 -07:00
Spencer 1e95d428f5
[eslint] always ignore jest snapshot files (#17500) 2018-04-02 13:15:14 -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
Lukas Olson a8462e8ced
Use generated parser instead of dynamically generating (#17049) 2018-03-08 13:22:14 -08:00
Aleh Zasypkin f2fda4aca3
Introduce Jest integration tests. (#16735) 2018-02-19 17:02:01 +01:00
Spencer 4d246a10a8
[kbn-pm] rename from kbn-build (#16739) 2018-02-14 10:57:13 -07: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
Spencer b596ad3d5d
[eslint] un-ignore .eslintrc.js (#16542) 2018-02-05 16:29:30 -07:00
Kim Joar Bekkelund 136ded978f
Build multiple Kibana packages for production (#16313)
* 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 20:49:57 +01:00
Spencer 7fb3a4bfb5
[eslint] lint packages, but not eslint-* ones (#16470) 2018-02-01 16:59:04 -07:00
Spencer 0fde087ca2 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
2018-01-10 13:23:43 +01:00
Spencer 3e08a7e765
[flot-charts] move into ui/public (#14669) 2017-10-30 12:43:12 -07:00
Jonathan Budzenski 2e70fba30e [eslint] Ignore ui_framework/doc_site/build (#12400) 2017-06-26 18:07:44 -05:00
Spencer cb3219c798 [webpack] fix loader query string usage (#9497)
* [webpack] pin to fork with fixed loader aliases

* [optimizer] upgrade to postcss+autoprefixer

* [timelion] convert uiExports.modules -> webpackShims

* [uiExports] remove implementation-leaking and unused uiExport types

* [optimizer] remove unused imports

* [uiBundlerEnv] add a method for exporting global import aliases for special cases
2016-12-15 16:11:42 -07:00
Spencer 0c736724b0 Upgrade eslint (#9357)
* upgrade eslint, all related deps, and config files

* replace gruntify-eslint with basic eslint-cli wrapper

* arrow-IIFEs must be invoked outside of the parens

* move import statements before their use

* reindent to satisfy new indentation check algorithm

* place missing semicolon

* ignore copy-pasted decode geohash code

* [grunt/eslint] fix argument spacing

* [gurnt/eslint] add comment about contents of report

* [grunt/tasks] use `export default`
2016-12-12 13:44:18 -07:00
Rashid Khan 3265451e62 Fix redefined variables 2016-08-12 14:52:43 -07:00
CJ Cenizal b08f016cc6 Replace compiled angular-bootstrap file with original HTML and JS source files. 2016-07-05 12:27:20 -07:00
LeeDr db95e52886 Merge remote-tracking branch 'jbudz/lint-ignore' into testDiscover 2015-11-13 10:46:33 -06:00
LeeDr a9bf035ca1 Change ignore path for test/fixtures/scenarios up one level. 2015-11-13 09:59:50 -06:00
LeeDr cb07ddfdfa Ignore my large data files in test/fixtures/scenarios/logstashFunctional. 2015-11-12 21:51:28 -06:00
Jonathan Budzenski 6e48ccc443 Prevent linting fixtures 2015-11-12 17:09:46 -06:00
Rashid Khan 79dcc9acf0 add jscs rules to eslint 2015-08-01 14:46:53 -07:00
Rashid Khan 9d4de5e87a Revert "add jscs rules to eslint"
This reverts commit cfde0e5a01.
2015-08-01 14:34:36 -07:00
spalger cfde0e5a01 add jscs rules to eslint 2015-07-31 19:50:47 -07:00