0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-17 23:11:29 -05:00

[ci] format

This commit is contained in:
Bjorn Lu 2023-11-30 15:06:09 +00:00 committed by astrobot-houston
parent fbf145af8a
commit cfa0c454b5
29 changed files with 19 additions and 38 deletions

View file

@ -20,6 +20,7 @@ import type { AstroTimer } from '../core/config/timer.js';
import type { TSConfig } from '../core/config/tsconfig.js';
import type { AstroCookies } from '../core/cookies/index.js';
import type { AstroIntegrationLogger, Logger, LoggerLevel } from '../core/logger/core.js';
import type { AstroPreferences } from '../preferences/index.js';
import type { AstroDevOverlay, DevOverlayCanvas } from '../runtime/client/dev-overlay/overlay.js';
import type { Icon } from '../runtime/client/dev-overlay/ui-library/icons.js';
import type {
@ -35,7 +36,6 @@ import type {
import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
import type { DeepPartial, OmitIndexSignature, Simplify } from '../type-utils.js';
import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
import type { AstroPreferences } from '../preferences/index.js';
export { type AstroIntegrationLogger };

View file

@ -1,5 +1,4 @@
import MagicString from 'magic-string';
import type * as vite from 'vite';
import { normalizePath } from 'vite';
import type { AstroPluginOptions, ImageTransform } from '../@types/astro.js';
import { extendManualChunks } from '../core/build/plugins/util.js';

View file

@ -5,13 +5,13 @@ import type { AstroSettings } from '../../@types/astro.js';
import { bold } from 'kleur/colors';
import { fileURLToPath } from 'node:url';
import * as msg from '../../core/messages.js';
import { createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js';
import dlv from 'dlv';
import { resolveConfig } from '../../core/config/config.js';
import { createSettings } from '../../core/config/settings.js';
import { coerce, isValidKey, type PreferenceKey } from '../../preferences/index.js';
import * as msg from '../../core/messages.js';
import { DEFAULT_PREFERENCES } from '../../preferences/defaults.js';
import dlv from 'dlv';
import { coerce, isValidKey, type PreferenceKey } from '../../preferences/index.js';
import { createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js';
// @ts-expect-error flattie types are mispackaged
import { flattie } from 'flattie';
import { formatWithOptions } from 'node:util';

View file

@ -1,6 +1,6 @@
import type { RouteData } from '../../@types/astro.js';
import type { SerializedSSRManifest, SSRManifest } from './types.js';
import type { RenderOptions } from './index.js';
import type { SerializedSSRManifest, SSRManifest } from './types.js';
import * as fs from 'node:fs';
import { IncomingMessage } from 'node:http';

View file

@ -2,7 +2,6 @@ import { blue, bold, green } from 'kleur/colors';
import fs from 'node:fs';
import { performance } from 'node:perf_hooks';
import { fileURLToPath } from 'node:url';
import type * as vite from 'vite';
import type {
AstroConfig,
AstroInlineConfig,

View file

@ -3,6 +3,7 @@ import path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
import { getContentPaths } from '../../content/index.js';
import createPreferences from '../../preferences/index.js';
import { markdownContentEntryType } from '../../vite-plugin-markdown/content-entry-type.js';
import { getDefaultClientDirectives } from '../client-directive/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
@ -10,7 +11,6 @@ import { formatYAMLException, isYAMLException } from '../errors/utils.js';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../constants.js';
import { AstroTimer } from './timer.js';
import { loadTSConfig } from './tsconfig.js';
import createPreferences from '../../preferences/index.js';
export function createBaseSettings(config: AstroConfig): AstroSettings {
const { contentDir } = getContentPaths(config);

View file

@ -1,15 +1,14 @@
import { green } from 'kleur/colors';
import fs from 'node:fs';
import type http from 'node:http';
import type { AddressInfo } from 'node:net';
import { performance } from 'perf_hooks';
import type * as vite from 'vite';
import type { AstroInlineConfig } from '../../@types/astro.js';
import { attachContentServerListeners } from '../../content/index.js';
import { telemetry } from '../../events/index.js';
import * as msg from '../messages.js';
import { startContainer } from './container.js';
import { createContainerWithAutomaticRestart } from './restart.js';
import { green } from 'kleur/colors';
export interface DevServer {
address: AddressInfo;

View file

@ -1,9 +1,9 @@
import {
bgCyan,
bgGreen,
bgRed,
bgWhite,
bgYellow,
bgCyan,
black,
blue,
bold,

View file

@ -1,6 +1,5 @@
import { EventEmitter } from 'node:events';
import path from 'node:path';
import type * as vite from 'vite';
import type { ModuleLoader, ModuleLoaderEventEmitter } from './loader.js';
export function createViteLoader(viteServer: vite.ViteDevServer): ModuleLoader {

View file

@ -1,4 +1,3 @@
import * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';
const virtualModuleId = 'astro:i18n';

View file

@ -1,4 +1,4 @@
import { bold, cyan, underline } from 'kleur/colors';
import { bold } from 'kleur/colors';
import fs from 'node:fs';
import type { AddressInfo } from 'node:net';
import { fileURLToPath } from 'node:url';

View file

@ -1,9 +1,9 @@
import type { AstroConfig } from '../@types/astro.js';
import { fileURLToPath } from 'node:url';
import os from 'node:os';
import process from 'node:process';
import path from 'node:path';
import process from 'node:process';
import { fileURLToPath } from 'node:url';
import dget from 'dlv';
import { DEFAULT_PREFERENCES, type Preferences } from './defaults.js';

View file

@ -1,4 +1,3 @@
import * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';
const virtualModuleId = 'astro:prefetch';

View file

@ -1,7 +1,5 @@
/* eslint-disable no-console */
import type {
DevOverlayPlugin as DevOverlayPluginDefinition,
} from '../../../@types/astro.js';
import type { DevOverlayPlugin as DevOverlayPluginDefinition } from '../../../@types/astro.js';
import { settings } from './settings.js';
import { getIconElement, isDefinedIcon, type Icon } from './ui-library/icons.js';

View file

@ -2,7 +2,7 @@ export { DevOverlayBadge } from './badge.js';
export { DevOverlayButton } from './button.js';
export { DevOverlayCard } from './card.js';
export { DevOverlayHighlight } from './highlight.js';
export { DevOverlayIcon } from './icon.js';
export { DevOverlayToggle } from './toggle.js';
export { DevOverlayTooltip } from './tooltip.js';
export { DevOverlayWindow } from './window.js';
export { DevOverlayToggle } from './toggle.js';
export { DevOverlayIcon } from './icon.js';

View file

@ -1,4 +1,3 @@
import * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';
const virtualModuleId = 'astro:transitions';

View file

@ -37,6 +37,6 @@ export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends (infer U)[]
? DeepPartial<U>[]
: T[P] extends object | undefined
? DeepPartial<T[P]>
: T[P];
? DeepPartial<T[P]>
: T[P];
};

View file

@ -1,4 +1,3 @@
import type * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';
import { bold } from 'kleur/colors';

View file

@ -1,5 +1,4 @@
import type fs from 'node:fs';
import type * as vite from 'vite';
import type { AstroSettings, ManifestData, SSRManifest } from '../@types/astro.js';
import type { SSRManifestI18n } from '../core/app/types.js';
import { patchOverlay } from '../core/errors/overlay.js';

View file

@ -1,4 +1,3 @@
import { slash } from '@astrojs/internal-helpers/path';
import { fileURLToPath } from 'node:url';
import type { HmrContext, ModuleNode } from 'vite';
import type { AstroConfig } from '../@types/astro.js';

View file

@ -1,5 +1,4 @@
import type { SourceDescription } from 'rollup';
import type * as vite from 'vite';
import type { AstroSettings } from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
import type { PluginMetadata as AstroPluginMetadata } from './types.js';

View file

@ -1,4 +1,3 @@
import type * as vite from 'vite';
import type { AstroPluginOptions } from '../@types/astro.js';
const VIRTUAL_MODULE_ID = 'astro:dev-overlay';

View file

@ -1,6 +1,5 @@
import MagicString from 'magic-string';
import { fileURLToPath } from 'node:url';
import type * as vite from 'vite';
import { loadEnv } from 'vite';
import type { AstroConfig, AstroSettings } from '../@types/astro.js';

View file

@ -1,5 +1,4 @@
import type { ModuleInfo } from 'rollup';
import type * as vite from 'vite';
import type { SSRComponentMetadata, SSRResult } from '../@types/astro.js';
import type { AstroBuildPlugin } from '../core/build/plugin.js';
import type { PluginMetadata } from '../vite-plugin-astro/types.js';

View file

@ -1,6 +1,5 @@
import nodeFs from 'node:fs';
import npath from 'node:path';
import type * as vite from 'vite';
import { slash } from '../core/path.js';
import { cleanUrl } from '../vite-plugin-utils/index.js';

View file

@ -6,7 +6,7 @@ import matter from 'gray-matter';
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import type { ErrorPayload as ViteErrorPayload, Rollup } from 'vite';
import type { Rollup, ErrorPayload as ViteErrorPayload } from 'vite';
import type { ComponentConfig } from './config.js';
import { htmlTokenTransform } from './html/transform/html-token-transform.js';
import type { MarkdocConfigResult } from './load-config.js';

View file

@ -2,10 +2,10 @@ import { markdownConfigDefaults, setVfileFrontmatter } from '@astrojs/markdown-r
import type { AstroIntegration, ContentEntryType, HookParameters, SSRError } from 'astro';
import astroJSXRenderer from 'astro/jsx/renderer.js';
import { parse as parseESM } from 'es-module-lexer';
import type { PluggableList } from 'unified';
import fs from 'node:fs/promises';
import { fileURLToPath } from 'node:url';
import type { Options as RemarkRehypeOptions } from 'remark-rehype';
import type { PluggableList } from 'unified';
import { VFile } from 'vfile';
import type { Plugin as VitePlugin } from 'vite';
import { createMdxProcessor } from './plugins.js';

View file

@ -1,7 +1,6 @@
import react, { type Options as ViteReactPluginOptions } from '@vitejs/plugin-react';
import type { AstroIntegration } from 'astro';
import { version as ReactVersion } from 'react-dom';
import type * as vite from 'vite';
export type ReactIntegrationOptions = Pick<ViteReactPluginOptions, 'include' | 'exclude'> & {
experimentalReactChildren?: boolean;

View file

@ -1,6 +1,5 @@
import type { AstroIntegration } from 'astro';
import autoprefixerPlugin from 'autoprefixer';
import type { ResultPlugin } from 'postcss-load-config';
import tailwindPlugin from 'tailwindcss';
import type { CSSOptions, UserConfig } from 'vite';