* [build_ts_refs] improve caches, allow building a subset of projects
* cleanup project def script and update refs in type check script
* rename browser_bazel config to avoid kebab-case
* remove execInProjects() helper
* list references for tsconfig.types.json for api-extractor workload
* disable composite features of tsconfig.types.json for api-extractor
* set declaration: true to avoid weird debug error
* fix jest tests
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
# .gitignore
# examples/hello_world/tsconfig.json
# tsconfig.json
# tsconfig.refs.json
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* chore(NA): moving @kbn/apm-utils into bazel
* chore(NA): add kbn/apm-utils into package.json
* chore(NA): missing standard on build file globs
* chore(NA): be more explicit about incremental setting
* chore(NA): include pretty in the args for ts_project rule
* docs(NA): include package migration completion in the developer getting started
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
* chore(NA): add warnings both to run and watch commands about Bazel built packages
* chore(NA): add new commands to build and watch bazel packages
* docs(NA): add documentation about how to deal with bazel packages
* chore(NA): addressed majority of the feedback received except for improved error logging
* chore(NA): disable ibazel info notification.
* chore(NA): remove iBazel notification
* chore(NA): remove iBazel notification - kbn pm dist
* chore(NA): move show_results option to kbn-pm only
* chore(NA): patch build bazel command to include packages target list
* chore(NA): add pretty logging for elastic-datemath
* chore(NA): remove double error output from commands ran with Bazel
* fix(NA): include simple error message to preserve subprocess failure state
* docs(NA): missing docs about how to independentely watch non bazel packages
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
* chore(NA): move elastic-datemath into a ts package
* chore(NA): finish elastic-datemath
* chore(NA): finish elastic-datemath
* chore(NA): source folder for elastic-datemath
* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages
* chore(NA): add sourcemaps to packages on typescript
* chore(NA): move test fixtures within source
* chore(NA): correct exclusions on packages
* chore(NA): correct package.json on all packages
* chore(NA): correct package.json on all packages
* chore(NA): complete kbn pm
* chore(NA): default export on elastic-datemath
* chore(NA): include logs on kbn-logging
* chore(NA): update bundle ref module to last code used in the webpack upstream
* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored
* chore(NA): remove override method for exportsArgument
* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package
* fix(NA): typescript projects check
* fix(NA): run optimizer integration tests from source
* chore(NA): fix usage from target for kbn optimizer
* chore(NA): path on tsconfig
* chore(NA): move tsignore into ts-expect-error
* chore(NA): include souce maps on kbn cli dev
* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools
* chore(NA): add issue links into the ts-expect-error comments
# Conflicts:
# packages/elastic-datemath/README.md
# packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts
* chore(NA): move from mocha to jest
* chore(NA): init changes on sinon replacement
* chore(NA): continue to use sinon for timer mocks
* docs(NA): explaining why we keep to use sinon on elastic datemath
* chore(NA): remove sinon from elastic-datemath
* 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>
# Conflicts:
# package.json
# packages/kbn-pm/dist/index.js
# x-pack/package.json
# yarn.lock
* move test_helpers to the core
* create base tsconfig
* all tsconfigs use the base one
* use test_helpers exposed from the src/core
* move getFieldFormatsRegistry to data plugin
* add test_utils project
* compile types after checkout
* add a stub for platform tsconfig.json
* fix broken import
* fix broken path to the base config
* set tsBuildInfoFile for project without outDir
* do not commit tsbuildinfo file
* do not check output d.ts files
* fix type error
* use separate config to build types
* rollback changes to include paths
* mute import zone error
* rename files to avoid references to tsd
* do not use tsd for type tests
* include all ts files in project
* run buildRefs before type check to ensure the latest version
* store tsbuildinfo locally
* update paths to base config
* comment out core/tsconfig.json
* remove ui path
* fix wrong tsbuildinfo path
* 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>
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>
* Update moment related packages
* unify moment version in yarn.lock
* adapt ro pluralization fixes
* update some bad pluralization in fixtures/snapshots
* 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
* Update package.json
* update yarn.lock
* [mocha] fix test selectors to get everything in packages
* fix paths in tests
* ignore test files that make it into target directories
* [@kbn/test] don't build test files
* move tests from datemath and test-subj pkgs into __tests__ dirs
* [kbn/test-subj] remove test script
* update yarn.lock
# Conflicts:
# src/dev/mocha/run_mocha_cli.js
* 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
* chore(deps): update dependency del to v4 (#37466)
* chore(deps): update dependency del to v4
* remove @types/del since they ship with the package now
(cherry picked from commit c60e3491a2)
* Update gulp related packages (#37456)
(cherry picked from commit 62893ec0bc)
* Update babel related packages (#37464)
(cherry picked from commit 830bd1f0ca)
* [@kbn/expect] "fork" expect.js into repo
* [eslint] autofix references to expect.js
* [tslint] autofix all expect.js imports
* now that expect.js is in strict mode, avoid reassigning fn.length
* 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.
We need to share `@kbn/datemath` with `@elastic/eui`, and rather than making them rely on Kibana for their dependencies we've decided to republish `@kbn/datemath` as `@elastic/datemath`. This isn't something we want to do often, so please check with the platform team if you'd like to do this for another module.