diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 5cbf4faf87fb..cc2ddb775d0e 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -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 }; diff --git a/packages/astro/src/assets/vite-plugin-assets.ts b/packages/astro/src/assets/vite-plugin-assets.ts index ff6d0034e550..eb6fade4da49 100644 --- a/packages/astro/src/assets/vite-plugin-assets.ts +++ b/packages/astro/src/assets/vite-plugin-assets.ts @@ -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'; diff --git a/packages/astro/src/cli/preferences/index.ts b/packages/astro/src/cli/preferences/index.ts index 48d6a298d0f3..35de2ce04068 100644 --- a/packages/astro/src/cli/preferences/index.ts +++ b/packages/astro/src/cli/preferences/index.ts @@ -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'; diff --git a/packages/astro/src/core/app/node.ts b/packages/astro/src/core/app/node.ts index 46882f58ed12..f5ea38cc18d2 100644 --- a/packages/astro/src/core/app/node.ts +++ b/packages/astro/src/core/app/node.ts @@ -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'; diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts index 0245e50c2ff1..162c268c6640 100644 --- a/packages/astro/src/core/build/index.ts +++ b/packages/astro/src/core/build/index.ts @@ -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, diff --git a/packages/astro/src/core/config/settings.ts b/packages/astro/src/core/config/settings.ts index 29df00eafc1e..4dc4beca8926 100644 --- a/packages/astro/src/core/config/settings.ts +++ b/packages/astro/src/core/config/settings.ts @@ -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); diff --git a/packages/astro/src/core/dev/dev.ts b/packages/astro/src/core/dev/dev.ts index 980b93463c89..9260f33a84ed 100644 --- a/packages/astro/src/core/dev/dev.ts +++ b/packages/astro/src/core/dev/dev.ts @@ -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; diff --git a/packages/astro/src/core/messages.ts b/packages/astro/src/core/messages.ts index 135aa58137bc..ebac2c51d611 100644 --- a/packages/astro/src/core/messages.ts +++ b/packages/astro/src/core/messages.ts @@ -1,9 +1,9 @@ import { + bgCyan, bgGreen, bgRed, bgWhite, bgYellow, - bgCyan, black, blue, bold, diff --git a/packages/astro/src/core/module-loader/vite.ts b/packages/astro/src/core/module-loader/vite.ts index 48ec230f078a..204b1621c06d 100644 --- a/packages/astro/src/core/module-loader/vite.ts +++ b/packages/astro/src/core/module-loader/vite.ts @@ -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 { diff --git a/packages/astro/src/i18n/vite-plugin-i18n.ts b/packages/astro/src/i18n/vite-plugin-i18n.ts index faba67da338e..c9c035ce0757 100644 --- a/packages/astro/src/i18n/vite-plugin-i18n.ts +++ b/packages/astro/src/i18n/vite-plugin-i18n.ts @@ -1,4 +1,3 @@ -import * as vite from 'vite'; import type { AstroSettings } from '../@types/astro.js'; const virtualModuleId = 'astro:i18n'; diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index 18dfa53546c1..2f5bc675b273 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -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'; diff --git a/packages/astro/src/preferences/index.ts b/packages/astro/src/preferences/index.ts index 91b942101039..00a46c573a91 100644 --- a/packages/astro/src/preferences/index.ts +++ b/packages/astro/src/preferences/index.ts @@ -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'; diff --git a/packages/astro/src/prefetch/vite-plugin-prefetch.ts b/packages/astro/src/prefetch/vite-plugin-prefetch.ts index 69714fd493b5..af3b776ed2ed 100644 --- a/packages/astro/src/prefetch/vite-plugin-prefetch.ts +++ b/packages/astro/src/prefetch/vite-plugin-prefetch.ts @@ -1,4 +1,3 @@ -import * as vite from 'vite'; import type { AstroSettings } from '../@types/astro.js'; const virtualModuleId = 'astro:prefetch'; diff --git a/packages/astro/src/runtime/client/dev-overlay/overlay.ts b/packages/astro/src/runtime/client/dev-overlay/overlay.ts index 2a45e740fac3..b6a0095cdfb3 100644 --- a/packages/astro/src/runtime/client/dev-overlay/overlay.ts +++ b/packages/astro/src/runtime/client/dev-overlay/overlay.ts @@ -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'; diff --git a/packages/astro/src/runtime/client/dev-overlay/ui-library/index.ts b/packages/astro/src/runtime/client/dev-overlay/ui-library/index.ts index ba60ecf1e67e..a9c039a417ff 100644 --- a/packages/astro/src/runtime/client/dev-overlay/ui-library/index.ts +++ b/packages/astro/src/runtime/client/dev-overlay/ui-library/index.ts @@ -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'; diff --git a/packages/astro/src/transitions/vite-plugin-transitions.ts b/packages/astro/src/transitions/vite-plugin-transitions.ts index a3d68ade653c..cce10702e0ae 100644 --- a/packages/astro/src/transitions/vite-plugin-transitions.ts +++ b/packages/astro/src/transitions/vite-plugin-transitions.ts @@ -1,4 +1,3 @@ -import * as vite from 'vite'; import type { AstroSettings } from '../@types/astro.js'; const virtualModuleId = 'astro:transitions'; diff --git a/packages/astro/src/type-utils.ts b/packages/astro/src/type-utils.ts index 98f2c9864fa0..4304438dbfde 100644 --- a/packages/astro/src/type-utils.ts +++ b/packages/astro/src/type-utils.ts @@ -37,6 +37,6 @@ export type DeepPartial = { [P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial[] : T[P] extends object | undefined - ? DeepPartial - : T[P]; + ? DeepPartial + : T[P]; }; diff --git a/packages/astro/src/vite-plugin-astro-server/base.ts b/packages/astro/src/vite-plugin-astro-server/base.ts index e757515d739c..b1521bdfa6f7 100644 --- a/packages/astro/src/vite-plugin-astro-server/base.ts +++ b/packages/astro/src/vite-plugin-astro-server/base.ts @@ -1,4 +1,3 @@ -import type * as vite from 'vite'; import type { AstroSettings } from '../@types/astro.js'; import { bold } from 'kleur/colors'; diff --git a/packages/astro/src/vite-plugin-astro-server/plugin.ts b/packages/astro/src/vite-plugin-astro-server/plugin.ts index d324dfdc6e4a..79bff553ab33 100644 --- a/packages/astro/src/vite-plugin-astro-server/plugin.ts +++ b/packages/astro/src/vite-plugin-astro-server/plugin.ts @@ -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'; diff --git a/packages/astro/src/vite-plugin-astro/hmr.ts b/packages/astro/src/vite-plugin-astro/hmr.ts index dc820e9f6ba3..6e27692e9a2f 100644 --- a/packages/astro/src/vite-plugin-astro/hmr.ts +++ b/packages/astro/src/vite-plugin-astro/hmr.ts @@ -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'; diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index 63198990387b..ac20be3e3142 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -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'; diff --git a/packages/astro/src/vite-plugin-dev-overlay/vite-plugin-dev-overlay.ts b/packages/astro/src/vite-plugin-dev-overlay/vite-plugin-dev-overlay.ts index 5c3aabe5ac6d..b5259ad807ef 100644 --- a/packages/astro/src/vite-plugin-dev-overlay/vite-plugin-dev-overlay.ts +++ b/packages/astro/src/vite-plugin-dev-overlay/vite-plugin-dev-overlay.ts @@ -1,4 +1,3 @@ -import type * as vite from 'vite'; import type { AstroPluginOptions } from '../@types/astro.js'; const VIRTUAL_MODULE_ID = 'astro:dev-overlay'; diff --git a/packages/astro/src/vite-plugin-env/index.ts b/packages/astro/src/vite-plugin-env/index.ts index 1958344e595c..6c90c4c5a3b5 100644 --- a/packages/astro/src/vite-plugin-env/index.ts +++ b/packages/astro/src/vite-plugin-env/index.ts @@ -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'; diff --git a/packages/astro/src/vite-plugin-head/index.ts b/packages/astro/src/vite-plugin-head/index.ts index 228e4e437fcd..3f05a3ed7b16 100644 --- a/packages/astro/src/vite-plugin-head/index.ts +++ b/packages/astro/src/vite-plugin-head/index.ts @@ -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'; diff --git a/packages/astro/src/vite-plugin-load-fallback/index.ts b/packages/astro/src/vite-plugin-load-fallback/index.ts index 80db39edd433..f5cf9c31c940 100644 --- a/packages/astro/src/vite-plugin-load-fallback/index.ts +++ b/packages/astro/src/vite-plugin-load-fallback/index.ts @@ -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'; diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts index 21ba7ab195ce..384dec9445e5 100644 --- a/packages/integrations/markdoc/src/content-entry-type.ts +++ b/packages/integrations/markdoc/src/content-entry-type.ts @@ -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'; diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 3fc00a7236bc..3092ad51f02b 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -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'; diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index d5f6965224e4..9f603d24e0ad 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -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 & { experimentalReactChildren?: boolean; diff --git a/packages/integrations/tailwind/src/index.ts b/packages/integrations/tailwind/src/index.ts index f0cb5feb4f4e..1333665b6980 100644 --- a/packages/integrations/tailwind/src/index.ts +++ b/packages/integrations/tailwind/src/index.ts @@ -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';