Commit graph

195 commits

Author SHA1 Message Date
Spencer
b411925bba
Fix plugin-helpers test:server task (#31034)
* [plugin-helpers/testServer] use scripts/mocha

* [yarn] sync eslint-plugin-jest with kibana while I'm here
2019-02-13 22:47:26 -08:00
Larry Gregory
22ba11eb52
Prevents dynamic import/require statements (#27515)
## Summary

This PR enables the `import/no-dynamic-require` eslint rule, which requires that all require/import statements be statically defined.

This mitigates certain attack vectors, such as those which enabled [`ESA-2018-18`](https://www.elastic.co/community/security)/[`CVE-2018-17246`](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-17246)
2018-12-21 11:15:20 -05:00
Tiago Costa
45a67701f2
Upgrade to NodeJS 10 (#25157)
* feat(NA): upgrade node js version on file configs.

* chore(NA): migrate configs and 3rd party dependencies to work on node js 10.x

* fix(NA): add missing async function declaration.

* chore(NA): updated elastic/good package to work with node10

* chore(NA): update lockfiles.

* fix(NA): add missing dep.

* fix(NA): types for node 10.

* test(NA): fix error return type for node10.

* fix(NA): kbn-pm webpack config to unlazy a require using lazy-cache. fix(NA): build to work with node 10.

* test(NA): jest integration test for kbn-pluin-helpers.

* test(NA): fix jest tests for kbn-es.

* fix(NA): use ostmpdir instead of a tmp folder inside the fixtures.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): change afterEach on kbn es decompress test.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* fix(NA): readd mock-fs for the tests that still use it on kbn-es and that works on node10.

* refact(NA): rewrite tests using mock-fs and completely remove this dependency.

* fix(NA): failing test implementation using jest mock in order to replace mock-fs.

* fix(NA): update jest snapshots to match new ones generated one node 10.

* fix(NA): cli/cluster mock to spyOn off method instead off spyOn removeListener as this was changed on Node 10.

* fix(NA): tests for cluster_manager to also spyOn off and on instead of addListener and removeListener

* test(NA): fix management advance settings image field test flow.

* fix(NA): apply missing types for src/core/server/plugins/discovery/plugins_discovery.ts.

* test(NA): updated 2 missing snapshots for KuiCodeEditor on kbn-ui-framework.

* refact(NA): fix eslint errors.

* refact(NA): fix ts code with tslint fix. chore(NA): update jest snapshots.

* chore(NA): migrate kbn config schema peer dependency to last used joi version to avoid warning on bootstrap.

* fix(NA): tslint errors.

* chore(NA): upgrade types node to the last version.

* fix(NA): missing utf8 input format encoding when reading a file.

* chore(NA): upgrade to node 10.14.1

* fix(NA): Buffer api usage to avoid deprecation warnings.
2018-12-10 17:41:51 +00: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
Josh Dover
77522a7bd2
[kbn-pm] Use yarn workspaces for dependencies (#24095) 2018-11-12 12:38:11 -06:00
Spencer
d22bdfec46
[yarn] Upgrade to 1.10.1 (#23971)
* [yarn] upgrade required version

* [yarn] update lock files to include integrity

* [yarn] coalesce locked readable-stream versions to avoid yarn bug
2018-10-15 14:34:30 -07:00
Spencer
01ee574443
[kbn-plugin-helpers] move jest tests to integration suite (#23005)
The plugin helper tests have failed due to timeouts every once and a while, which makes sense because they run a bunch of CLI tasks, so this just moved them to the jest integration tests where tests can take a little longer to run.
2018-09-13 13:30:13 -07:00
Leanid Shutau
1e5d82c2ab
Integrate main i18n tool into build pipeline (#22254)
* Integrate main i18n tool to build process

* Resolve comments

* Remove old task

* Replace default Error with FailError
2018-08-29 11:55:34 +03:00
Tyler Smalley
ac1a922124
[test][kbn-plugin-helpers] Skip install dependencies (#20649)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2018-07-16 21:38:39 -07:00
Tim Roes
cb5ee01c6a
Increase prettier line width to 100 (#20535)
* Increase prettier line width to 100

* Fix packages JS prettier

* Change style guide to 100 width

* Fix line-width in latest master changes
2018-07-09 22:50:37 +02:00
Josh Soref
2b27fb1c5f Fix misspellings (#19981) 2018-06-26 20:17:41 -07:00
Spencer
7f0308b700
[plugin-helpers] use execa so that errors include stdout with helpful info (#20110) 2018-06-22 13:17:10 -07: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
Aleh Zasypkin
bc5f05ef2f
Execute tsc.cmd on Windows during build. (#19622) 2018-06-01 18:49:55 +02:00
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
c6112067fc
[typescript] add typescript support for the server and browser (#19104)
* [typescript] add typescript support for the server and browser

* [ts-jest] upgrade to latest version

* [jest] support test.tsx files

* [jest/ts] modify `ts-jest.tsConfigFile` config based on filePath

* [types] use correct major version of minimatch types

* [jest] add ts support to x-pack jest config

* [ts/projects] fix tsconfig.json not found error message

* [optimizer/ts] use lowercase jsx option

* [tsconfig] remove ui/* alias

* [plguin-helpers] remove mention of `buildSourcePatterns`

* [plugin-helpers] expect typescript to be a devDep

* [dev/build] place transpile tasks next to each other

* [ts/x-pack] add common and server directories to ts project

* [dev/ts/project] use a limited set of globs to find tsconfig files
2018-05-18 10:54:57 -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
9bbf8ce12e
[plugin-helpers] fix order of arguments passed to commander actions (#17663) 2018-04-11 12:20:18 -07:00
Spencer
7b827e87a5
[plugin-helpers] report task failures to CLI with exitCode 1 (#17647)
* [plugin-helpers] return promises/fail cli when async tasks fail

* [plugin-helpers] rename taskRunner to commanderAction

* [plugin-helpers] await async assertion
2018-04-10 16:36:26 -07:00
archana
0f49d67db3
Replace tooling-log instances with @kbn/dev-utils (#17324) 2018-03-23 10:54:38 -05:00
Kim Joar Bekkelund
a25f0c0ccb
[plugin helpers] Using --pure-lockfile instead of --frozen-lockfile (#17275) 2018-03-20 19:32:20 +01:00
Spencer
d8b3ca27ab
[plugin-helpers] allow opt-ing out of dependency installation (#16816)
* [kbn-plugin-helpers] allow opt-ing out of dependency installation

* [plugin-helpers] rename buildIgnoreDependencies to skipInstallDependencies

* [plugin-helpers] use noop3 for test

* [plugin-helpers] fix test description

* [plugin-helpers] fix assertion
2018-02-20 16:28:22 -07:00
Kim Joar Bekkelund
f542c31059
[plugin helpers] Use Kibana's Jest setup (#16731)
* [plugin helpers] Use Kibana's Jest

* Remove outer 'describe'

* Async/await in tests

* Assertion improvements
2018-02-14 16:53:34 +01:00
Kim Joar Bekkelund
ea9ed801d2
Remove symlinks when building Kibana plugins (#16727) 2018-02-14 10:56:09 +01:00
Kim Joar Bekkelund
2220852a50
[plugin-helpers] npm -> yarn (#16632)
* [plugin-helpers] npm -> yarn

* Allow globs to not match when singular, e.g. for 'yarn.lock'

* --frozen-lockfile
2018-02-12 00:18:13 +01:00
Spencer
a9f27bbee0
[plugin-helpers] use multiple fixtures so parallel tests don't break each other (#16624) 2018-02-08 17:25:06 -07:00
Spencer
a512466e30
[plugin-helpers] update readme (#16616)
* [plugin-helpers] update the readme to describe changes now that it is in the Kibana repo

* [plugin-helpers/readme] add note about versions before 6.3
2018-02-08 14:45:40 -07:00
spalger
489e64ef7e [plugin-helpers] replace last few uses of old package name 2018-02-08 11:57:08 -07:00
spalger
d2df52a68a [plugin-helpers/eslint] remove unused vars 2018-02-08 11:57:08 -07:00
spalger
3a6be3580c [plugin-helpers] rely on kibana eslint 2018-02-08 11:57:08 -07:00
spalger
6c64a4d77e [plugin-helpers] remove keywords from package.json 2018-02-08 11:57:08 -07:00
spalger
1678ab4466 [kbn-plugin-helpers/yarn] add yarn.lock file 2018-02-08 11:57:08 -07:00
spalger
9f6ebb12b6 [kbn-plugin-helpers] remove redundant configs 2018-02-08 11:57:08 -07:00
Joe Fleming
37990e9cde v9.0.2
Original commit: elastic/kibana-plugin-helpers@3bd57fbe5e
2018-02-05 15:53:23 -07:00
Spencer
608c9ff38b [config] throw if config file has a syntax error (elastic/kibana-plugin-helpers#65)
Original commit: elastic/kibana-plugin-helpers@487dd70bdb
2018-02-05 15:37:22 -07:00
Joe Fleming
e734ee8338 v9.0.1
Original commit: elastic/kibana-plugin-helpers@140024adac
2018-01-04 18:47:50 -07:00
Spencer
26894673ec [npm] upgraded eslint-related deps (elastic/kibana-plugin-helpers#62)
* [npm] upgraded eslint-related deps

* [npm] reflect peer deps from @elastic/eslint-config-kibana

Original commit: elastic/kibana-plugin-helpers@1add265641
2018-01-04 18:37:34 -07:00
Joe Fleming
fdc4ff4bbf chore: ignore yarn.lock file
Original commit: elastic/kibana-plugin-helpers@9cad57cd97
2018-01-04 16:58:36 -07:00
Spencer
b591607f0a [npm] upgrade gulp-zip (elastic/kibana-plugin-helpers#61)
Original commit: elastic/kibana-plugin-helpers@94e7530e76
2018-01-04 16:50:35 -07:00
Kim Joar Bekkelund
f0390c0ef0 v9.0.0
Original commit: elastic/kibana-plugin-helpers@8d5af744bb
2017-12-12 13:37:59 +01:00
Kim Joar Bekkelund
b8c9ef2ff9 Remove kibanaRoot option, require kibana-extra (elastic/kibana-plugin-helpers#58)
* Remove kibanaRoot option, require kibana-extra

* Check location of Kibana on postinstall

* Fix eslint

* Remove 'process.env.KIBANA_ROOT'

Original commit: elastic/kibana-plugin-helpers@3511054dfb
2017-12-12 13:35:24 +01:00
Kim Joar Bekkelund
eec07c5209 Deprecate specifying kibana root location (elastic/kibana-plugin-helpers#59)
Original commit: elastic/kibana-plugin-helpers@385fdede72
2017-12-12 13:11:27 +01:00
Jonathan Budzenski
4f24ea931b v8.1.0
Original commit: elastic/kibana-plugin-helpers@fb979ff679
2017-11-28 13:53:51 -06:00
Jonathan Budzenski
fd2fb5b3a0 Update yarn.lock
Original commit: elastic/kibana-plugin-helpers@b3d62e5925
2017-11-28 13:53:14 -06:00
Jonathan Budzenski
82f3293eff Add support for passing in node options via environment variable (elastic/kibana-plugin-helpers#56)
* Add support for passing in node options via environment variable

* Split node options

* semicolon

Original commit: elastic/kibana-plugin-helpers@3fc4ec0e87
2017-11-28 13:51:20 -06:00
Joe Fleming
b7ded472c1 v8.0.1
Original commit: elastic/kibana-plugin-helpers@2663befdc4
2017-11-21 10:19:16 -07:00
Spencer
0ee2d11a94 [createToolingLog] update require path for toolingLog (elastic/kibana-plugin-helpers#54)
Original commit: elastic/kibana-plugin-helpers@d968819d09
2017-11-21 10:16:08 -07:00
Joe Fleming
047a0ef4d9 chore: add kibanaRoot setting to readme
Original commit: elastic/kibana-plugin-helpers@3769efdb26
2017-11-21 10:12:16 -07:00
Joe Fleming
b8aa8ea38e v8.0.0
Original commit: elastic/kibana-plugin-helpers@d538b32bc3
2017-11-20 12:59:22 -07:00
Jonathan Budzenski
05de884f5d Use scripts/kibana instead of bin if available (elastic/kibana-plugin-helpers#53)
* Use scripts/kibana instead of bin if available

* semicolons

* Don't fallback to legacy bin/kibana start method

* chore: add 8.x version to compat chart

Original commit: elastic/kibana-plugin-helpers@fc72de53bd
2017-11-20 12:58:15 -07:00
Joe Fleming
5a9eed6765 v7.1.2
Original commit: elastic/kibana-plugin-helpers@e314c21bf3
2017-11-09 11:13:20 -07:00
Joe Fleming
8e9443f253 Fix: Package use build target (elastic/kibana-plugin-helpers#52)
* fix: pass build target into package task

use the build target for the zip output

* chore: change up the npm scripts

* chore: add create package tests

* chore: update eslint deps

* chore: fix linting issues, add engines

Original commit: elastic/kibana-plugin-helpers@51058fb7fc
2017-11-09 11:12:36 -07:00
Joe Fleming
7f15f82600 v7.1.1
Original commit: elastic/kibana-plugin-helpers@b489c76b26
2017-11-06 11:28:26 -07:00
Joe Fleming
ca5c47defa fix: read package file instead of using require
require uses a cache, so if the package.json file was changed before running build, the changes won't exist in the build runtime. using fs.readFileSync instead ensures that the information read from package.json is current.

Original commit: elastic/kibana-plugin-helpers@f78e891838
2017-11-06 11:25:19 -07:00
Joe Fleming
7b8cf3c5b7 v7.1.0
Original commit: elastic/kibana-plugin-helpers@11238b2697
2017-09-26 15:16:28 -07:00
Joe Fleming
079c4f0629 Fix: readme include docs (elastic/kibana-plugin-helpers#50)
* chore: add a simple version compat chart

* chore: document the settings and how to use them

* chore: use icon for license info

* chore: use matching badge for circleci status

Original commit: elastic/kibana-plugin-helpers@1f39e488a3
2017-09-26 15:15:31 -07:00
Joe Fleming
b73576b4d5 Feat: add includePlugins setting (elastic/kibana-plugin-helpers#49)
* observe includePlugins setting

* fix: move resolve up to config parser

this ensures that the path is resolved relative to the plugin root

Original commit: elastic/kibana-plugin-helpers@fd07d617a4
2017-09-26 14:45:54 -07:00
Joe Fleming
607354978f v7.0.2
Original commit: elastic/kibana-plugin-helpers@dba9da1b3c
2017-09-20 11:04:57 -07:00
Joe Fleming
a579a3b2bc chore: add yarn.lock file to repo
Original commit: elastic/kibana-plugin-helpers@4108fe6597
2017-09-20 11:04:13 -07:00
Joe Fleming
d12e9902a7 Feat: add translations to default build source paths (elastic/kibana-plugin-helpers#48)
* feat: add translations path to build

included by default, to better match what's in the elastic products and even the plugin template

also add a translations path to the mock plugin for tests

* chore: add script to run tests with linting

Original commit: elastic/kibana-plugin-helpers@9871a4b11d
2017-09-20 11:01:47 -07:00
spalger
a4a41f57de 7.0.1
Original commit: elastic/kibana-plugin-helpers@abb99896ad
2017-09-19 16:38:43 -07:00
spalger
15ee7c7a01 [utils/babelRegister] add support for changes in elastic/kibana#13973
Original commit: elastic/kibana-plugin-helpers@13f30fb4d5
2017-09-19 16:38:19 -07:00
spalger
ea8aa196b0 commit yarn.lock file
Original commit: elastic/kibana-plugin-helpers@22bc67e613
2017-05-09 10:17:45 -07:00
Joe Fleming
eb7e5a0630 7.0.0
Original commit: elastic/kibana-plugin-helpers@2ff10e0a45
2017-05-02 14:40:48 -07:00
Joe Fleming
9f37553324 Bump eslint rules, update code to match rules (elastic/kibana-plugin-helpers#43)
* bump @elastic/eslint-config-kibana and deps

* eslint --fix

* fix unused vars

some exceptions for tests

* move eslint-config-kibana to dev

* rename create_package function

* make .node-version looser, match internal checks

Original commit: elastic/kibana-plugin-helpers@6fac14bd51
2017-05-02 14:37:06 -07:00
Spencer
eb1e80f272 require node 6 (elastic/kibana-plugin-helpers#42)
* switch to .node-version file

* require and validate node version 6+

Original commit: elastic/kibana-plugin-helpers@85655f230e
2017-05-02 14:27:07 -07:00
spalger
42bc99108f [utils] use actual plugin config (with defaults)
Original commit: elastic/kibana-plugin-helpers@f3bfdb2689
2017-04-28 08:15:04 -07:00
spalger
31e731fd04 bump to version 7 snapshot
Original commit: elastic/kibana-plugin-helpers@0c1b2c1670
2017-04-28 07:53:16 -07:00
Spencer
7331033072 Added helpers, KIBANA_ROOT environment override (elastic/kibana-plugin-helpers#41)
* run is now a named export, added helpers for interacting with the kibana repo

* [config] override the kibana root config with KIBANA_ROOT envvar

Original commit: elastic/kibana-plugin-helpers@54a38cd9a2
2017-04-28 07:49:19 -07:00
spalger
0dfc60ded1 6.0.4
Original commit: elastic/kibana-plugin-helpers@0c0ee17a54
2017-03-29 12:23:58 -07:00
spalger
6611bc4c8f fix build task when yarn is not installed
Original commit: elastic/kibana-plugin-helpers@d48808f8d8
2017-03-29 12:23:51 -07:00
spalger
3a2a636da0 6.0.3
Original commit: elastic/kibana-plugin-helpers@b4da11f899
2017-03-28 10:12:22 -07:00
Joe Fleming
a773536c06 Fix running tasks on Windows (elastic/kibana-plugin-helpers#37)
* create windows cmd wrapper

* use windows cmd wrapper on browser tests

* be explicit about the mocha command location

* use windows cmd wrapper on server tests

* use windows cmd wrapper on build

default to using npm as well

Original commit: elastic/kibana-plugin-helpers@35f80a08ce
2017-03-28 00:01:58 -07:00
Joe Fleming
142d2dff2d change let to var (elastic/kibana-plugin-helpers#35)
allow helpers to run on pre-6.0 node

Original commit: elastic/kibana-plugin-helpers@91de9a84d3
2017-03-27 11:30:19 -07:00
spalger
187a94427b 6.0.2
Original commit: elastic/kibana-plugin-helpers@ff9d402245
2017-02-24 13:32:07 -07:00
spalger
c61d2bd11f [tasks/test/browser] fix --kbnServer.tests_bundle flag
Original commit: elastic/kibana-plugin-helpers@12e7552adb
2017-02-24 13:31:52 -07:00
spalger
0a044bf726 6.0.1
Original commit: elastic/kibana-plugin-helpers@8eae537f9f
2017-02-21 10:42:49 -07:00
Megan Walker
314bda86a6 Update URLs in package.json (elastic/kibana-plugin-helpers#31)
The package.json URLs are still referencing @spalger's version, whilst development and collaboration happens on @elastic's version

Original commit: elastic/kibana-plugin-helpers@1f322c1cb1
2017-02-21 10:41:26 -07:00
Joe Fleming
7adc615c1f 6.0.0
Original commit: elastic/kibana-plugin-helpers@9ee7b62e75
2017-01-11 14:43:19 -07:00
Joe Fleming
85234f979b Use npm/yarn to install build dependencies (elastic/kibana-plugin-helpers#28)
* remove scripts and devDependencies from package

these are only useful in development, and serve no purpose in the build

* refactor the package rewriter

* clean up the buildTarget before building

* run npm install after build creation

* break apart the create_build module

* add create_package modules

call it from within the build_action

* add flag to skip package zip creation

* rename skip-package flag to skip-archive

* rename rewritePackage to rewritePackageJson

* include lock and shrinkwrap files if they exist

* add test for skipping zip creation

* add some tests to build creation

Original commit: elastic/kibana-plugin-helpers@ef6b9c6332
2017-01-11 14:41:05 -07:00
Joe Fleming
569ac1f3d1 5.2.0
Original commit: elastic/kibana-plugin-helpers@8c2a547d9d
2016-12-23 10:50:07 -07:00
Joe Fleming
d258d24b13 Allow custom build target via --build-destination flag (elastic/kibana-plugin-helpers#30)
* pass buildTarget into createBuild

allow override from options

* add cli option to override build destination

--build-destination

* fix tests

* resolve build destination from plugin.root

this allows both relative and absolute paths to be used

* add short option

* update the help

Original commit: elastic/kibana-plugin-helpers@6c9fb3464e
2016-12-23 10:48:06 -07:00
Joe Fleming
efa7302364 return the result of running the action
Original commit: elastic/kibana-plugin-helpers@9b819eeeb3
2016-12-22 15:58:56 -07:00
Joe Fleming
ceb52252be Enable custom builds (elastic/kibana-plugin-helpers#27)
* only modify root package.json file

previously this was modifying every package.json from node_modules as well

* refactor the build task

export the build, define helpers outside of the task

* allow custom kibana and build versions

both can be passed via flags

* allow custom build globs to be specified

* move build into its own module

* add simple option parsing tests

* update readme

* move dependency file appending into the action

* put source and target into variables

* move config file loading into a module

* refactor test_server_action slightly

be more explicit about the files option overwriting the plugin settings

* move default build patterns to plugin config

allows the setting to be overridden via the config file

* fix dirname on relative includes

trim any leading '../' off the path when moving it into the build target

* move node_module dirs into plugin_config module, use existing promises

* rename file_config => config_file

Original commit: elastic/kibana-plugin-helpers@743e4a37c2
2016-12-21 22:37:57 -06:00
Joe Fleming
4cc81e2c89 5.1.1
Original commit: elastic/kibana-plugin-helpers@ad9a8e85b8
2016-12-21 18:22:03 -07:00
Joe Fleming
4456490cc5 fix cli parsing of --dev flag
Original commit: elastic/kibana-plugin-helpers@3aa37c2dfc
2016-12-21 18:21:15 -07:00
Joe Fleming
269bdc45e2 node4 support: const -> var
Original commit: elastic/kibana-plugin-helpers@19b607d954
2016-12-16 18:20:35 -07:00
Joe Fleming
5bc1308422 format the package.json file
Original commit: elastic/kibana-plugin-helpers@c474820bb5
2016-12-16 18:20:35 -07:00
Joe Fleming
a145458138 append build info to package.json
Original commit: elastic/kibana-plugin-helpers@504fd07f3c
2016-12-16 18:20:33 -07:00
Joe Fleming
dd0d91cfd0 update the readme
Original commit: elastic/kibana-plugin-helpers@c650c4527e
2016-12-16 09:41:32 -07:00
Joe Fleming
802d68ecc9 5.1.0
Original commit: elastic/kibana-plugin-helpers@6dd1407e81
2016-12-16 09:39:35 -07:00
Joe Fleming
0d621e778a Separate the task runner and the command line parser (elastic/kibana-plugin-helpers#25)
* remove conditionl require in runner

add tasks module to load all tasks, throw if task does not exist

* change task signatures and action handlers

- tasks get plugin, run, and an options object
- action handler controls what goes into each task
- taskRunner wrapper moves the command object to the first argument

* change test command signature

allow files to be passed in, and pass all options to test:server and test:browser

* simplify the task runner

* fix typo in unknownOptions

* expose the task runner as the module's main

this way tasks can be run programatically without going through a cli parser

* add tests for task runner

* remove file passing for testAll

* add serverTestPaths to the plugin config

useful for overriding the value via a config file

* [config] plugin.serverTestPaths -> plugin.serverTestPatterns

Original commit: elastic/kibana-plugin-helpers@82af4df64e
2016-12-16 01:06:02 -07:00
Joe Fleming
0ee64597fb add not about custom tests executiong to the readme/help
Original commit: elastic/kibana-plugin-helpers@139221e5a6
2016-12-15 15:14:29 -07:00
Joe Fleming
867ed91517 make server test files an argument
Original commit: elastic/kibana-plugin-helpers@b043b423ef
2016-12-15 14:56:47 -07:00
Joe Fleming
01a8fcee35 assign args in argument passing code
minor syntax change

Original commit: elastic/kibana-plugin-helpers@ce77d071d1
2016-12-15 14:24:44 -07:00
Joe Fleming
beb4b33f62 if plugins are specified, use the option value instead of the default
Original commit: elastic/kibana-plugin-helpers@d610c9c9d6
2016-12-15 14:24:44 -07:00
Joe Fleming
47595e7bdd add plugins option to browser tests
used to pass your own testsBundle.pluginIds to the test runner

Original commit: elastic/kibana-plugin-helpers@d370d74bd4
2016-12-15 14:24:44 -07:00
Joe Fleming
8b6ac6469c split and concat and included server test paths
Original commit: elastic/kibana-plugin-helpers@e7dffb6ffe
2016-12-15 14:24:44 -07:00