From 018cc7d51f372dc0e511d9dc1dfff0d01bc22309 Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Thu, 27 Oct 2022 17:40:25 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/errors/index.ts | 18 +++++++++--------- packages/astro/src/core/errors/utils.ts | 2 +- packages/astro/src/core/render/dev/index.ts | 2 +- packages/astro/src/core/util.ts | 2 +- .../src/vite-plugin-astro-server/index.ts | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/astro/src/core/errors/index.ts b/packages/astro/src/core/errors/index.ts index c41c439335..7eefbc824b 100644 --- a/packages/astro/src/core/errors/index.ts +++ b/packages/astro/src/core/errors/index.ts @@ -1,12 +1,12 @@ export { AstroErrorCodes } from './codes.js'; -export { - AstroError, - CSSError, - CompilerError, - RuntimeError, - MarkdownError, - AggregateError, -} from './errors.js'; export type { ErrorLocation, ErrorWithMetadata } from './errors'; +export { + AggregateError, + AstroError, + CompilerError, + CSSError, + MarkdownError, + RuntimeError, +} from './errors.js'; export { codeFrame } from './printer.js'; -export { positionAt, collectInfoFromStacktrace } from './utils.js'; +export { collectInfoFromStacktrace, positionAt } from './utils.js'; diff --git a/packages/astro/src/core/errors/utils.ts b/packages/astro/src/core/errors/utils.ts index 471283f11d..9999b81b4f 100644 --- a/packages/astro/src/core/errors/utils.ts +++ b/packages/astro/src/core/errors/utils.ts @@ -1,6 +1,6 @@ +import eol from 'eol'; import stripAnsi from 'strip-ansi'; import type { SSRError } from '../../@types/astro.js'; -import eol from 'eol'; export function collectInfoFromStacktrace(error: SSRError): SSRError { if (!error.stack) return error; diff --git a/packages/astro/src/core/render/dev/index.ts b/packages/astro/src/core/render/dev/index.ts index 727007c350..57c436bf65 100644 --- a/packages/astro/src/core/render/dev/index.ts +++ b/packages/astro/src/core/render/dev/index.ts @@ -10,7 +10,7 @@ import type { } from '../../../@types/astro'; import { PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js'; import { enhanceViteSSRError } from '../../errors/dev/index.js'; -import { MarkdownError, CSSError, AggregateError } from '../../errors/index.js'; +import { AggregateError, CSSError, MarkdownError } from '../../errors/index.js'; import { LogOptions } from '../../logger/core.js'; import { isPage, resolveIdToUrl } from '../../util.js'; import { createRenderContext, renderPage as coreRenderPage } from '../index.js'; diff --git a/packages/astro/src/core/util.ts b/packages/astro/src/core/util.ts index 482b7735f4..da51d848cd 100644 --- a/packages/astro/src/core/util.ts +++ b/packages/astro/src/core/util.ts @@ -3,7 +3,7 @@ import path from 'path'; import resolve from 'resolve'; import slash from 'slash'; import { fileURLToPath, pathToFileURL } from 'url'; -import { ErrorPayload, normalizePath, ViteDevServer } from 'vite'; +import { normalizePath, ViteDevServer } from 'vite'; import type { AstroConfig, AstroSettings, RouteType } from '../@types/astro'; import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './constants.js'; import { prependForwardSlash, removeTrailingForwardSlash } from './path.js'; diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 98afcef3fc..023c9dd779 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -7,6 +7,8 @@ import { DevelopmentEnvironment, SSROptions } from '../core/render/dev/index'; import { Readable } from 'stream'; import { attachToResponse, getSetCookiesFromResponse } from '../core/cookies/index.js'; import { call as callEndpoint } from '../core/endpoint/dev/index.js'; +import { collectErrorMetadata, getViteErrorPayload } from '../core/errors/dev/index.js'; +import type { ErrorWithMetadata } from '../core/errors/index.js'; import { error, info, LogOptions, warn } from '../core/logger/core.js'; import * as msg from '../core/messages.js'; import { appendForwardSlash } from '../core/path.js'; @@ -16,8 +18,6 @@ import { createRequest } from '../core/request.js'; import { createRouteManifest, matchAllRoutes } from '../core/routing/index.js'; import { resolvePages } from '../core/util.js'; import notFoundTemplate, { subpathNotUsedTemplate } from '../template/4xx.js'; -import { collectErrorMetadata, getViteErrorPayload } from '../core/errors/dev/index.js'; -import type { ErrorWithMetadata } from '../core/errors/index.js'; interface AstroPluginOptions { settings: AstroSettings;