From cab9bf3da0ed225b4898844327d32afcfd4ffa6c Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Sun, 16 Feb 2025 09:39:06 +0100 Subject: [PATCH] SKA: Fix kebab-case issues in search-kibana packages (#211348) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > * This PR has been auto-generated. > * Any manual contributions will be lost if the 'relocate' script is re-run. > * Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash. > * Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. Are you trying to rebase this PR to solve merge conflicts? Please follow the steps describe [here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E). #### 1 packages(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/search-shared-ui` | `x-pack/solutions/search/packages/shared-ui` |
Updated references ``` ./package.json ./packages/kbn-relocate/utils/transforms.ts ./packages/kbn-ts-projects/config-paths.json ./src/platform/packages/private/kbn-repo-packages/package-map.json ./tsconfig.base.json ./x-pack/.i18nrc.json ./x-pack/solutions/search/packages/shared-ui/jest.config.js ./yarn.lock .github/CODEOWNERS ```
Updated relative paths ``` x-pack/solutions/search/packages/shared-ui/jest.config.js:14 x-pack/solutions/search/packages/shared-ui/tsconfig.json:2 ```
(cherry picked from commit 11cd98bfc14ddafc87bc84b6bbe407e9a3b44506) --- .github/CODEOWNERS | 2 +- package.json | 2 +- tsconfig.base.json | 4 ++-- x-pack/.i18nrc.json | 2 +- .../search/packages/{shared_ui => shared-ui}/README.md | 0 .../search/packages/{shared_ui => shared-ui}/index.ts | 0 .../search/packages/{shared_ui => shared-ui}/jest.config.js | 6 +++--- .../search/packages/{shared_ui => shared-ui}/kibana.jsonc | 0 .../search/packages/{shared_ui => shared-ui}/package.json | 0 .../src/connector_icon/connector_icon.tsx | 0 .../{shared_ui => shared-ui}/src/connector_icon/index.ts | 0 .../decorative_horizontal_stepper.tsx | 0 .../src/decorative_horizontal_stepper/index.ts | 0 .../src/form_info_field/form_info_field.tsx | 0 .../{shared_ui => shared-ui}/src/icons/EuiIconPlugs.tsx | 0 .../{shared_ui => shared-ui}/src/icons/EuiIconWeb.tsx | 0 .../packages/{shared_ui => shared-ui}/src/icons/index.ts | 0 .../src/search_empty_prompt/index.ts | 0 .../src/search_empty_prompt/search_empty_prompt.tsx | 0 .../search/packages/{shared_ui => shared-ui}/tsconfig.json | 0 yarn.lock | 2 +- 21 files changed, 9 insertions(+), 9 deletions(-) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/README.md (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/index.ts (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/jest.config.js (81%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/kibana.jsonc (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/package.json (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/connector_icon/connector_icon.tsx (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/connector_icon/index.ts (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/decorative_horizontal_stepper/decorative_horizontal_stepper.tsx (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/decorative_horizontal_stepper/index.ts (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/form_info_field/form_info_field.tsx (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/icons/EuiIconPlugs.tsx (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/icons/EuiIconWeb.tsx (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/icons/index.ts (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/search_empty_prompt/index.ts (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/src/search_empty_prompt/search_empty_prompt.tsx (100%) rename x-pack/solutions/search/packages/{shared_ui => shared-ui}/tsconfig.json (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ac675c16b6e2b..7e77eeabc7cbf 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -960,7 +960,7 @@ x-pack/solutions/search/packages/kbn-ipynb @elastic/search-kibana x-pack/solutions/search/packages/kbn-search-api-keys-components @elastic/search-kibana x-pack/solutions/search/packages/kbn-search-api-keys-server @elastic/search-kibana x-pack/solutions/search/packages/kbn-search-index-documents @elastic/search-kibana -x-pack/solutions/search/packages/shared_ui @elastic/search-kibana +x-pack/solutions/search/packages/shared-ui @elastic/search-kibana x-pack/solutions/search/plugins/enterprise_search @elastic/search-kibana x-pack/solutions/search/plugins/search_assistant @elastic/search-kibana x-pack/solutions/search/plugins/search_connectors @elastic/search-kibana diff --git a/package.json b/package.json index f277ffd91c3d0..90beb2df1d6ca 100644 --- a/package.json +++ b/package.json @@ -812,7 +812,7 @@ "@kbn/search-notebooks": "link:x-pack/solutions/search/plugins/search_notebooks", "@kbn/search-playground": "link:x-pack/solutions/search/plugins/search_playground", "@kbn/search-response-warnings": "link:src/platform/packages/shared/kbn-search-response-warnings", - "@kbn/search-shared-ui": "link:x-pack/solutions/search/packages/shared_ui", + "@kbn/search-shared-ui": "link:x-pack/solutions/search/packages/shared-ui", "@kbn/search-synonyms": "link:x-pack/solutions/search/plugins/search_synonyms", "@kbn/search-types": "link:src/platform/packages/shared/kbn-search-types", "@kbn/searchprofiler-plugin": "link:x-pack/platform/plugins/shared/searchprofiler", diff --git a/tsconfig.base.json b/tsconfig.base.json index 313ba20c5d64f..49cf43cacbb28 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1614,8 +1614,8 @@ "@kbn/search-playground/*": ["x-pack/solutions/search/plugins/search_playground/*"], "@kbn/search-response-warnings": ["src/platform/packages/shared/kbn-search-response-warnings"], "@kbn/search-response-warnings/*": ["src/platform/packages/shared/kbn-search-response-warnings/*"], - "@kbn/search-shared-ui": ["x-pack/solutions/search/packages/shared_ui"], - "@kbn/search-shared-ui/*": ["x-pack/solutions/search/packages/shared_ui/*"], + "@kbn/search-shared-ui": ["x-pack/solutions/search/packages/shared-ui"], + "@kbn/search-shared-ui/*": ["x-pack/solutions/search/packages/shared-ui/*"], "@kbn/search-synonyms": ["x-pack/solutions/search/plugins/search_synonyms"], "@kbn/search-synonyms/*": ["x-pack/solutions/search/plugins/search_synonyms/*"], "@kbn/search-types": ["src/platform/packages/shared/kbn-search-types"], diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index d617094720c84..a68a35fbf5c50 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -130,7 +130,7 @@ ], "xpack.runtimeFields": "platform/plugins/private/runtime_fields", "xpack.screenshotting": "platform/plugins/shared/screenshotting", - "xpack.searchSharedUI": "solutions/search/packages/shared_ui", + "xpack.searchSharedUI": "solutions/search/packages/shared-ui", "xpack.searchHomepage": "solutions/search/plugins/search_homepage", "xpack.searchIndices": "solutions/search/plugins/search_indices", "xpack.searchNavigation": "solutions/search/plugins/search_solution/search_navigation", diff --git a/x-pack/solutions/search/packages/shared_ui/README.md b/x-pack/solutions/search/packages/shared-ui/README.md similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/README.md rename to x-pack/solutions/search/packages/shared-ui/README.md diff --git a/x-pack/solutions/search/packages/shared_ui/index.ts b/x-pack/solutions/search/packages/shared-ui/index.ts similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/index.ts rename to x-pack/solutions/search/packages/shared-ui/index.ts diff --git a/x-pack/solutions/search/packages/shared_ui/jest.config.js b/x-pack/solutions/search/packages/shared-ui/jest.config.js similarity index 81% rename from x-pack/solutions/search/packages/shared_ui/jest.config.js rename to x-pack/solutions/search/packages/shared-ui/jest.config.js index b18e5ba2e0965..9783c5c4d3937 100644 --- a/x-pack/solutions/search/packages/shared_ui/jest.config.js +++ b/x-pack/solutions/search/packages/shared-ui/jest.config.js @@ -7,10 +7,10 @@ module.exports = { coverageDirectory: - '/target/kibana-coverage/jest/x-pack/solutions/search/packages/shared_ui', + '/target/kibana-coverage/jest/x-pack/solutions/search/packages/shared-ui', coverageReporters: ['text', 'html'], - collectCoverageFrom: ['/x-pack/solutions/search/packages/shared_ui/**/*.{ts,tsx}'], + collectCoverageFrom: ['/x-pack/solutions/search/packages/shared-ui/**/*.{ts,tsx}'], preset: '@kbn/test', rootDir: '../../../../..', - roots: ['/x-pack/solutions/search/packages/shared_ui'], + roots: ['/x-pack/solutions/search/packages/shared-ui'], }; diff --git a/x-pack/solutions/search/packages/shared_ui/kibana.jsonc b/x-pack/solutions/search/packages/shared-ui/kibana.jsonc similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/kibana.jsonc rename to x-pack/solutions/search/packages/shared-ui/kibana.jsonc diff --git a/x-pack/solutions/search/packages/shared_ui/package.json b/x-pack/solutions/search/packages/shared-ui/package.json similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/package.json rename to x-pack/solutions/search/packages/shared-ui/package.json diff --git a/x-pack/solutions/search/packages/shared_ui/src/connector_icon/connector_icon.tsx b/x-pack/solutions/search/packages/shared-ui/src/connector_icon/connector_icon.tsx similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/connector_icon/connector_icon.tsx rename to x-pack/solutions/search/packages/shared-ui/src/connector_icon/connector_icon.tsx diff --git a/x-pack/solutions/search/packages/shared_ui/src/connector_icon/index.ts b/x-pack/solutions/search/packages/shared-ui/src/connector_icon/index.ts similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/connector_icon/index.ts rename to x-pack/solutions/search/packages/shared-ui/src/connector_icon/index.ts diff --git a/x-pack/solutions/search/packages/shared_ui/src/decorative_horizontal_stepper/decorative_horizontal_stepper.tsx b/x-pack/solutions/search/packages/shared-ui/src/decorative_horizontal_stepper/decorative_horizontal_stepper.tsx similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/decorative_horizontal_stepper/decorative_horizontal_stepper.tsx rename to x-pack/solutions/search/packages/shared-ui/src/decorative_horizontal_stepper/decorative_horizontal_stepper.tsx diff --git a/x-pack/solutions/search/packages/shared_ui/src/decorative_horizontal_stepper/index.ts b/x-pack/solutions/search/packages/shared-ui/src/decorative_horizontal_stepper/index.ts similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/decorative_horizontal_stepper/index.ts rename to x-pack/solutions/search/packages/shared-ui/src/decorative_horizontal_stepper/index.ts diff --git a/x-pack/solutions/search/packages/shared_ui/src/form_info_field/form_info_field.tsx b/x-pack/solutions/search/packages/shared-ui/src/form_info_field/form_info_field.tsx similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/form_info_field/form_info_field.tsx rename to x-pack/solutions/search/packages/shared-ui/src/form_info_field/form_info_field.tsx diff --git a/x-pack/solutions/search/packages/shared_ui/src/icons/EuiIconPlugs.tsx b/x-pack/solutions/search/packages/shared-ui/src/icons/EuiIconPlugs.tsx similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/icons/EuiIconPlugs.tsx rename to x-pack/solutions/search/packages/shared-ui/src/icons/EuiIconPlugs.tsx diff --git a/x-pack/solutions/search/packages/shared_ui/src/icons/EuiIconWeb.tsx b/x-pack/solutions/search/packages/shared-ui/src/icons/EuiIconWeb.tsx similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/icons/EuiIconWeb.tsx rename to x-pack/solutions/search/packages/shared-ui/src/icons/EuiIconWeb.tsx diff --git a/x-pack/solutions/search/packages/shared_ui/src/icons/index.ts b/x-pack/solutions/search/packages/shared-ui/src/icons/index.ts similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/icons/index.ts rename to x-pack/solutions/search/packages/shared-ui/src/icons/index.ts diff --git a/x-pack/solutions/search/packages/shared_ui/src/search_empty_prompt/index.ts b/x-pack/solutions/search/packages/shared-ui/src/search_empty_prompt/index.ts similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/search_empty_prompt/index.ts rename to x-pack/solutions/search/packages/shared-ui/src/search_empty_prompt/index.ts diff --git a/x-pack/solutions/search/packages/shared_ui/src/search_empty_prompt/search_empty_prompt.tsx b/x-pack/solutions/search/packages/shared-ui/src/search_empty_prompt/search_empty_prompt.tsx similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/src/search_empty_prompt/search_empty_prompt.tsx rename to x-pack/solutions/search/packages/shared-ui/src/search_empty_prompt/search_empty_prompt.tsx diff --git a/x-pack/solutions/search/packages/shared_ui/tsconfig.json b/x-pack/solutions/search/packages/shared-ui/tsconfig.json similarity index 100% rename from x-pack/solutions/search/packages/shared_ui/tsconfig.json rename to x-pack/solutions/search/packages/shared-ui/tsconfig.json diff --git a/yarn.lock b/yarn.lock index d4ceeacb79915..9bd02b9c4b182 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7097,7 +7097,7 @@ version "0.0.0" uid "" -"@kbn/search-shared-ui@link:x-pack/solutions/search/packages/shared_ui": +"@kbn/search-shared-ui@link:x-pack/solutions/search/packages/shared-ui": version "0.0.0" uid ""