From f4441e2726425ddfbaf16793f917a9d8553ed39a Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Thu, 29 Dec 2022 15:45:32 -0500 Subject: [PATCH] chore: remove types.gen from tests (#5695) --- .../content-ssr-integration/.gitignore | 1 + .../src/content/types.generated.d.ts | 79 ------------------- .../.gitignore | 1 + .../src/content/types.generated.d.ts | 79 ------------------- .../astro/test/fixtures/content/.gitignore | 1 + .../content/src/content/types.generated.d.ts | 65 --------------- 6 files changed, 3 insertions(+), 223 deletions(-) create mode 100644 packages/astro/test/fixtures/content-ssr-integration/.gitignore delete mode 100644 packages/astro/test/fixtures/content-ssr-integration/src/content/types.generated.d.ts create mode 100644 packages/astro/test/fixtures/content-static-paths-integration/.gitignore delete mode 100644 packages/astro/test/fixtures/content-static-paths-integration/src/content/types.generated.d.ts create mode 100644 packages/astro/test/fixtures/content/.gitignore delete mode 100644 packages/astro/test/fixtures/content/src/content/types.generated.d.ts diff --git a/packages/astro/test/fixtures/content-ssr-integration/.gitignore b/packages/astro/test/fixtures/content-ssr-integration/.gitignore new file mode 100644 index 000000000..54f79dcd6 --- /dev/null +++ b/packages/astro/test/fixtures/content-ssr-integration/.gitignore @@ -0,0 +1 @@ +types.generated.d.ts diff --git a/packages/astro/test/fixtures/content-ssr-integration/src/content/types.generated.d.ts b/packages/astro/test/fixtures/content-ssr-integration/src/content/types.generated.d.ts deleted file mode 100644 index 7183d2433..000000000 --- a/packages/astro/test/fixtures/content-ssr-integration/src/content/types.generated.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -declare module 'astro:content' { - export { z } from 'astro/zod'; - export type CollectionEntry = - typeof entryMap[C][keyof typeof entryMap[C]] & Render; - - type BaseCollectionConfig = { - schema?: S; - slug?: (entry: { - id: CollectionEntry['id']; - defaultSlug: string; - collection: string; - body: string; - data: import('astro/zod').infer>; - }) => string | Promise; - }; - export function defineCollection( - input: BaseCollectionConfig - ): BaseCollectionConfig; - - export function getEntry( - collection: C, - entryKey: E - ): Promise; - export function getCollection< - C extends keyof typeof entryMap, - E extends keyof typeof entryMap[C] - >( - collection: C, - filter?: (data: typeof entryMap[C][E]) => boolean - ): Promise<(typeof entryMap[C][E] & Render)[]>; - - type InferEntrySchema = import('astro/zod').infer< - import('astro/zod').ZodObject['schema']> - >; - - type Render = { - render(): Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - injectedFrontmatter: Record; - }>; - }; - - const entryMap: { - "blog": { -"first-post.md": { - id: "first-post.md", - slug: "first-post", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"second-post.md": { - id: "second-post.md", - slug: "second-post", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"third-post.md": { - id: "third-post.md", - slug: "third-post", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"using-mdx.mdx": { - id: "using-mdx.mdx", - slug: "using-mdx", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -}, - - }; - - type ContentConfig = typeof import("./config"); -} diff --git a/packages/astro/test/fixtures/content-static-paths-integration/.gitignore b/packages/astro/test/fixtures/content-static-paths-integration/.gitignore new file mode 100644 index 000000000..54f79dcd6 --- /dev/null +++ b/packages/astro/test/fixtures/content-static-paths-integration/.gitignore @@ -0,0 +1 @@ +types.generated.d.ts diff --git a/packages/astro/test/fixtures/content-static-paths-integration/src/content/types.generated.d.ts b/packages/astro/test/fixtures/content-static-paths-integration/src/content/types.generated.d.ts deleted file mode 100644 index 7183d2433..000000000 --- a/packages/astro/test/fixtures/content-static-paths-integration/src/content/types.generated.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -declare module 'astro:content' { - export { z } from 'astro/zod'; - export type CollectionEntry = - typeof entryMap[C][keyof typeof entryMap[C]] & Render; - - type BaseCollectionConfig = { - schema?: S; - slug?: (entry: { - id: CollectionEntry['id']; - defaultSlug: string; - collection: string; - body: string; - data: import('astro/zod').infer>; - }) => string | Promise; - }; - export function defineCollection( - input: BaseCollectionConfig - ): BaseCollectionConfig; - - export function getEntry( - collection: C, - entryKey: E - ): Promise; - export function getCollection< - C extends keyof typeof entryMap, - E extends keyof typeof entryMap[C] - >( - collection: C, - filter?: (data: typeof entryMap[C][E]) => boolean - ): Promise<(typeof entryMap[C][E] & Render)[]>; - - type InferEntrySchema = import('astro/zod').infer< - import('astro/zod').ZodObject['schema']> - >; - - type Render = { - render(): Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - injectedFrontmatter: Record; - }>; - }; - - const entryMap: { - "blog": { -"first-post.md": { - id: "first-post.md", - slug: "first-post", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"second-post.md": { - id: "second-post.md", - slug: "second-post", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"third-post.md": { - id: "third-post.md", - slug: "third-post", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"using-mdx.mdx": { - id: "using-mdx.mdx", - slug: "using-mdx", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -}, - - }; - - type ContentConfig = typeof import("./config"); -} diff --git a/packages/astro/test/fixtures/content/.gitignore b/packages/astro/test/fixtures/content/.gitignore new file mode 100644 index 000000000..54f79dcd6 --- /dev/null +++ b/packages/astro/test/fixtures/content/.gitignore @@ -0,0 +1 @@ +types.generated.d.ts diff --git a/packages/astro/test/fixtures/content/src/content/types.generated.d.ts b/packages/astro/test/fixtures/content/src/content/types.generated.d.ts deleted file mode 100644 index 99fd83ae0..000000000 --- a/packages/astro/test/fixtures/content/src/content/types.generated.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -declare module 'astro:content' { - export { z } from 'astro/zod'; - export type CollectionEntry = - typeof entryMap[C][keyof typeof entryMap[C]] & Render; - - type BaseCollectionConfig = { - schema?: S; - slug?: (entry: { - id: CollectionEntry['id']; - defaultSlug: string; - collection: string; - body: string; - data: import('astro/zod').infer>; - }) => string | Promise; - }; - export function defineCollection( - input: BaseCollectionConfig - ): BaseCollectionConfig; - - export function getEntry( - collection: C, - entryKey: E - ): Promise; - export function getCollection< - C extends keyof typeof entryMap, - E extends keyof typeof entryMap[C] - >( - collection: C, - filter?: (data: typeof entryMap[C][E]) => boolean - ): Promise<(typeof entryMap[C][E] & Render)[]>; - - type InferEntrySchema = import('astro/zod').infer< - import('astro/zod').ZodObject['schema']> - >; - - type Render = { - render(): Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - injectedFrontmatter: Record; - }>; - }; - - const entryMap: { - "blog": { -"one.md": { - id: "one.md", - slug: "one", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -"promo/launch-week.mdx": { - id: "promo/launch-week.mdx", - slug: "promo/launch-week", - body: string, - collection: "blog", - data: InferEntrySchema<"blog"> -}, -}, - - }; - - type ContentConfig = typeof import("./config"); -}