Commit graph

1698 commits

Author SHA1 Message Date
Thomas Watson 6b9079c9cb
Force-bump prismjs to v1.22.0 (#83672) 2020-11-23 13:24:43 +01:00
Mikhail Shustov 95861a0fb0
[DX] Prettier v2.2 (#83899)
* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
2020-11-23 13:17:05 +01:00
Pierre Gayvallet e176def756
create kbn-legacy-logging package (#77678)
* create kbn-legacy-logging package and start to move things

* fix rotator tests

* fix logging system test mocks

* move logging format to the package

* move logging setup to package

* adapt legacy logging server

* remove usage of legacy config in the legacy logging server

* move legacy logging server to package

* remove `??` syntax from package

* update generated doc

* fix a few things due to month old merge

* remove typings from project

* move reconfigureLogging to package

* add basic README file

* update generated doc

* remove old typings

* add typing for legacy logging events

* remove `??` from packages

* fix / improve event types usages

* remove suffix from tsconfig
2020-11-22 20:46:38 +01:00
Thomas Watson 90658d5ccb
Drop use of console-stamp (#83922) 2020-11-22 11:14:57 +01:00
Spencer 0db0d95142
[kbn/optimizer/node] properly separate lmdb databases, log better (#83849)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-20 09:51:38 -07:00
Thomas Watson 131a1ba91a
Bump jest (and related packages) to v26.6.3 (#83724)
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-20 07:08:04 +01:00
Spencer 45d3861219
Revert lmdb-store upgrade (#83830)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 13:10:58 -07:00
Tiago Costa f2d97a9fe2
chore(NA): update lmdb store to v0.8.15 (#83726)
* chore(NA): upgrade lmdb-store to v0.8.15

* chore(NA): remove unused ts-error statements
2020-11-19 00:08:50 +00:00
Mikhail Shustov 4917df30b9
Update typescript eslint to v4.8 (#83520)
* update deps

* update rules

use type-aware @typescript-eslint/no-shadow instead of no-shadow. do not use no-undef, rely on TypeScript instead

* fix or mute all lint errors

* react-hooks eslint plugin fails on ? syntax

* fix wrong typings in viz

* remove React as a global type

* fix eslint errors

* update version to 4.8.1

* fix a new error
2020-11-18 18:23:08 +01:00
Dmitry b9fc45bb5d
update chromedriver dependency to 87 (#83624) 2020-11-18 15:22:20 +01:00
Greg Thompson 8a7af5bbda
Upgrade EUI to v30.2.0 (#82730)
* eui to v30.2.0

* src snapshot updates

* x-pack euipanel snapshot updates

* x-pack external link updates

* security_solution_cypress external link text

* clean up
2020-11-17 14:29:57 -07:00
Thomas Watson 9caaa0c7e0
Bump Node.js from 12.19.0 to 12.19.1 (#83452) 2020-11-17 09:41:35 +01:00
Aleh Zasypkin c043eafcda
Upgrade nodemailer dependency (4.7.06.4.16). (#83445) 2020-11-17 09:27:19 +01:00
Spencer 422dd2b6d5
upgrade to lmdb-store 0.8 (#83479)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-16 15:04:34 -07:00
John Schulz 380fa5b3f6
[bundle optimization] Update to semver 7.x to get tree-shaking (#83020)
## What's changed in this PR
### Update to latest available `semver`: `7.3.2`
 * `semver` 5.x pulls in the entire library in one large file (~38k uncompressed / ~9k gz), when we might only use 1-2K.
 * `semver` 7.0+ supports tree-shaking: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#700

### Update paths to only import individual function(s) used instead of the entire library
  * Getting the smaller bundle requires a different import style [as shown in the docs](https://github.com/npm/node-semver#usage)
  * Only changed code in `public` & `common` folders; not `server`. We could also update `server` as well for consistency, but I skipped because the new import style is more verbose and the filesize didn't seem as important on the server

### Results
The build stats show a 10K+ improvement for initial page bundles https://github.com/elastic/kibana/pull/83020#issuecomment-724724432

| id | [before](c6afc47f32) | [after](213bb52a8c) | diff |
| --- | --- | --- | --- |
| `ingestManager` | 386.2KB | 373.9KB | -12.3KB |
| `telemetry` | 63.5KB | 50.1KB | -13.5KB |
| `upgradeAssistant` | 74.5KB | 60.5KB | -14.0KB |
| total |  |  | -39.7KB |

### The import paths look odd. Are they required?
I agree and, no, they're not strictly required. If you'd like me to revert to the prior style just drop a comment and I'll undo them.

The caveat is that the current style (in `master` & this PR) pulls in the entire `semver` library. In 7.x that added ~15K to the initial size. Some more details in the comments: https://github.com/elastic/kibana/pull/83020#issuecomment-724859130

### Possible issues
Moving 2 major versions. We're currently on 5.7 and the latest available is 7.3. 
  * changelog says 5.x (our current) to 6.0 should be safe: https://github.com/npm/node-semver/blob/master/CHANGELOG.md#60
  * There 6.x & 7.x changes all appear to be new features or bugfixes around the `includePrerelease` flag added in 5.6, but I'm not sure if those "fixes" will break existing code
    * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#613
    * https://github.com/npm/node-semver/blob/master/CHANGELOG.md#722

### Stats / screenshots
generated with `node scripts/build_kibana_platform_plugins.js --profile --focus=ingestManager`
<details><summary><b>Ingest Manager in `master`</b>: imports entire `semver` lib, totals 40k+, only 1 large file (orange arc below)</summary>

<img width="972" alt="Screen Shot 2020-11-09 at 6 50 23 PM" src="https://user-images.githubusercontent.com/57655/98666188-a50ac380-231a-11eb-9b8a-6ca784752714.png">
</details>

<details><summary><b>Ingest Manager in PR after upgrade to 7</b>: still imports entire lib. file size *increased* to ~60k, but now individual files are imported (orange arcs below)</summary>
<img width="825" alt="Screen Shot 2020-11-09 at 5 46 30 PM" src="https://user-images.githubusercontent.com/57655/98666355-e602d800-231a-11eb-803f-bc04beb4eaf1.png">
<img width="963" alt="Screen Shot 2020-11-09 at 5 47 06 PM" src="https://user-images.githubusercontent.com/57655/98666357-e69b6e80-231a-11eb-92d3-c66904f92c30.png">
</details>

<details><summary><b>Ingest Manager in PR after changing `import`s:</b> total imported size down to ~20k. Can see individual imported files</summary>
<img width="926" alt="Screen Shot 2020-11-10 at 6 10 23 AM" src="https://user-images.githubusercontent.com/57655/98667058-e64fa300-231b-11eb-9690-5e36ed6475e0.png">
<img width="895" alt="Screen Shot 2020-11-10 at 6 10 53 AM" src="https://user-images.githubusercontent.com/57655/98667059-e780d000-231b-11eb-8abf-98d8bdbcf061.png">
</details>

### Checklist

- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2020-11-14 07:32:02 -05:00
Thomas Watson 4c49d5d1be
Upgrade Node.js to version 12 (#61587) 2020-11-12 22:00:57 +01:00
Dima Arnautov c32215d7ff
[ML] Fix apiDocs extractor script (#82582)
* [ML] fix serializer script

* [ML] fix extractor

* [ML] bump apiDoc version

* [ML] update yarn.lock
2020-11-11 15:42:53 +01:00
Tiago Costa 81b3a48c2c
chore(NA): move types wrongly add on production deps to dev deps (#83048) 2020-11-11 01:08:39 +00:00
Larry Gregory 55cf3bd0a6
Update grunt and related packages (#79327)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-09 11:33:57 -05:00
Patryk Kopyciński d2d30e7f80
Bump cypress dependencies (#82815) 2020-11-09 16:54:48 +01:00
Larry Gregory 98b46c91bd
Update webpack-dev-server and webpack-cli (#82844) 2020-11-06 13:56:59 -05:00
Larry Gregory 6b60599cba
Remove yeoman & yo (#82825) 2020-11-06 11:49:53 -05:00
John Schulz 82a8302243
[Ingest Manager] Remove dupe code between two unpack*ToCache fns (#82801)
## Summary

Update `unpackRegistryPackageToCache` to call `unpackArchiveToCache` instead of duplicating much of it.

Now an archive is iterated & put in cache via the same function regardless of its initial source.
2020-11-06 11:26:12 -05:00
Larry Gregory 3da6efcc73
Bump trim to 0.0.3 (#82800) 2020-11-06 07:06:11 -05:00
Patryk Kopyciński 8146034559
[Security Solution] Bump why-did-you-render (#82591) 2020-11-06 11:18:42 +01:00
Thomas Watson bbfcebd4bd
Sort and clean up dependencies in package.json (#82404) 2020-11-03 15:22:48 +01:00
Tiago Costa 0eeaafa722
chore(NA): move into single pkg json (#80015)
* chore(NA): update gitignore to include first changes from moving into a single package.json

* chore(NA): update gitignore

* chore(NA): move all the dependencies into the single package.json and apply changes to bootstrap

* chore(NA): fix types problems after the single package json

* chore(NA): include code to find the dependencies used across the code

* chore(NA): introduce pure lockfile for install dependencies on build

* chore(NA): update clean task to not delete anything from xpack node_modules

* chore(NA): update gitignore to remove development temporary rules

* chore(NA): update notice file

* chore(NA): update jest snapshots

* chore(NA): fix whitelisted licenses to include a new specify form of an already included one

* chore(NA): remove check lockfile symlinks from child projects

* chore(NA): fix eslint and add missing declared deps on single pkg json

* chore(NA): correctly update notice

* chore(NA): fix failing jest test for storyshots.test.tsx

* chore(NA): fix cypress multi reporter path

* chore(NA): fix Project tests check

* chore(NA): fix problem with logic to detect used dependes on oss build

* chore(NA): include correct x-pack plugins dep discovery

* chore(NA): discover entries under dynamic requires on vis_type_timelion

* chore(NA): remove canvas

* test(NA): fix jest unit tests

* chore(NA): remove double react declaration from storyshot test file

* chore(NA): try removing isOSS check

* chore(NA): support for plugin development

* chore(NA): update logic to fix unit tests and typechecking

* chore(NA): support to run npm scripts in child kbn projects across all envs

* chore(NA): support github checks reporter on x-pack and remove cpy types as the package correctly provides them

* chore(NA): update cpy version

* chore(NA): include last kbn pm changes

* chore(NA): update style on build_production_projects.ts

* chore(NA): remove any cast fom telemetry opt in stats

* chore(NA): remove del and re-use rm -rf again

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-02 21:18:52 +00:00
Thomas Watson 700225061a
Upgrade to hapi version 18 (#80468) 2020-11-02 13:18:00 +01:00
Greg Thompson 6fdc7eb1fa
Upgrade EUI to v30.1.1 (#81499)
* eui to v30.0.0

* removed unused RecentLinks component

* update compressed -> display prop

* euiformrow compressed -> display

* euipopover remove withtitle

* euibuttongroup prop updates

* remove euibuttontoggle

* src snapshot updates

* tutorial euibuttongroup update

* x-pack snapshot updates

* euibuttongroup test updates

* TODO

* misc. js file updates

* remove euinavdrawer scss references

* translation removals

* more x-pack snapshot updates

* update data-test-subj lookup

* icons logoAMP -> logoObservability

* cypress selector updates

* update euibuttontoggle onchange, test interaction

* Fix auto-update toggle in Visualize

* some more change -> click test updates

* idtoselectedmap change

* Fix feature table button group

* Remove empty SASS file

* Fix feature table button group II

* Using `compressed` to also dictate dual range row

* Fix a few security labels

* An ML fix

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* remove unused translation

* update view_type_toggle snapshot

* more snapshot updates

* eui to 30.1.0

* undo temp ts-ignore

* more x-pack snapshot updates

* eui to 30.1.1

* update feature privilege text

* Update x-pack/plugins/security/public/management/roles/edit_role/privileges/kibana/feature_table/sub_feature_form.tsx

Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>

* reuse i18n token

* Adapt log entry action button to new `minWidth` prop

* clean up label

* Combine auto apply strings into one

* ternary fix

* cases status useCallback

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
2020-10-30 16:18:27 -06:00
renovate[bot] 67f46ae223
Update dependency @elastic/charts to v24 (#80982)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-22 18:21:13 +02:00
Tim Sullivan ae95bf2b05
[Reporting/Tech Debt] Convert PdfMaker class to TypeScript (#81242)
* convert pdf.js to TS

* more typescript

* simplify caller

* more typescript

* more typescript

* fix the code to match the expected interface

* very cool comment

* interface correction

* remove unused class method

* add unit test for PdfMaker

* file rename for typo correction

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-21 13:54:52 -07:00
Mikhail Shustov 93473e4f58
bump elastic/elasticsearch-js version to 7.10.0-rc1 (#81288) 2020-10-21 21:36:19 +02:00
Chandler Prall 42a1744af6
Upgrade EUI to v29.5.0 (#80753)
* Upgraded eui to v29.5.0; snapshot updates

* Cleaned up some types

* addresses feedback on types change

* Update EuiIcon snapshots in jest integration tests

* Updated snapshot from rebasing on master
2020-10-19 14:48:33 -06:00
Nathan L Smith 5f3e2c05e8
Add Storybook a11y addon (#80069) 2020-10-15 17:25:34 -05:00
Spencer 07c1284e9d
[kbn/bootstrap] validate that certain deps don't ship in production (#80549)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-15 09:56:10 -07:00
renovate[bot] 7eca24fd58
Update dependency vega-lite to ^4.17.0 (#80382)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-10-14 09:45:53 +03:00
Dmitry Lemeshko f8e247a7e6
update chromedriver dependency to 86.0.0 (#79972) 2020-10-09 09:51:10 +02:00
Dima Arnautov 827f0c06fe
[ML] Replace swim lane implementation with elastic-charts Heatmap (#79315)
* [ML] replace swim lane vis

* [ML] update swimlane_container, add colors constant

* [ML] update swimlane_container, add colors constant

* [ML] update swimlane_container, add colors constant

* [ML] unfiltered label for Overall swim lane

* [ML] tooltip content

* [ML] fix styles, override legend styles

* [ML] hide timeline for overall swimlane on the Anomaly Explorer page

* [ML] remove explorer_swimlane component

* [ML] remove dragselect dependency

* [ML] fix types

* [ML] fix tooltips, change mask fill to white

* [ML] fix highlightedData

* [ML] maxLegendHeight, fix Y-axis tooltip

* [ML] clear selection

* [ML] dataTestSubj

* [ML] remove jest snapshot for explorer_swimlane

* [ML] handle empty string label, fix translation key

* [ML] better positioning for the loading indicator

* [ML] update elastic/charts version

* [ML] fix getFormattedSeverityScore and showSwimlane condition

* [ML] fix selector for functional test

* [ML] change the legend alignment

* [ML] update elastic charts
2020-10-06 20:51:23 +02:00
Mikhail Shustov 2ca8aaad63
build all ts refs in single kbn:bootstrap (#79438) 2020-10-06 08:33:24 +02:00
renovate[bot] 745b5c1271
Update dependency @elastic/charts to v23.1.1 (#78459)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-05 16:12:34 -07:00
Chandler Prall 3bad1fc328
Upgraded EUI to v29.3.0 (#78870)
* Upgraded EUI to v29.2.0

* Remove hacks on top of EuiHeaderLink(s)

* Actual update to eui@29.2.0

* Resolve typescript issue when omitting a key over a union

* Resolve nav menu test's expectations

* Fix lint issue

* Update to 29.3.0

* Revert vega snapshot update

I don’t think this was intended to change when I ran the updater

* [ui-shared-deps] strip proptypes from ui-shared-deps production build

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-05 12:44:29 -06:00
Spencer 9e1c44fcc0
add core-js production dependency (#79395)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-04 21:33:12 -07:00
Spencer ddf2d82e44
[kbn/optimizer] implement more efficient auto transpilation for node (#79052)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-02 18:36:25 -07:00
Spencer dc0bccf8f8
[babel/register] remove from build (take 2) (#79379)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-02 16:30:16 -07:00
spalger f7a18e6454 Revert "[babel/register] remove from build (#79176)"
This reverts commit 511eb0f23b.
2020-10-02 14:49:01 -07:00
Spencer 511eb0f23b
[babel/register] remove from build (#79176)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-02 13:24:39 -07:00
Nick Partridge e9fd3902c5
upgrade @elastic/charts to v23.0.0 (#79226)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 19:48:40 +02:00
Tiago Costa e5d8d49164
chore(NA): assures a single version for the same dependency across the entire project (#78825)
* chore(NA): script to check for multiple version of same dependency

* chore(NA): remove multiple versions for the same dependency

* chore(NA): hook single_version_dependencies script into the CI

* chore(NA): remove grunt from the CI hook integration

* chore(NA): update kbn pm dist

* chore(NA): fix typechecking

* chore(NA): update code to run under last extract-zip version

* fix(NA): multiple versions of the same type dependency

* move validation to bootstrap (#13)

Co-authored-by: spalger <spalger@users.noreply.github.com>

* chore(NA): todo to remove logic to validate single version deps once we move into a single package.json

* chore(NA): remove verify dependency versions jenkins task

* chore(NA): update kbn pm dist file

* chore(NA): remove last mention to verify_dependency_versions.sh fom tasks.groovy

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 00:46:00 +01:00
Tyler Smalley 7211f78ce1
Bumps Jest related packages (#78720)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-10-01 14:38:51 -07:00
Shahzad c1a3002c16
update rum agent version which contains longtasks (#79105) 2020-10-01 17:37:02 +02:00