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:
parent
b6f011d7c0
commit
87b31fbf6e
5 changed files with 5 additions and 8 deletions
|
@ -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 {
|
||||
|
|
|
@ -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';
|
||||
|
||||
/**
|
||||
|
|
|
@ -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';
|
|
@ -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', () => {
|
Loading…
Reference in a new issue