From 61dfcaa89f8d0d830b54ebc7117cf9e3c19808d8 Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Mon, 9 Dec 2024 17:29:01 +0100 Subject: [PATCH] [8.x] Sustainable Kibana Architecture: Move modules owned by `@elastic/docs` (#202416) (#203401) # Backport This will backport the following commits from `main` to `8.x`: - [Sustainable Kibana Architecture: Move modules owned by `@elastic/docs` (#202416)](https://github.com/elastic/kibana/pull/202416) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> --- .github/CODEOWNERS | 2 +- docs/upgrade-notes.asciidoc | 4 ++-- package.json | 2 +- .../platform/packages/shared}/kbn-doc-links/README.md | 0 .../platform/packages/shared}/kbn-doc-links/index.ts | 0 .../platform/packages/shared}/kbn-doc-links/jest.config.js | 4 ++-- .../platform/packages/shared}/kbn-doc-links/kibana.jsonc | 0 .../platform/packages/shared}/kbn-doc-links/package.json | 0 .../packages/shared}/kbn-doc-links/src/get_doc_links.test.ts | 0 .../packages/shared}/kbn-doc-links/src/get_doc_links.ts | 0 .../packages/shared}/kbn-doc-links/src/get_doc_meta.test.ts | 0 .../packages/shared}/kbn-doc-links/src/get_doc_meta.ts | 0 .../platform/packages/shared}/kbn-doc-links/src/types.ts | 0 .../platform/packages/shared}/kbn-doc-links/tsconfig.json | 2 +- tsconfig.base.json | 4 ++-- yarn.lock | 2 +- 16 files changed, 10 insertions(+), 10 deletions(-) rename {packages => src/platform/packages/shared}/kbn-doc-links/README.md (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/index.ts (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/jest.config.js (84%) rename {packages => src/platform/packages/shared}/kbn-doc-links/kibana.jsonc (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/package.json (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/src/get_doc_links.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/src/get_doc_links.ts (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/src/get_doc_meta.test.ts (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/src/get_doc_meta.ts (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/src/types.ts (100%) rename {packages => src/platform/packages/shared}/kbn-doc-links/tsconfig.json (81%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 285f1bbd738a1..3251d1ae53581 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -395,7 +395,7 @@ x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery src/plugins/discover @elastic/kibana-data-discovery src/plugins/discover_shared @elastic/kibana-data-discovery @elastic/obs-ux-logs-team packages/kbn-discover-utils @elastic/kibana-data-discovery -packages/kbn-doc-links @elastic/docs +src/platform/packages/shared/kbn-doc-links @elastic/docs packages/kbn-docs-utils @elastic/kibana-operations packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery packages/kbn-ebt-tools @elastic/kibana-core diff --git a/docs/upgrade-notes.asciidoc b/docs/upgrade-notes.asciidoc index 65d47946df4a3..7ad0041d6e1d7 100644 --- a/docs/upgrade-notes.asciidoc +++ b/docs/upgrade-notes.asciidoc @@ -23,8 +23,8 @@ ADD INSTRUCTIONS FOR USERS LOOKING TO UPGRADE. HOW CAN THEY WORK AROUND THIS? 1. Copy and edit the template in the right area section of this file. Most recent entries should be at the top of the section. 2. Edit the anchor ID [[REPO-PR]] of the template with proper values. 3. Don't hardcode the link to the new entry. Instead, make it available through the doc link service files: - - https://github.com/elastic/kibana/blob/main/packages/kbn-doc-links/src/get_doc_links.ts - - https://github.com/elastic/kibana/blob/main/packages/kbn-doc-links/src/types.ts + - https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts + - https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-doc-links/src/types.ts The entry in the main links file should look like this: diff --git a/package.json b/package.json index 549278c836c91..aea18e395c911 100644 --- a/package.json +++ b/package.json @@ -459,7 +459,7 @@ "@kbn/discover-plugin": "link:src/plugins/discover", "@kbn/discover-shared-plugin": "link:src/plugins/discover_shared", "@kbn/discover-utils": "link:packages/kbn-discover-utils", - "@kbn/doc-links": "link:packages/kbn-doc-links", + "@kbn/doc-links": "link:src/platform/packages/shared/kbn-doc-links", "@kbn/dom-drag-drop": "link:packages/kbn-dom-drag-drop", "@kbn/ebt-tools": "link:packages/kbn-ebt-tools", "@kbn/ecs-data-quality-dashboard": "link:x-pack/packages/security-solution/ecs_data_quality_dashboard", diff --git a/packages/kbn-doc-links/README.md b/src/platform/packages/shared/kbn-doc-links/README.md similarity index 100% rename from packages/kbn-doc-links/README.md rename to src/platform/packages/shared/kbn-doc-links/README.md diff --git a/packages/kbn-doc-links/index.ts b/src/platform/packages/shared/kbn-doc-links/index.ts similarity index 100% rename from packages/kbn-doc-links/index.ts rename to src/platform/packages/shared/kbn-doc-links/index.ts diff --git a/packages/kbn-doc-links/jest.config.js b/src/platform/packages/shared/kbn-doc-links/jest.config.js similarity index 84% rename from packages/kbn-doc-links/jest.config.js rename to src/platform/packages/shared/kbn-doc-links/jest.config.js index c2430a3758092..2e9989c26f744 100644 --- a/packages/kbn-doc-links/jest.config.js +++ b/src/platform/packages/shared/kbn-doc-links/jest.config.js @@ -9,6 +9,6 @@ module.exports = { preset: '@kbn/test', - rootDir: '../..', - roots: ['/packages/kbn-doc-links'], + rootDir: '../../../../..', + roots: ['/src/platform/packages/shared/kbn-doc-links'], }; diff --git a/packages/kbn-doc-links/kibana.jsonc b/src/platform/packages/shared/kbn-doc-links/kibana.jsonc similarity index 100% rename from packages/kbn-doc-links/kibana.jsonc rename to src/platform/packages/shared/kbn-doc-links/kibana.jsonc diff --git a/packages/kbn-doc-links/package.json b/src/platform/packages/shared/kbn-doc-links/package.json similarity index 100% rename from packages/kbn-doc-links/package.json rename to src/platform/packages/shared/kbn-doc-links/package.json diff --git a/packages/kbn-doc-links/src/get_doc_links.test.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.test.ts similarity index 100% rename from packages/kbn-doc-links/src/get_doc_links.test.ts rename to src/platform/packages/shared/kbn-doc-links/src/get_doc_links.test.ts diff --git a/packages/kbn-doc-links/src/get_doc_links.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts similarity index 100% rename from packages/kbn-doc-links/src/get_doc_links.ts rename to src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts diff --git a/packages/kbn-doc-links/src/get_doc_meta.test.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.test.ts similarity index 100% rename from packages/kbn-doc-links/src/get_doc_meta.test.ts rename to src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.test.ts diff --git a/packages/kbn-doc-links/src/get_doc_meta.ts b/src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts similarity index 100% rename from packages/kbn-doc-links/src/get_doc_meta.ts rename to src/platform/packages/shared/kbn-doc-links/src/get_doc_meta.ts diff --git a/packages/kbn-doc-links/src/types.ts b/src/platform/packages/shared/kbn-doc-links/src/types.ts similarity index 100% rename from packages/kbn-doc-links/src/types.ts rename to src/platform/packages/shared/kbn-doc-links/src/types.ts diff --git a/packages/kbn-doc-links/tsconfig.json b/src/platform/packages/shared/kbn-doc-links/tsconfig.json similarity index 81% rename from packages/kbn-doc-links/tsconfig.json rename to src/platform/packages/shared/kbn-doc-links/tsconfig.json index df789404c43f2..9cd6452185ddf 100644 --- a/packages/kbn-doc-links/tsconfig.json +++ b/src/platform/packages/shared/kbn-doc-links/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../../../../tsconfig.base.json", "compilerOptions": { "outDir": "target/types", "types": [ diff --git a/tsconfig.base.json b/tsconfig.base.json index e4c7da815910c..e7cdb059fc3ee 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -784,8 +784,8 @@ "@kbn/discover-shared-plugin/*": ["src/plugins/discover_shared/*"], "@kbn/discover-utils": ["packages/kbn-discover-utils"], "@kbn/discover-utils/*": ["packages/kbn-discover-utils/*"], - "@kbn/doc-links": ["packages/kbn-doc-links"], - "@kbn/doc-links/*": ["packages/kbn-doc-links/*"], + "@kbn/doc-links": ["src/platform/packages/shared/kbn-doc-links"], + "@kbn/doc-links/*": ["src/platform/packages/shared/kbn-doc-links/*"], "@kbn/docs-utils": ["packages/kbn-docs-utils"], "@kbn/docs-utils/*": ["packages/kbn-docs-utils/*"], "@kbn/dom-drag-drop": ["packages/kbn-dom-drag-drop"], diff --git a/yarn.lock b/yarn.lock index 592725de81afa..11d679dc16ab7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5375,7 +5375,7 @@ version "0.0.0" uid "" -"@kbn/doc-links@link:packages/kbn-doc-links": +"@kbn/doc-links@link:src/platform/packages/shared/kbn-doc-links": version "0.0.0" uid ""