0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

chore(astro): move error-map (#10898)

This commit is contained in:
Florian Lefebvre 2024-04-29 19:08:59 +02:00 committed by GitHub
parent b6f011d7c0
commit 87b31fbf6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 8 deletions

View file

@ -1,5 +1,4 @@
export { CONTENT_FLAG, PROPAGATED_ASSET_FLAG } from './consts.js';
export { errorMap } from './error-map.js';
export { attachContentServerListeners } from './server-listeners.js';
export { createContentTypesGenerator } from './types-generator.js';
export {

View file

@ -12,12 +12,9 @@ import type {
ContentEntryType,
DataEntryType,
} from '../@types/astro.js';
import { AstroError, AstroErrorData } from '../core/errors/index.js';
import { MarkdownError } from '../core/errors/index.js';
import { AstroError, AstroErrorData, MarkdownError, errorMap } from '../core/errors/index.js';
import { isYAMLException } from '../core/errors/utils.js';
import { CONTENT_FLAGS, CONTENT_TYPES_FILE, PROPAGATED_ASSET_FLAG } from './consts.js';
import { errorMap } from './error-map.js';
import { createImage } from './runtime-assets.js';
/**

View file

@ -11,3 +11,4 @@ export {
export type { ErrorLocation, ErrorWithMetadata } from './errors.js';
export { codeFrame } from './printer.js';
export { createSafeError, positionAt } from './utils.js';
export { errorMap } from './zod-error-map.js';

View file

@ -1,8 +1,8 @@
import * as assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { errorMap } from '../../../dist/content/index.js';
import { z } from '../../../zod.mjs';
import { fixLineEndings } from '../../test-utils.js';
import { errorMap } from '../dist/core/errors/zod-error-map.js';
import { z } from '../zod.mjs';
import { fixLineEndings } from './test-utils.js';
describe('Content Collections - error map', () => {
it('Prefixes messages with object key', () => {