Commit graph

62 commits

Author SHA1 Message Date
Spencer eaf70a0b4e
[kbn/ui-shared-deps] split into two packages (#110558)
* [kbn/ui-shared-deps] split into two packages

* fix asset categorizer

* update snapshots

* reference npm dll from optimizer

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-09-16 12:06:46 -07:00
Tiago Costa 36eaf7fd58
chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843)
* chore(NA): enables @babel/plugin-transform-runtime to decrease output size

* chore(NA): update @kbn/pm bundle

* chore(NA): missing config on corejs for runtime

* fix(NA): flaky unit test

* chore(NA): update limits file

* chore(NA): remove corejs

* chore(NA): old config files

* chore(NA): update limmits file

* chore(NA): updated yarn lock file

* chore(NA): update limits

* chore(NA): restore original test file

* chore(NA): skip flaky test

* chore(NA): skip another failing test
2021-08-25 22:24:38 +01:00
Tiago Costa e0ea3233d9
chore(NA): moving @kbn/es-query to babel transpiler (#107281)
* chore(NA): moving @kbn/es-query to babel transpiler

* chore(NA): update limits
2021-07-30 18:38:02 +01:00
Greg Thompson fa03028688
Enable CSS-in-JS styling with emotion (#98157)
* emotion deps

* kbn-babel

* kbn-test

* examples

* babel-plugin-styled-components config

* css prop type fixes

* type context

* declaration location

* some emotion types resolved

* clean up

* emotion v10 accomodations

* types

* kbn-crypto

* kbn-telemetry-tools

* bazel

* eslint rule; shared file regex array

* update paths

* Update packages/kbn-eslint-plugin-eslint/rules/module_migration.js

Co-authored-by: Spencer <email@spalger.com>

* remove placeholder styles

* doc api changes

* snapshot updates

* storybook comments

* use constant

* bump new deps

* condense versions

Co-authored-by: Spencer <email@spalger.com>
2021-07-09 13:42:50 -05:00
Tiago Costa 9129887bb7
chore(NA): moving @kbn/monaco into bazel (#100709)
* chore(NA): moving @kbn/monaco into bazel

* chore(NA): update register globals definitions

* chore(NA): remove build script

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 18:55:28 +01:00
Tiago Costa 00940dd0f5
chore(NA): moving @kbn/babel-code-parser into bazel (#97675)
* chore(NA): moving @kbn/babel-code-parser into bazel

* docs(NA): missing docs about new package

* chore(NA): removing quiet arg

* chore(NA): fix packages build srcs

* chore(NA): change source order on tinymath

* chore(NA): add babelrc

* chore(NA): clear package build migration

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-23 17:48:48 +01:00
Tiago Costa b6fd28884b
chore(NA): moving @kbn/babel-preset into bazel (#97271)
* chore(NA): moving @kbn/babel-preset into bazel

* chore(NA): remove unused deps from xpack package.json
2021-04-19 12:37:56 +02:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Brandon Kobel 170a2956c8
Updating the License (#88343)
* Updating the Licenses, except for applying eslint, building

* Applying ESLint rules,building @kbn/pm, regenerating api docs
2021-01-19 17:52:56 -08:00
Thomas Watson 920e4fa280
Update code-comments describing babel plugins (#84622) 2020-12-01 15:55:54 +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
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
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
Spencer 0ee253e9e0
[optimizer] strip proptypes from plugin bundles in production (#79221)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-01 16:43:13 -07:00
Spencer 12d0125024
[babel] remove unused/unneeded babel plugins (#79173)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 12:23:45 -07:00
Spencer 4c810be335
Remove legacy optimizer (#73154)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 09:08:44 -07:00
Mikhail Shustov 47fdd59e1c
bump babel deps to support TS v4 (#74495) 2020-08-06 22:00:40 +02:00
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Tyler Smalley c675301a87
[build] Removes commonjs transforms (#66506)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-21 09:43:31 -07:00
patrykkopycinski 2d32034f96
Bump styled-component dependencies (#66611) 2020-05-20 16:03:44 +02:00
Tiago Costa e3ee02c687
chore(NA): reduce siem bundle size using babel-plugin-transfor… (#63269)
* chore(NA): reduce siem bundle size using babel-plugin-transform-imports for lodash

* fix(NA): dont use preventFullImport

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-23 17:43:34 -07:00
Mikhail Shustov a8f92c5e0b
bump up babel version (#61037)
* bump babel version

* build kbm-pm

* refresh transitive @babel/* versions to kick yarn into shape

* update kbn/pm dist

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-25 16:37:30 +01:00
Tiago Costa dbaa6b1fb7
chore(NA): use the same polyfill between the dev environment and the jest env (#57467) 2020-02-12 18:36:29 +00:00
Joe Portner 13593344a0
Add lockfile symlinks (#55440)
This is to enable dependency scanning tools to correctly resolve
the dependencies in each package.json file that is used in
production.
2020-01-27 11:38:20 -05:00
spalger a926e3419d Revert "Update babel related packages (#52754)"
This reverts commit 9a115f078f.
2019-12-17 11:32:49 -07:00
patrykkopycinski 4d50442acc
Update babel-typescript config (#53108)
* Update babel-typescript config

* Add @babel/preset-react
2019-12-16 19:28:54 +01:00
renovate[bot] 9a115f078f Update babel related packages (#52754)
* Update babel related packages

* update kbn/pm dist
2019-12-14 20:14:47 -07:00
spalger 8e9a8a84dc autofix all violations 2019-12-13 23:17:13 -07:00
patrykkopycinski 0c6516f1bc
Add babel-plugin-styled-components to webpack config (#52862) 2019-12-12 16:29:59 +01:00
Spencer 3293ede421
remove remaining idx usage (#52354)
* remove remaining idx usage

* handle possibly undefined value

* update NOTICE.txt
2019-12-09 15:59:07 -07:00
Tim Roes bbb9421678
Make babel understand TypeScript 3.7 syntax (#50772)
* Use correct babel plugins

* Make one change using new operator

* Fix i18n babel config
2019-11-15 18:29:25 +01:00
Tiago Costa a014241a3c
fix(NA): correctly reference babel plugin into the node babel preset (#50090) 2019-11-07 17:25:00 -05:00
Gidi Meir Morris c485893ab2
Improves performance of task execution in Task manager
This PR include three key changes:

1. Run tasks as soon as they have been marked as running, rather than wait for the whole batch to me marked
2. Use a custom refresh setting of refresh: false where possible, in place of wait_for, in order to speed up Task Manager's internal workflow
3. Instrumentation of Task Manager exposing Activity / Inactivity metrics in Performance test runs
2019-11-06 08:44:13 -05:00
Nathan L Smith fa951abfdc
Do not use env key in Babel common preset (#48661)
The merging behavior of having both `plugins` and `env.test.plugins` in the Babel configuration is confusing and does not work how we would like (that is, disabling the idx Babel plugin in test environments.)

There had been some [discussion about deprecating the `env` key in Babel](https://github.com/babel/babel/issues/5276) because of this behavior and recommending using conditional logic. The behavior has been modified in later versions of Babel, but still does not work as intended in our case.

Change this to only add the idx plugin if we're in a non-test environment.
2019-10-21 16:23:59 -05:00
Nathan L Smith 209fef0e0b
Do not use the idx babel plugin in the test environment (#47994)
When running Jest with `--coverage`, modules using idx fail with the error shown in facebookincubator/idx#19.

Change the babel configuration so that is `NODE_ENV=test`, the idx plugin is not loaded.
2019-10-14 10:36:10 -05:00
Dmitry Lemeshko 3495f86c45
Collecting code coverage from functional tests (#40512)
* get coverage for console functional test

* instrument kibana

* collect coverage stats after each test, on url navigation, refresh and back

* switch to babel-plugin-istanbul

* switch to babel-plugin-istanbul

* [coverage service] basic version

* trigger final coverage flush when ftr finishes, wait for all logs before exiting

* add coverage report generation

* increase optimizer timeout, re-run idx/babel plugin before istanbul

* increase memory usage for node

* put istanbul preset in the beginning to run as the last one

* bump babel-plugin-istanbul up to 5.2.0

* cleanup

* save unique json files with coverage

* [functional test coverage] update coverage.json path

* run code coverage on CI

* increase max-old-space-size with env variable

* fix coverage folder creation

* use env variable to configure code coverage

* revert ci config changes

* remove duplicate plugin

* remove comments

* fixes
2019-10-10 07:56:49 +02:00
Spencer 4f4bb02299
manually setup module transforms so to support async imports in webpack (#44413) 2019-08-29 14:04:12 -07:00
Spencer 1595abebe6
[babel-preset/webpack] use corejs 3 (#44154) 2019-08-27 18:12:49 -07:00
Tiago Costa a5c63537a2
chore(NA): fix babel plugin discover for thread-loader-warmup (#44106)
* chore(NA): fix babel plugin discover for thread-loader-warmup

* chore(NA): apply changes accordingly the PR review
2019-08-27 18:17:47 +01:00
renovate[bot] 572274b779 Update babel related packages (#43595)
* upgrade all babel related modules, and bump lodash minors

* update kbn-pm dist

* update fetch-mock, necessary to use core-js 3

* use regenerator transform in jest tests, as required by EUI

* disable useBuiltIns rather than using regenerator plugin

* remove extra regenerator-runtime import
2019-08-22 18:40:57 -07:00
Josh Dover c2ef2c8f51
Add support for dynamic imports (#43716) 2019-08-22 09:48:39 -05:00
Spencer 06b9853925
[autoprefixer] upgrade to 9.6.1, unify browserslist handling (#41038)
* [autoprefixer] upgrade to 9.6.1, unify browserslist handling

* remove debug option from datemath babel config
2019-07-15 09:33:33 -07:00
Spencer 066cd55a65
[kbn/babel-preset] add readme (#39854) 2019-06-28 11:06:46 -07:00
Court Ewing 2d171c92f5 Fix path references into and out of x-pack/legacy 2019-06-20 13:34:48 -04:00
renovate[bot] 830bd1f0ca Update babel related packages (#37464) 2019-05-30 13:40:23 -07:00
renovate[bot] 9256c74fdf Pin dependencies (#37406)
* Pin dependencies

* include core-js in babel packages

* specify core-js version when using `useBuiltIns`

* dedupe @babel/types to avoid "range of null" problem
2019-05-30 00:31:01 -07:00
FrankHassanabad 6e579b47e4
Merge remote-tracking branch 'upstream/master' into feature-secops 2019-04-24 09:20:43 -06:00
Oliver Gupte 609d75103c
[APM] Optimize idx calls to native optional chaining (#34841)
* [APM] Add new kibana package '@kbn/babel-plugin-apm-idx' based on
'babel-plugin-idx' to work with the APM implementation of the deep
object property helper function. Configure it as a babel plugin in the
common babel preset.

* [APM] modified the expanded output code to handle null checking correction for nested properties and added tests.

* [APM] use same versions of babel and jest as core kibana. fixes broken tests.

* [APM] created namespaced package `@kbn/elastic-idx`. Made available the
apm/common/idx and the corresponding babel plugin under this package.
Modified all imports of apm/common/idx to @kbn/elastic-idx.

* [APM] add typescript build to the @kbn/elastic-idx package

* [APM] fix idx import and linting failures

* [APM] make @kbn/elastic-idx/babel plugin detect idx calls as member functions from the bound scope
2019-04-22 13:37:07 -07:00