[ci] format

This commit is contained in:
Florian Lefebvre 2024-08-14 13:00:16 +00:00 committed by astrobot-houston
parent 20c7765be5
commit df78c79ea0
5 changed files with 9 additions and 11 deletions

View file

@ -1,3 +1,5 @@
import type { OutgoingHttpHeaders } from 'node:http';
import type { AddressInfo } from 'node:net';
import type {
MarkdownHeading,
MarkdownVFile,
@ -7,8 +9,6 @@ import type {
ShikiConfig,
} from '@astrojs/markdown-remark';
import type * as babel from '@babel/core';
import type { OutgoingHttpHeaders } from 'node:http';
import type { AddressInfo } from 'node:net';
import type * as rollup from 'rollup';
import type * as vite from 'vite';
import type {
@ -2261,7 +2261,7 @@ export interface AstroUserConfig {
* updatedDate: z.coerce.date().optional(),
* })
* });
*
*
* const dogs = defineCollection({
* // The path is relative to the project root, or an absolute path.
* loader: file("src/data/dogs.json"),

View file

@ -1,6 +1,6 @@
import { promises as fs, type PathLike, existsSync } from 'fs';
import type { MarkdownHeading } from '@astrojs/markdown-remark';
import * as devalue from 'devalue';
import { existsSync, promises as fs, type PathLike } from 'fs';
import { imageSrcToImportId, importIdToSymbolName } from '../assets/utils/resolveImports.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { CONTENT_MODULE_FLAG, DEFERRED_MODULE } from './consts.js';

View file

@ -1,10 +1,10 @@
import glob from 'fast-glob';
import { bold, cyan } from 'kleur/colors';
import type fsMod from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import glob from 'fast-glob';
import { bold, cyan } from 'kleur/colors';
import { type ViteDevServer, normalizePath } from 'vite';
import { z, type ZodSchema } from 'zod';
import { type ZodSchema, z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';
import { printNode, zodToTs } from 'zod-to-ts';
import type { AstroSettings, ContentEntryType } from '../@types/astro.js';
@ -473,7 +473,7 @@ async function writeContentFiles({
collection.type === 'unknown'
? // Add empty / unknown collections to the data type map by default
// This ensures `getCollection('empty-collection')` doesn't raise a type error
(collectionConfig?.type ?? 'data')
collectionConfig?.type ?? 'data'
: collection.type;
const collectionEntryKeys = Object.keys(collection.entries).sort();

View file

@ -4,9 +4,9 @@ import { fileURLToPath } from 'node:url';
import { bold } from 'kleur/colors';
import { normalizePath } from 'vite';
import type { AstroSettings } from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import type { Logger } from '../logger/core.js';
import { REFERENCE_FILE } from './constants.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
export async function writeFiles(settings: AstroSettings, fs: typeof fsMod, logger: Logger) {
try {

View file

@ -1,5 +1,4 @@
declare module 'astro:content' {
interface RenderResult {
Content: import('astro/runtime/server/index.js').AstroComponentFactory;
headings: import('astro').MarkdownHeading[];
@ -9,7 +8,6 @@ declare module 'astro:content' {
'.md': Promise<RenderResult>;
}
export interface RenderedContent {
html: string;
metadata?: {