Move deprecations getters test helpers to package#137793
Move deprecations getters test helpers to package#137793TinaHeiligers merged 6 commits intoelastic:mainfrom
Conversation
…cations test helpers to package
|
Pinging @elastic/kibana-core (Team:Core) |
afharo
left a comment
There was a problem hiding this comment.
It looks great to me! I just added 2 minor changes that slipped through the cracks :)
| "include": [ | ||
| "src/**/*" | ||
| ] | ||
| , "../../test-helpers/core-test-helpers-deprecations-getters/src/test_utils.ts" ] |
There was a problem hiding this comment.
Q: Do we need this? AFAIK, it's an "npm" dependency, so we don't need to reference it like that. Do we?
There was a problem hiding this comment.
I didn't notice this, this is referencing a file outside of the package, which isn't going to be available in bazel. We should just be able to import the @kbn/core-test-helpers-deprecations-getters package in the code and be fine
There was a problem hiding this comment.
FWIW, the change came from VSCode, with choosing the lazy option of updating all paths.
| @@ -0,0 +1,3 @@ | |||
| # @kbn/core-test-helpers-deprecations-getters | |||
|
|
|||
| Empty package generated by @kbn/generate | |||
There was a problem hiding this comment.
Would you mind adding a description for this package? 😇
There was a problem hiding this comment.
Good catch! I threw up this PR as a POC and didn't think to come back to the README.
packages/core/test-helpers/core-test-helpers-deprecations-getters/package.json
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Core's deprecations service exposes two test helpers that are used in other core packages and exposed in legacy src/core/server/test_utils. At the moment, having these test helpers explicitly exported from the main implementation violates the
@kbn/imports/no_boundary_crossingrule.This PR attempts to fix that by moving the test helpers to a new package.
Note, if moving shared test utilities to packages is the way forward, we should consider consolidating all core-related test utils into a smaller collection of packages. However, this carries the burden of having to ensure we don't unintentionally introduce circular dependencies.