0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00

[ci] format

This commit is contained in:
natemoo-re 2022-06-10 18:20:21 +00:00 committed by github-actions[bot]
parent 3ec41f284c
commit 43dda86ce2
3 changed files with 5 additions and 7 deletions

View file

@ -69,10 +69,9 @@ export function collectErrorMetadata(e: any): ErrorWithMetadata {
(e as any).stack = eol.lf((e as any).stack); (e as any).stack = eol.lf((e as any).stack);
} }
if (e.name === 'YAMLException') { if (e.name === 'YAMLException') {
const err = e as SSRError; const err = e as SSRError;
err.loc = { file: (e as any).id, line: (e as any).mark.line, column: (e as any).mark.column } err.loc = { file: (e as any).id, line: (e as any).mark.line, column: (e as any).mark.column };
err.message = (e as any).reason; err.message = (e as any).reason;
if (!err.frame) { if (!err.frame) {

View file

@ -8,9 +8,9 @@ import { fileURLToPath } from 'url';
import type { Plugin } from 'vite'; import type { Plugin } from 'vite';
import type { AstroConfig } from '../@types/astro'; import type { AstroConfig } from '../@types/astro';
import { pagesVirtualModuleId } from '../core/app/index.js'; import { pagesVirtualModuleId } from '../core/app/index.js';
import { collectErrorMetadata } from '../core/errors.js';
import { prependForwardSlash } from '../core/path.js'; import { prependForwardSlash } from '../core/path.js';
import { resolvePages, viteID } from '../core/util.js'; import { resolvePages, viteID } from '../core/util.js';
import { collectErrorMetadata } from '../core/errors.js';
import { PAGE_SSR_SCRIPT_ID } from '../vite-plugin-scripts/index.js'; import { PAGE_SSR_SCRIPT_ID } from '../vite-plugin-scripts/index.js';
import { getFileInfo } from '../vite-plugin-utils/index.js'; import { getFileInfo } from '../vite-plugin-utils/index.js';
@ -26,7 +26,7 @@ function safeMatter(source: string, id: string) {
return matter(source); return matter(source);
} catch (e) { } catch (e) {
(e as any).id = id; (e as any).id = id;
throw collectErrorMetadata(e) throw collectErrorMetadata(e);
} }
} }

View file

@ -26,8 +26,7 @@
"build:ci": "astro-scripts build \"src/**/*.ts\"", "build:ci": "astro-scripts build \"src/**/*.ts\"",
"dev": "astro-scripts dev \"src/**/*.ts\"" "dev": "astro-scripts dev \"src/**/*.ts\""
}, },
"dependencies": { "dependencies": {},
},
"devDependencies": { "devDependencies": {
"astro": "workspace:*", "astro": "workspace:*",
"astro-scripts": "workspace:*" "astro-scripts": "workspace:*"