From d4c27c22c4b6eaf5ebc22090323446330634e3db Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Fri, 4 Mar 2022 10:48:29 -0700 Subject: [PATCH] Core Data: Rename `types` directory to `entity-types` When we introduced the types for the core entities in #38666 we used a directory named `types`. Unfortunately this meant that we can't create the customary file `src/types.ts` because of the name clash in module resolution. In this patch we're renaming the directory so that we can separately import `entity-types(/index.ts)` and also `types(.ts)` without the naming conflict. --- packages/core-data/src/{types => entity-types}/README.md | 0 packages/core-data/src/{types => entity-types}/attachment.ts | 0 .../core-data/src/{types => entity-types}/base-entity-types.ts | 0 packages/core-data/src/{types => entity-types}/comment.ts | 0 packages/core-data/src/{types => entity-types}/helpers.ts | 0 packages/core-data/src/{types => entity-types}/index.ts | 0 packages/core-data/src/{types => entity-types}/menu-location.ts | 0 packages/core-data/src/{types => entity-types}/nav-menu-item.ts | 0 packages/core-data/src/{types => entity-types}/nav-menu.ts | 0 .../core-data/src/{types => entity-types}/navigation-area.ts | 0 packages/core-data/src/{types => entity-types}/page.ts | 0 packages/core-data/src/{types => entity-types}/plugin.ts | 0 packages/core-data/src/{types => entity-types}/post.ts | 0 packages/core-data/src/{types => entity-types}/settings.ts | 0 packages/core-data/src/{types => entity-types}/sidebar.ts | 0 packages/core-data/src/{types => entity-types}/taxonomy.ts | 0 packages/core-data/src/{types => entity-types}/theme.ts | 0 packages/core-data/src/{types => entity-types}/type.ts | 0 packages/core-data/src/{types => entity-types}/user.ts | 0 packages/core-data/src/{types => entity-types}/widget-type.ts | 0 packages/core-data/src/{types => entity-types}/widget.ts | 0 .../core-data/src/{types => entity-types}/wp-template-part.ts | 0 packages/core-data/src/{types => entity-types}/wp-template.ts | 0 packages/core-data/src/index.js | 2 +- 24 files changed, 1 insertion(+), 1 deletion(-) rename packages/core-data/src/{types => entity-types}/README.md (100%) rename packages/core-data/src/{types => entity-types}/attachment.ts (100%) rename packages/core-data/src/{types => entity-types}/base-entity-types.ts (100%) rename packages/core-data/src/{types => entity-types}/comment.ts (100%) rename packages/core-data/src/{types => entity-types}/helpers.ts (100%) rename packages/core-data/src/{types => entity-types}/index.ts (100%) rename packages/core-data/src/{types => entity-types}/menu-location.ts (100%) rename packages/core-data/src/{types => entity-types}/nav-menu-item.ts (100%) rename packages/core-data/src/{types => entity-types}/nav-menu.ts (100%) rename packages/core-data/src/{types => entity-types}/navigation-area.ts (100%) rename packages/core-data/src/{types => entity-types}/page.ts (100%) rename packages/core-data/src/{types => entity-types}/plugin.ts (100%) rename packages/core-data/src/{types => entity-types}/post.ts (100%) rename packages/core-data/src/{types => entity-types}/settings.ts (100%) rename packages/core-data/src/{types => entity-types}/sidebar.ts (100%) rename packages/core-data/src/{types => entity-types}/taxonomy.ts (100%) rename packages/core-data/src/{types => entity-types}/theme.ts (100%) rename packages/core-data/src/{types => entity-types}/type.ts (100%) rename packages/core-data/src/{types => entity-types}/user.ts (100%) rename packages/core-data/src/{types => entity-types}/widget-type.ts (100%) rename packages/core-data/src/{types => entity-types}/widget.ts (100%) rename packages/core-data/src/{types => entity-types}/wp-template-part.ts (100%) rename packages/core-data/src/{types => entity-types}/wp-template.ts (100%) diff --git a/packages/core-data/src/types/README.md b/packages/core-data/src/entity-types/README.md similarity index 100% rename from packages/core-data/src/types/README.md rename to packages/core-data/src/entity-types/README.md diff --git a/packages/core-data/src/types/attachment.ts b/packages/core-data/src/entity-types/attachment.ts similarity index 100% rename from packages/core-data/src/types/attachment.ts rename to packages/core-data/src/entity-types/attachment.ts diff --git a/packages/core-data/src/types/base-entity-types.ts b/packages/core-data/src/entity-types/base-entity-types.ts similarity index 100% rename from packages/core-data/src/types/base-entity-types.ts rename to packages/core-data/src/entity-types/base-entity-types.ts diff --git a/packages/core-data/src/types/comment.ts b/packages/core-data/src/entity-types/comment.ts similarity index 100% rename from packages/core-data/src/types/comment.ts rename to packages/core-data/src/entity-types/comment.ts diff --git a/packages/core-data/src/types/helpers.ts b/packages/core-data/src/entity-types/helpers.ts similarity index 100% rename from packages/core-data/src/types/helpers.ts rename to packages/core-data/src/entity-types/helpers.ts diff --git a/packages/core-data/src/types/index.ts b/packages/core-data/src/entity-types/index.ts similarity index 100% rename from packages/core-data/src/types/index.ts rename to packages/core-data/src/entity-types/index.ts diff --git a/packages/core-data/src/types/menu-location.ts b/packages/core-data/src/entity-types/menu-location.ts similarity index 100% rename from packages/core-data/src/types/menu-location.ts rename to packages/core-data/src/entity-types/menu-location.ts diff --git a/packages/core-data/src/types/nav-menu-item.ts b/packages/core-data/src/entity-types/nav-menu-item.ts similarity index 100% rename from packages/core-data/src/types/nav-menu-item.ts rename to packages/core-data/src/entity-types/nav-menu-item.ts diff --git a/packages/core-data/src/types/nav-menu.ts b/packages/core-data/src/entity-types/nav-menu.ts similarity index 100% rename from packages/core-data/src/types/nav-menu.ts rename to packages/core-data/src/entity-types/nav-menu.ts diff --git a/packages/core-data/src/types/navigation-area.ts b/packages/core-data/src/entity-types/navigation-area.ts similarity index 100% rename from packages/core-data/src/types/navigation-area.ts rename to packages/core-data/src/entity-types/navigation-area.ts diff --git a/packages/core-data/src/types/page.ts b/packages/core-data/src/entity-types/page.ts similarity index 100% rename from packages/core-data/src/types/page.ts rename to packages/core-data/src/entity-types/page.ts diff --git a/packages/core-data/src/types/plugin.ts b/packages/core-data/src/entity-types/plugin.ts similarity index 100% rename from packages/core-data/src/types/plugin.ts rename to packages/core-data/src/entity-types/plugin.ts diff --git a/packages/core-data/src/types/post.ts b/packages/core-data/src/entity-types/post.ts similarity index 100% rename from packages/core-data/src/types/post.ts rename to packages/core-data/src/entity-types/post.ts diff --git a/packages/core-data/src/types/settings.ts b/packages/core-data/src/entity-types/settings.ts similarity index 100% rename from packages/core-data/src/types/settings.ts rename to packages/core-data/src/entity-types/settings.ts diff --git a/packages/core-data/src/types/sidebar.ts b/packages/core-data/src/entity-types/sidebar.ts similarity index 100% rename from packages/core-data/src/types/sidebar.ts rename to packages/core-data/src/entity-types/sidebar.ts diff --git a/packages/core-data/src/types/taxonomy.ts b/packages/core-data/src/entity-types/taxonomy.ts similarity index 100% rename from packages/core-data/src/types/taxonomy.ts rename to packages/core-data/src/entity-types/taxonomy.ts diff --git a/packages/core-data/src/types/theme.ts b/packages/core-data/src/entity-types/theme.ts similarity index 100% rename from packages/core-data/src/types/theme.ts rename to packages/core-data/src/entity-types/theme.ts diff --git a/packages/core-data/src/types/type.ts b/packages/core-data/src/entity-types/type.ts similarity index 100% rename from packages/core-data/src/types/type.ts rename to packages/core-data/src/entity-types/type.ts diff --git a/packages/core-data/src/types/user.ts b/packages/core-data/src/entity-types/user.ts similarity index 100% rename from packages/core-data/src/types/user.ts rename to packages/core-data/src/entity-types/user.ts diff --git a/packages/core-data/src/types/widget-type.ts b/packages/core-data/src/entity-types/widget-type.ts similarity index 100% rename from packages/core-data/src/types/widget-type.ts rename to packages/core-data/src/entity-types/widget-type.ts diff --git a/packages/core-data/src/types/widget.ts b/packages/core-data/src/entity-types/widget.ts similarity index 100% rename from packages/core-data/src/types/widget.ts rename to packages/core-data/src/entity-types/widget.ts diff --git a/packages/core-data/src/types/wp-template-part.ts b/packages/core-data/src/entity-types/wp-template-part.ts similarity index 100% rename from packages/core-data/src/types/wp-template-part.ts rename to packages/core-data/src/entity-types/wp-template-part.ts diff --git a/packages/core-data/src/types/wp-template.ts b/packages/core-data/src/entity-types/wp-template.ts similarity index 100% rename from packages/core-data/src/types/wp-template.ts rename to packages/core-data/src/entity-types/wp-template.ts diff --git a/packages/core-data/src/index.js b/packages/core-data/src/index.js index 68ed31a7c55866..f5a9ebbc8d8d22 100644 --- a/packages/core-data/src/index.js +++ b/packages/core-data/src/index.js @@ -77,4 +77,4 @@ export { default as __experimentalUseEntityRecord } from './hooks/use-entity-rec export { default as __experimentalUseEntityRecords } from './hooks/use-entity-records'; export * from './entity-provider'; export * from './fetch'; -export * from './types'; +export * from './entity-types';