-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix imports from restricted paths #130102
Conversation
import type { | ||
EmbeddablePersistableStateService, | ||
EmbeddableRegistryDefinition, | ||
} from '../../../embeddable/common'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please let me clarify you some rules:
- If your file placed in
{your_plugin_id}/server/**/*.ts(x)
normally we should import from"{plugin}/server"
. - If your file placed in
{your_plugin_id}/public/**/*.ts(x)
normally we should import from"{plugin}/public"
. - If your file placed in
{your_plugin_id}/common/**/*.ts(x)
normally we should import from"{plugin}/common"
.
About this one. The following import import { EmbeddablePersistableStateService } from '../../../embeddable/common';
was absolutely right and we don't needed to modify that.
Please do re-export needed types from the common folder instead of removing it
# Conflicts: # src/plugins/controls/server/control_group/control_group_container_factory.ts # src/plugins/controls/server/control_types/options_list/options_list_embeddable_factory.ts # src/plugins/controls/server/control_types/time_slider/time_slider_embeddable_factory.ts # src/plugins/dashboard/server/embeddable/dashboard_container_embeddable_factory.ts # src/plugins/embeddable/common/types.ts # src/plugins/embeddable/server/plugin.ts # src/plugins/visualizations/common/types.ts # src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.test.ts # src/plugins/visualizations/server/embeddable/make_visualize_embeddable_factory.ts # x-pack/plugins/lens/common/embeddable_factory/index.ts # x-pack/plugins/lens/common/expressions/counter_rate/counter_rate.test.ts # x-pack/plugins/lens/common/expressions/format_column/format_column.test.ts # x-pack/plugins/lens/common/expressions/merge_tables/merge_tables.test.ts # x-pack/plugins/lens/common/expressions/time_scale/time_scale.test.ts # x-pack/plugins/lens/server/embeddable/make_lens_embeddable_factory.ts # x-pack/plugins/lens/server/migrations/saved_object_migrations.ts # x-pack/plugins/lens/server/migrations/types.ts # x-pack/plugins/maps/common/embeddable/extract.ts # x-pack/plugins/maps/common/embeddable/inject.ts
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maps changes LGTM
code review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@elasticmachine merge upstream |
💚 Build SucceededMetrics [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: |
* Fix imports from restricted paths * Re-export EmbeddableRegistryDefinition from embedabble server and fix some imports Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Fix imports from restricted paths * Re-export EmbeddableRegistryDefinition from embedabble server and fix some imports Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes #129316
Summary
EmbeddableRegistryDefinition
type was moved from embeddable server to common and re-exported from server, which resolved some restricted paths in maps common and didn't affect other imports from server files.For maintainers