[7.x] [Security Solution, Lists] Replace legacy imports from 'elasticsearch' package (#107226)#107808
Merged
kibanamachine merged 1 commit intoelastic:7.xfrom Aug 5, 2021
Merged
Conversation
…' package (elastic#107226) * Remove legacy imports from 'elasticsearch' package This prefers the newer types from '@elastic/elasticsearch'. There was one instance where mock data was insufficient to satisfy the newer analogous types; in all other cases this was just a find/replace. * Fix type errors with a null guard We know that this mock has hits with _source values, but we cannot convey this to typescript as null assertions are disabled within this project. This seems like the next best solution, preferable to a @ts-expect-error. * Fix a few more type errors * Replace legacy type imports in integration tests * refactors destructuring due to _source being properly declared as conditional * Update more integration tests to account for our optional _source Changes here fall into one of two categories: * If the test was making an assertion on a value from _source, we simply null chain and continue to assert on a possibly undefined value. * If the test logic depends on _source being present, we first assert that presence, and exit the test early if absent. * Fix more type errors Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 task
Contributor
Author
💚 Build Succeeded
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: cc @rylnd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the following commits to 7.x: