Repository: withastro/astro
File: packages/astro/src/core/errors/errors-data.ts (TypeScript)

Code before:
			`- ${alsoFound}`
		);
	},
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [devalue library](https://github.com/rich-harris/devalue)
 * @description
 * `transform()` functions in your content config must return valid JSON, or data types compatible with the devalue library (including Dates, Maps, and Sets).
 */
export const UnsupportedConfigTransformError = {
	name: 'UnsupportedConfigTransformError',
	title: 'Unsupported transform in content config.',
	message: (parseError: string) =>
		`\`transform()\` functions in your content config must return valid JSON, or data types compatible with the devalue library (including Dates, Maps, and Sets).\nFull error: ${parseError}`,
	hint: 'See the devalue library for all supported types: https://github.com/rich-harris/devalue',
} satisfies ErrorData;

/**
 * @docs
 * @see
 *  - [Passing a `parser` to the `file` loader](https://docs.astro.build/en/guides/content-collections/#parser-function)
 * @description
 * The `file` loader can’t determine which parser to use. Please provide a custom parser (e.g. or `csv-parse`) to create a collection from your file type.
 */
export const FileParserNotFound = {
	name: 'FileParserNotFound',
	title: 'File parser not found',
	message: (fileName: string) =>
		`No parser was found for '${fileName}'. Pass a parser function (e.g. \`parser: csv\`) to the \`file\` loader.`,
} satisfies ErrorData;

/**
 * @docs
 * @see
 *  - [Astro's built-in loaders](https://docs.astro.build/en/guides/content-collections/#built-in-loaders)
 * @description
 * The `file` loader must be passed a single local file. Glob patterns are not supported. Use the built-in `glob` loader to create entries from patterns of multiple local files.
 */
export const FileGlobNotSupported = {
	name: 'FileGlobNotSupported',
	title: 'Glob patterns are not supported in the file loader',
	message: 'Glob patterns are not supported in the `file` loader. Use the `glob` loader instead.',
	hint: `See Astro's built-in file and glob loaders https://docs.astro.build/en/guides/content-collections/#built-in-loaders for supported usage.`,
} satisfies ErrorData;

/**
 * @docs
 * @kind heading

Review comment (suggestion):
```suggestion
 * The `file` loader can’t determine which parser to use. Please provide a custom parser (e.g. `csv-parse`) to create a collection from your file type.
```

Code after:
			`- ${alsoFound}`
		);
	},
} satisfies ErrorData;

/**
 * @docs
 * @see
 * - [devalue library](https://github.com/rich-harris/devalue)
 * @description
 * `transform()` functions in your content config must return valid JSON, or data types compatible with the devalue library (including Dates, Maps, and Sets).
 */
export const UnsupportedConfigTransformError = {
	name: 'UnsupportedConfigTransformError',
	title: 'Unsupported transform in content config.',
	message: (parseError: string) =>
		`\`transform()\` functions in your content config must return valid JSON, or data types compatible with the devalue library (including Dates, Maps, and Sets).\nFull error: ${parseError}`,
	hint: 'See the devalue library for all supported types: https://github.com/rich-harris/devalue',
} satisfies ErrorData;

/**
 * @docs
 * @see
 *  - [Passing a `parser` to the `file` loader](https://docs.astro.build/en/guides/content-collections/#parser-function)
 * @description
 * The `file` loader can’t determine which parser to use. Please provide a custom parser (e.g. `csv-parse`) to create a collection from your file type.
 */
export const FileParserNotFound = {
	name: 'FileParserNotFound',
	title: 'File parser not found',
	message: (fileName: string) =>
		`No parser was found for '${fileName}'. Pass a parser function (e.g. \`parser: csv\`) to the \`file\` loader.`,
} satisfies ErrorData;

/**
 * @docs
 * @see
 *  - [Astro's built-in loaders](https://docs.astro.build/en/guides/content-collections/#built-in-loaders)
 * @description
 * The `file` loader must be passed a single local file. Glob patterns are not supported. Use the built-in `glob` loader to create entries from patterns of multiple local files.
 */
export const FileGlobNotSupported = {
	name: 'FileGlobNotSupported',
	title: 'Glob patterns are not supported in the file loader',
	message: 'Glob patterns are not supported in the `file` loader. Use the `glob` loader instead.',
	hint: `See Astro's built-in file and glob loaders https://docs.astro.build/en/guides/content-collections/#built-in-loaders for supported usage.`,
} satisfies ErrorData;

/**
 * @docs
 * @kind heading