diff --git a/packages/astro/components/Image.astro b/packages/astro/components/Image.astro index aee198a602..4e55f5608b 100644 --- a/packages/astro/components/Image.astro +++ b/packages/astro/components/Image.astro @@ -1,5 +1,5 @@ --- -import { getImage, type LocalImageProps, type RemoteImageProps } from 'astro:assets'; +import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets'; import { AstroError, AstroErrorData } from '../dist/core/errors/index.js'; import type { HTMLAttributes } from '../types'; diff --git a/packages/astro/components/Picture.astro b/packages/astro/components/Picture.astro index 6dcc50c8e1..3984a53e96 100644 --- a/packages/astro/components/Picture.astro +++ b/packages/astro/components/Picture.astro @@ -1,5 +1,5 @@ --- -import { getImage, type LocalImageProps, type RemoteImageProps } from 'astro:assets'; +import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets'; import type { GetImageResult, ImageOutputFormat } from '../dist/@types/astro'; import { isESMImportedImage, resolveSrc } from '../dist/assets/utils/imageKind'; import { AstroError, AstroErrorData } from '../dist/core/errors/index.js'; diff --git a/packages/astro/e2e/fixtures/astro-component/src/pages/index.astro b/packages/astro/e2e/fixtures/astro-component/src/pages/index.astro index 3ada093e7d..04cb1c110c 100644 --- a/packages/astro/e2e/fixtures/astro-component/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/astro-component/src/pages/index.astro @@ -1,7 +1,7 @@ --- -import Hero from '../components/Hero.astro'; import LinkedLib from '@e2e/astro-linked-lib' import HoistedScript from '@e2e/astro-linked-lib/HoistedScript' +import Hero from '../components/Hero.astro'; --- diff --git a/packages/astro/e2e/fixtures/client-only/src/pages/index.astro b/packages/astro/e2e/fixtures/client-only/src/pages/index.astro index d8b30b9cf0..a80bddc0eb 100644 --- a/packages/astro/e2e/fixtures/client-only/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/client-only/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import * as react from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.jsx'; +import * as react from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.jsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/hydration-race/src/components/Wrapper.astro b/packages/astro/e2e/fixtures/hydration-race/src/components/Wrapper.astro index a3de9b8ecc..9a914d8fb3 100644 --- a/packages/astro/e2e/fixtures/hydration-race/src/components/Wrapper.astro +++ b/packages/astro/e2e/fixtures/hydration-race/src/components/Wrapper.astro @@ -1,6 +1,6 @@ --- -import One from './One.jsx'; import Deeper from './Deeper.astro'; +import One from './One.jsx'; --- diff --git a/packages/astro/e2e/fixtures/lit-component/src/pages/index.astro b/packages/astro/e2e/fixtures/lit-component/src/pages/index.astro index 43eb17a4ec..1d9511057b 100644 --- a/packages/astro/e2e/fixtures/lit-component/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/lit-component/src/pages/index.astro @@ -1,7 +1,7 @@ --- +import ClientOnlyComponent from '../components/ClientOnlyComponent.js'; import MyCounter from '../components/Counter.js'; import NonDeferredCounter from '../components/NonDeferredCounter.js'; -import ClientOnlyComponent from '../components/ClientOnlyComponent.js'; const someProps = { count: 10, diff --git a/packages/astro/e2e/fixtures/multiple-frameworks/src/pages/index.astro b/packages/astro/e2e/fixtures/multiple-frameworks/src/pages/index.astro index ded58d8aa1..55b2108cbe 100644 --- a/packages/astro/e2e/fixtures/multiple-frameworks/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/multiple-frameworks/src/pages/index.astro @@ -1,13 +1,13 @@ --- -// Style Imports -import '../styles/global.css'; // Component Imports import { A, B as Renamed } from '../components'; -import * as react from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.tsx'; +import * as react from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; +// Style Imports +import '../styles/global.css'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/nested-in-preact/src/pages/index.astro b/packages/astro/e2e/fixtures/nested-in-preact/src/pages/index.astro index 19ab504275..962f8f0385 100644 --- a/packages/astro/e2e/fixtures/nested-in-preact/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/nested-in-preact/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import ReactCounter from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.tsx'; +import ReactCounter from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/nested-in-react/src/pages/index.astro b/packages/astro/e2e/fixtures/nested-in-react/src/pages/index.astro index 1ab459f743..9fb5b48628 100644 --- a/packages/astro/e2e/fixtures/nested-in-react/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/nested-in-react/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import ReactCounter from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.tsx'; +import ReactCounter from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/nested-in-solid/src/pages/index.astro b/packages/astro/e2e/fixtures/nested-in-solid/src/pages/index.astro index 91552a8367..c4af890a0a 100644 --- a/packages/astro/e2e/fixtures/nested-in-solid/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/nested-in-solid/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.tsx'; +import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/nested-in-svelte/src/pages/index.astro b/packages/astro/e2e/fixtures/nested-in-svelte/src/pages/index.astro index 5648a25814..b1b8187d52 100644 --- a/packages/astro/e2e/fixtures/nested-in-svelte/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/nested-in-svelte/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.tsx'; +import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/nested-in-vue/src/pages/index.astro b/packages/astro/e2e/fixtures/nested-in-vue/src/pages/index.astro index ea0a88f84d..f8e74ff786 100644 --- a/packages/astro/e2e/fixtures/nested-in-vue/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/nested-in-vue/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx'; import { PreactCounter } from '../components/preact/PreactCounter.tsx'; +import { Counter as ReactCounter } from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; // Full Astro Component Syntax: // https://docs.astro.build/basics/astro-components/ diff --git a/packages/astro/e2e/fixtures/nested-recursive/src/pages/index.astro b/packages/astro/e2e/fixtures/nested-recursive/src/pages/index.astro index a17337c897..4b180602db 100644 --- a/packages/astro/e2e/fixtures/nested-recursive/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/nested-recursive/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import ReactCounter from '../components/react/ReactCounter.jsx'; import PreactCounter from '../components/preact/PreactCounter.tsx'; +import ReactCounter from '../components/react/ReactCounter.jsx'; import SolidCounter from '../components/solid/SolidCounter.tsx'; -import VueCounter from '../components/vue/VueCounter.vue'; import SvelteCounter from '../components/svelte/SvelteCounter.svelte'; +import VueCounter from '../components/vue/VueCounter.vue'; --- diff --git a/packages/astro/e2e/fixtures/pass-js/src/pages/index.astro b/packages/astro/e2e/fixtures/pass-js/src/pages/index.astro index 181f2bfba3..24794367f3 100644 --- a/packages/astro/e2e/fixtures/pass-js/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/pass-js/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import type { BigNestedObject } from '../types'; import Component from '../components/React'; +import type { BigNestedObject } from '../types'; const object: BigNestedObject = { nested: { diff --git a/packages/astro/e2e/fixtures/solid-recurse/src/pages/index.astro b/packages/astro/e2e/fixtures/solid-recurse/src/pages/index.astro index 7aeca1aef2..b67eb81ced 100644 --- a/packages/astro/e2e/fixtures/solid-recurse/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/solid-recurse/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import WrapperB from "../components/WrapperB.jsx"; import WrapperA from "../components/WrapperA.jsx"; +import WrapperB from "../components/WrapperB.jsx"; --- diff --git a/packages/astro/e2e/fixtures/tailwindcss/src/pages/index.astro b/packages/astro/e2e/fixtures/tailwindcss/src/pages/index.astro index 948fa51df0..65bff4d4a3 100644 --- a/packages/astro/e2e/fixtures/tailwindcss/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/tailwindcss/src/pages/index.astro @@ -1,8 +1,8 @@ --- -// Component Imports -import Layout from '../components/Layout.astro'; import Button from '../components/Button.astro'; import Complex from '../components/Complex.astro'; +// Component Imports +import Layout from '../components/Layout.astro'; --- diff --git a/packages/astro/e2e/fixtures/view-transitions/src/components/ClickToNavigate.jsx b/packages/astro/e2e/fixtures/view-transitions/src/components/ClickToNavigate.jsx index db8cc25f3a..2d14d42a69 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/components/ClickToNavigate.jsx +++ b/packages/astro/e2e/fixtures/view-transitions/src/components/ClickToNavigate.jsx @@ -1,5 +1,5 @@ -import React from 'react'; import { navigate } from "astro:transitions/client"; +import React from 'react'; export default function ClickToNavigate({ to, id }) { return ; } diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-load.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-load.astro index f24d216be9..0eaff1165c 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-load.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-load.astro @@ -1,6 +1,6 @@ --- -import ClickToNavigate from "../components/ClickToNavigate.jsx" import { ViewTransitions } from "astro:transitions"; +import ClickToNavigate from "../components/ClickToNavigate.jsx" --- diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-four.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-four.astro index 9ebfa65f04..569a24b1a4 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-four.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-four.astro @@ -1,8 +1,8 @@ --- -import Layout from '../components/Layout.astro'; import Island from '../components/Island'; -import VueCounter from '../components/VueCounter.vue'; +import Layout from '../components/Layout.astro'; import SvelteCounter from '../components/SvelteCounter.svelte'; +import VueCounter from '../components/VueCounter.vue'; ---

Page 4

diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-one.astro index a51ccc299b..1a9b731bf6 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-one.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-one.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import Island from '../components/Island'; +import Layout from '../components/Layout.astro'; --- go to page 2 diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-three.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-three.astro index 34fa699269..83fcd4e182 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-three.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-three.astro @@ -1,8 +1,8 @@ --- -import Layout from '../components/Layout.astro'; import Island from '../components/Island'; -import VueCounter from '../components/VueCounter.vue'; +import Layout from '../components/Layout.astro'; import SvelteCounter from '../components/SvelteCounter.svelte'; +import VueCounter from '../components/VueCounter.vue'; --- go to page 4 diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-two.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-two.astro index 4190d86efb..2175ffd0b1 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-two.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/client-only-two.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import Island from '../components/Island'; +import Layout from '../components/Layout.astro'; ---

Page 2

diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-one.astro index e887fe6a5e..bd59d22cfd 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-one.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-one.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import InlineScript from '../components/InlineScript.astro'; +import Layout from '../components/Layout.astro'; --- diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-two.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-two.astro index 430ad94651..2becd8d1cc 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-two.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/inline-script-two.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import InlineScript from '../components/InlineScript.astro'; +import Layout from '../components/Layout.astro'; --- diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/island-one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/island-one.astro index 883d567a11..533ac40889 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/island-one.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/island-one.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import Island from '../components/Island.jsx'; +import Layout from '../components/Layout.astro'; export const prerender = false; const persistProps = Astro.url.searchParams.has('persist'); diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/island-two.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/island-two.astro index 37912591cb..c76ee14521 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/island-two.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/island-two.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import Island from '../components/Island.jsx'; +import Layout from '../components/Layout.astro'; ---

Page 2

diff --git a/packages/astro/e2e/fixtures/vue-component/src/pages/index.astro b/packages/astro/e2e/fixtures/vue-component/src/pages/index.astro index fb10e60382..fd2e8f9b54 100644 --- a/packages/astro/e2e/fixtures/vue-component/src/pages/index.astro +++ b/packages/astro/e2e/fixtures/vue-component/src/pages/index.astro @@ -1,8 +1,8 @@ --- import Counter from '../components/Counter.vue'; -import VueComponent from '../components/VueComponent.vue'; -import AsyncTest from '../components/Test.vue' import State from '../components/State.vue' +import AsyncTest from '../components/Test.vue' +import VueComponent from '../components/VueComponent.vue'; const someProps = { count: 0, diff --git a/packages/astro/e2e/nested-recursive.test.js b/packages/astro/e2e/nested-recursive.test.js index 8271c65575..262cd67723 100644 --- a/packages/astro/e2e/nested-recursive.test.js +++ b/packages/astro/e2e/nested-recursive.test.js @@ -1,4 +1,4 @@ -import { expect, test as base } from '@playwright/test'; +import { test as base, expect } from '@playwright/test'; import { loadFixture, waitForHydrate } from './test-utils.js'; const test = base.extend({ diff --git a/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro b/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro index 3008f61197..fbe086bc27 100644 --- a/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro +++ b/packages/astro/performance/fixtures/mdoc/src/ContentRenderer.astro @@ -1,6 +1,6 @@ --- -import { Heading, Aside, LikeButton, HydratedLikeButton } from '@performance/utils'; import type { CollectionEntry } from 'astro:content'; +import { Aside, Heading, HydratedLikeButton, LikeButton } from '@performance/utils'; type Props = { entry: CollectionEntry<'generated'>; diff --git a/packages/astro/performance/fixtures/mdx/src/ContentRenderer.astro b/packages/astro/performance/fixtures/mdx/src/ContentRenderer.astro index 42c2da57a1..6c40fe40e6 100644 --- a/packages/astro/performance/fixtures/mdx/src/ContentRenderer.astro +++ b/packages/astro/performance/fixtures/mdx/src/ContentRenderer.astro @@ -1,6 +1,6 @@ --- -import Title from './Title.astro'; import type { CollectionEntry } from 'astro:content'; +import Title from './Title.astro'; type Props = { entry: CollectionEntry<'generated'>; diff --git a/packages/astro/src/assets/endpoint/generic.ts b/packages/astro/src/assets/endpoint/generic.ts index 3dd5140cf1..589f9f8b75 100644 --- a/packages/astro/src/assets/endpoint/generic.ts +++ b/packages/astro/src/assets/endpoint/generic.ts @@ -1,11 +1,11 @@ +// @ts-expect-error +import { imageConfig } from 'astro:assets'; import { isRemotePath } from '@astrojs/internal-helpers/path'; import mime from 'mime/lite.js'; import type { APIRoute } from '../../@types/astro.js'; import { getConfiguredImageService } from '../internal.js'; import { etag } from '../utils/etag.js'; import { isRemoteAllowed } from '../utils/remotePattern.js'; -// @ts-expect-error -import { imageConfig } from 'astro:assets'; async function loadRemoteImage(src: URL, headers: Headers) { try { diff --git a/packages/astro/src/assets/endpoint/node.ts b/packages/astro/src/assets/endpoint/node.ts index 4d29a7fadd..1d9ac9df64 100644 --- a/packages/astro/src/assets/endpoint/node.ts +++ b/packages/astro/src/assets/endpoint/node.ts @@ -2,6 +2,8 @@ import os from 'node:os'; import { isAbsolute } from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; +// @ts-expect-error +import { assetsDir, imageConfig, outDir } from 'astro:assets'; import { isRemotePath, removeQueryString } from '@astrojs/internal-helpers/path'; import { readFile } from 'fs/promises'; import mime from 'mime/lite.js'; @@ -9,8 +11,6 @@ import type { APIRoute } from '../../@types/astro.js'; import { getConfiguredImageService } from '../internal.js'; import { etag } from '../utils/etag.js'; import { isRemoteAllowed } from '../utils/remotePattern.js'; -// @ts-expect-error -import { assetsDir, imageConfig, outDir } from 'astro:assets'; function replaceFileSystemReferences(src: string) { return os.platform().includes('win32') ? src.replace(/^\/@fs\//, '') : src.replace(/^\/@fs/, ''); diff --git a/packages/astro/src/core/build/plugin.ts b/packages/astro/src/core/build/plugin.ts index 68474b0576..f16b5a1d94 100644 --- a/packages/astro/src/core/build/plugin.ts +++ b/packages/astro/src/core/build/plugin.ts @@ -1,4 +1,4 @@ -import type { Plugin as VitePlugin, Rollup } from 'vite'; +import type { Rollup, Plugin as VitePlugin } from 'vite'; import type { BuildInternals } from './internal.js'; import type { StaticBuildOptions, ViteBuildReturn } from './types.js'; diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts index 31cb2c9b53..e0dce339f7 100644 --- a/packages/astro/src/core/build/plugins/plugin-css.ts +++ b/packages/astro/src/core/build/plugins/plugin-css.ts @@ -1,5 +1,5 @@ import type { GetModuleInfo } from 'rollup'; -import type { BuildOptions, Plugin as VitePlugin, ResolvedConfig, Rollup } from 'vite'; +import type { BuildOptions, ResolvedConfig, Rollup, Plugin as VitePlugin } from 'vite'; import { isBuildableCSSRequest } from '../../../vite-plugin-astro-server/util.js'; import type { BuildInternals } from '../internal.js'; import type { AstroBuildPlugin, BuildTarget } from '../plugin.js'; diff --git a/packages/astro/src/core/build/plugins/util.ts b/packages/astro/src/core/build/plugins/util.ts index 0c9636b307..d1bd266cd4 100644 --- a/packages/astro/src/core/build/plugins/util.ts +++ b/packages/astro/src/core/build/plugins/util.ts @@ -1,5 +1,5 @@ import { extname } from 'node:path'; -import type { BuildOptions, Plugin as VitePlugin, Rollup } from 'vite'; +import type { BuildOptions, Rollup, Plugin as VitePlugin } from 'vite'; // eslint-disable-next-line @typescript-eslint/ban-types type OutputOptionsHook = Extract; diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts index d9b91a9ce2..303846f760 100644 --- a/packages/astro/src/core/config/schema.ts +++ b/packages/astro/src/core/config/schema.ts @@ -1,8 +1,8 @@ import type { + ShikiConfig, RehypePlugin as _RehypePlugin, RemarkPlugin as _RemarkPlugin, RemarkRehype as _RemarkRehype, - ShikiConfig, } from '@astrojs/markdown-remark'; import { markdownConfigDefaults } from '@astrojs/markdown-remark'; import { type BuiltinTheme, bundledThemes } from 'shiki'; diff --git a/packages/astro/src/core/logger/vite.ts b/packages/astro/src/core/logger/vite.ts index 9ddfd92eb3..317a037826 100644 --- a/packages/astro/src/core/logger/vite.ts +++ b/packages/astro/src/core/logger/vite.ts @@ -1,6 +1,6 @@ import { fileURLToPath } from 'url'; import stripAnsi from 'strip-ansi'; -import type { LogLevel, Logger as ViteLogger, Rollup } from 'vite'; +import type { LogLevel, Rollup, Logger as ViteLogger } from 'vite'; import { isAstroError } from '../errors/errors.js'; import { serverShortcuts as formatServerShortcuts } from '../messages.js'; import { type Logger as AstroLogger, isLogLevelEnabled } from './core.js'; diff --git a/packages/astro/src/runtime/client/dev-toolbar/entrypoint.ts b/packages/astro/src/runtime/client/dev-toolbar/entrypoint.ts index 5a9f3536c1..49eac68fdb 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/entrypoint.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/entrypoint.ts @@ -1,8 +1,8 @@ +// @ts-expect-error +import { loadDevToolbarApps } from 'astro:dev-toolbar'; import type { DevToolbarApp as DevToolbarAppDefinition } from '../../../@types/astro.js'; import { settings } from './settings.js'; import type { AstroDevToolbar, DevToolbarApp } from './toolbar.js'; -// @ts-expect-error -import { loadDevToolbarApps } from 'astro:dev-toolbar'; let overlay: AstroDevToolbar; diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index bc9dbd5aa4..2f4e256b76 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -3,9 +3,9 @@ import type * as vite from 'vite'; import type { AstroConfig, AstroSettings } from '../@types/astro.js'; import type { Logger } from '../core/logger/core.js'; import type { - CompileMetadata, PluginCssMetadata as AstroPluginCssMetadata, PluginMetadata as AstroPluginMetadata, + CompileMetadata, } from './types.js'; import { normalizePath } from 'vite'; diff --git a/packages/astro/src/vite-plugin-config-alias/index.ts b/packages/astro/src/vite-plugin-config-alias/index.ts index 7a7949e516..a5f4ae53cf 100644 --- a/packages/astro/src/vite-plugin-config-alias/index.ts +++ b/packages/astro/src/vite-plugin-config-alias/index.ts @@ -1,6 +1,6 @@ import path from 'node:path'; import type { CompilerOptions } from 'typescript'; -import { type Plugin as VitePlugin, type ResolvedConfig, normalizePath } from 'vite'; +import { type ResolvedConfig, type Plugin as VitePlugin, normalizePath } from 'vite'; import type { AstroSettings } from '../@types/astro.js'; type Alias = { diff --git a/packages/astro/test/fixtures/0-css/src/pages/index.astro b/packages/astro/test/fixtures/0-css/src/pages/index.astro index c11fe1166e..c21f980253 100644 --- a/packages/astro/test/fixtures/0-css/src/pages/index.astro +++ b/packages/astro/test/fixtures/0-css/src/pages/index.astro @@ -5,13 +5,16 @@ import AstroComponent from '../components/Astro.astro'; import AstroComponentNone from '../components/AstroNone.astro'; import AstroSass from '../components/AstroSass.astro'; import AstroScss from '../components/AstroScss.astro'; +import ModuleOrdering from '../components/ModuleOrdering.jsx'; import ReactCSS from '../components/ReactCSS.jsx'; +import ReactDynamic from '../components/ReactDynamic.jsx'; import ReactModules from '../components/ReactModules.jsx'; import ReactModulesSass from '../components/ReactModulesSass.jsx'; import ReactModulesScss from '../components/ReactModulesScss.jsx'; import ReactSass from '../components/ReactSass.jsx'; import ReactScss from '../components/ReactScss.jsx'; import SvelteCSS from '../components/SvelteCSS.svelte'; +import SvelteDynamic from '../components/SvelteDynamic.svelte'; import SvelteSass from '../components/SvelteSass.svelte'; import SvelteScss from '../components/SvelteScss.svelte'; import VueCSS from '../components/VueCSS.vue'; @@ -19,9 +22,6 @@ import VueModules from '../components/VueModules.vue'; import VueSass from '../components/VueSass.vue'; import VueScoped from '../components/VueScoped.vue'; import VueScss from '../components/VueScss.vue'; -import ReactDynamic from '../components/ReactDynamic.jsx'; -import SvelteDynamic from '../components/SvelteDynamic.svelte'; -import ModuleOrdering from '../components/ModuleOrdering.jsx'; import '../styles/imported-url.css'; import '../styles/imported.sass'; diff --git a/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/src/pages/index.astro b/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/src/pages/index.astro index e200a95677..a654eeb12e 100644 --- a/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/src/pages/index.astro +++ b/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/src/pages/index.astro @@ -1,10 +1,10 @@ --- +import Alias from 'components/Alias.svelte'; import Client from 'components/Client.svelte' import Foo from 'components/Foo.astro'; import StyleComp from 'components/Style.astro'; -import Alias from 'components/Alias.svelte'; -import { foo, index } from 'utils/constants'; import 'styles/main.css'; +import { foo, index } from 'utils/constants'; --- diff --git a/packages/astro/test/fixtures/alias-tsconfig/src/pages/index.astro b/packages/astro/test/fixtures/alias-tsconfig/src/pages/index.astro index 25faad0ea7..e880d48440 100644 --- a/packages/astro/test/fixtures/alias-tsconfig/src/pages/index.astro +++ b/packages/astro/test/fixtures/alias-tsconfig/src/pages/index.astro @@ -1,11 +1,11 @@ --- +import Alias from '@components/Alias.svelte'; import Client from '@components/Client.svelte' +import '@styles/main.css'; +import { namespace } from '@test/namespace-package' import Foo from 'src/components/Foo.astro'; import StyleComp from 'src/components/Style.astro'; -import Alias from '@components/Alias.svelte'; -import { namespace } from '@test/namespace-package' import { foo, index } from 'src/utils/constants'; -import '@styles/main.css'; const globResult = Object.keys(import.meta.glob('@components/glob/*.js')).join(', ') --- diff --git a/packages/astro/test/fixtures/astro-check-errors/src/pages/index.astro b/packages/astro/test/fixtures/astro-check-errors/src/pages/index.astro index c161df438c..4521e6f25b 100644 --- a/packages/astro/test/fixtures/astro-check-errors/src/pages/index.astro +++ b/packages/astro/test/fixtures/astro-check-errors/src/pages/index.astro @@ -1,5 +1,5 @@ --- - console.log(doesntExist) +console.log(doesntExist) --- diff --git a/packages/astro/test/fixtures/astro-children/src/pages/markup.astro b/packages/astro/test/fixtures/astro-children/src/pages/markup.astro index b771c24335..2cc198bb0d 100644 --- a/packages/astro/test/fixtures/astro-children/src/pages/markup.astro +++ b/packages/astro/test/fixtures/astro-children/src/pages/markup.astro @@ -1,7 +1,7 @@ --- import PreactComponent from '../components/Component.jsx'; -import VueComponent from '../components/Component.vue'; import SvelteComponent from '../components/Component.svelte'; +import VueComponent from '../components/Component.vue'; --- Children diff --git a/packages/astro/test/fixtures/astro-children/src/pages/multiple.astro b/packages/astro/test/fixtures/astro-children/src/pages/multiple.astro index 8c2f73a91e..41061c0b99 100644 --- a/packages/astro/test/fixtures/astro-children/src/pages/multiple.astro +++ b/packages/astro/test/fixtures/astro-children/src/pages/multiple.astro @@ -1,7 +1,7 @@ --- import PreactComponent from '../components/Component.jsx'; -import VueComponent from '../components/Component.vue'; import SvelteComponent from '../components/Component.svelte'; +import VueComponent from '../components/Component.vue'; --- Children diff --git a/packages/astro/test/fixtures/astro-children/src/pages/strings.astro b/packages/astro/test/fixtures/astro-children/src/pages/strings.astro index 10b1a887fc..f67f29c64b 100644 --- a/packages/astro/test/fixtures/astro-children/src/pages/strings.astro +++ b/packages/astro/test/fixtures/astro-children/src/pages/strings.astro @@ -1,7 +1,7 @@ --- import PreactComponent from '../components/Component.jsx'; -import VueComponent from '../components/Component.vue'; import SvelteComponent from '../components/Component.svelte'; +import VueComponent from '../components/Component.vue'; --- Children diff --git a/packages/astro/test/fixtures/astro-client-only/src/pages/index.astro b/packages/astro/test/fixtures/astro-client-only/src/pages/index.astro index bf239197f1..7a7d59b79f 100644 --- a/packages/astro/test/fixtures/astro-client-only/src/pages/index.astro +++ b/packages/astro/test/fixtures/astro-client-only/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import PersistentCounter from '../components/PersistentCounter.svelte'; import ReactComponent from '../components/JSXComponent.jsx'; +import PersistentCounter from '../components/PersistentCounter.svelte'; --- Client only pages diff --git a/packages/astro/test/fixtures/astro-jsx/src/pages/index.astro b/packages/astro/test/fixtures/astro-jsx/src/pages/index.astro index ccfb2b5a06..b4d0785670 100644 --- a/packages/astro/test/fixtures/astro-jsx/src/pages/index.astro +++ b/packages/astro/test/fixtures/astro-jsx/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import ReactCounter from '../components/ReactCounter.jsx'; import PreactCounter from '../components/PreactCounter.tsx'; +import ReactCounter from '../components/ReactCounter.jsx'; import SolidCounter from '../components/SolidCounter.jsx'; --- diff --git a/packages/astro/test/fixtures/astro-partial-html/src/pages/head.astro b/packages/astro/test/fixtures/astro-partial-html/src/pages/head.astro index 635b09699a..608394142a 100644 --- a/packages/astro/test/fixtures/astro-partial-html/src/pages/head.astro +++ b/packages/astro/test/fixtures/astro-partial-html/src/pages/head.astro @@ -1,6 +1,6 @@ --- -import Head from '../components/Head.astro'; import Component from '../components/Component.jsx'; +import Head from '../components/Head.astro'; --- diff --git a/packages/astro/test/fixtures/astro-partial-html/src/pages/jsx.astro b/packages/astro/test/fixtures/astro-partial-html/src/pages/jsx.astro index b5a34f4ced..09c0e8eb52 100644 --- a/packages/astro/test/fixtures/astro-partial-html/src/pages/jsx.astro +++ b/packages/astro/test/fixtures/astro-partial-html/src/pages/jsx.astro @@ -1,6 +1,6 @@ --- -import Layout from '../components/Layout.astro'; import Component from '../components/Component.jsx'; +import Layout from '../components/Layout.astro'; // note: this test requires to be the very first element --- diff --git a/packages/astro/test/fixtures/astro-slots-nested/src/pages/hidden-nested.astro b/packages/astro/test/fixtures/astro-slots-nested/src/pages/hidden-nested.astro index dcb3ebcba5..d3f0417562 100644 --- a/packages/astro/test/fixtures/astro-slots-nested/src/pages/hidden-nested.astro +++ b/packages/astro/test/fixtures/astro-slots-nested/src/pages/hidden-nested.astro @@ -1,6 +1,6 @@ --- -import Parent from '../components/react/Parent' import Inner from '../components/react/Inner' +import Parent from '../components/react/Parent' --- diff --git a/packages/astro/test/fixtures/astro-slots-nested/src/pages/server-component-nested.astro b/packages/astro/test/fixtures/astro-slots-nested/src/pages/server-component-nested.astro index ec4ae3158b..8c256864fd 100644 --- a/packages/astro/test/fixtures/astro-slots-nested/src/pages/server-component-nested.astro +++ b/packages/astro/test/fixtures/astro-slots-nested/src/pages/server-component-nested.astro @@ -1,9 +1,9 @@ --- -import PassesChildren from '../components/react/PassesChildren.jsx'; -import PassesChildrenP from '../components/preact/PassesChildrenP.jsx'; -import PassesChildrenS from '../components/solid/PassesChildrenS.jsx'; import PassesChildrenSv from '../components/PassesChildrenSv.svelte'; import PassesChildrenV from '../components/PassesChildrenV.vue'; +import PassesChildrenP from '../components/preact/PassesChildrenP.jsx'; +import PassesChildren from '../components/react/PassesChildren.jsx'; +import PassesChildrenS from '../components/solid/PassesChildrenS.jsx'; --- diff --git a/packages/astro/test/fixtures/astro-slots/src/pages/slottedapi-render.astro b/packages/astro/test/fixtures/astro-slots/src/pages/slottedapi-render.astro index 8cd31fdd3b..f383d9e89a 100644 --- a/packages/astro/test/fixtures/astro-slots/src/pages/slottedapi-render.astro +++ b/packages/astro/test/fixtures/astro-slots/src/pages/slottedapi-render.astro @@ -1,7 +1,7 @@ --- import Render from '../components/Render.astro'; -import RenderFn from '../components/RenderFn.astro'; import RenderArgs from '../components/RenderArgs.astro'; +import RenderFn from '../components/RenderFn.astro'; --- diff --git a/packages/astro/test/fixtures/content-collection-references/src/pages/welcome.astro b/packages/astro/test/fixtures/content-collection-references/src/pages/welcome.astro index 3645d37bb5..e372f5a64a 100644 --- a/packages/astro/test/fixtures/content-collection-references/src/pages/welcome.astro +++ b/packages/astro/test/fixtures/content-collection-references/src/pages/welcome.astro @@ -1,6 +1,6 @@ --- import { Image } from 'astro:assets'; -import { getEntry, getEntries } from 'astro:content'; +import { getEntries, getEntry } from 'astro:content'; const welcomePost = await getEntry('blog', 'welcome'); diff --git a/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js b/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js index 638bbea4dc..b7b7d84725 100644 --- a/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js +++ b/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js @@ -1,6 +1,6 @@ +import { getCollection } from 'astro:content'; import * as devalue from 'devalue'; import { stripAllRenderFn } from '../utils.js'; -import { getCollection } from 'astro:content'; export async function GET() { const withoutConfig = stripAllRenderFn(await getCollection('without-config')); diff --git a/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js b/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js index e0f123076c..a05a9138b1 100644 --- a/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js +++ b/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js @@ -1,6 +1,6 @@ +import { getEntryBySlug } from 'astro:content'; import * as devalue from 'devalue'; import { stripRenderFn } from '../utils.js'; -import { getEntryBySlug } from 'astro:content'; export async function GET() { const columbiaWithoutConfig = stripRenderFn(await getEntryBySlug('without-config', 'columbia')); diff --git a/packages/astro/test/fixtures/core-image-deletion/src/pages/blog/[slug].astro b/packages/astro/test/fixtures/core-image-deletion/src/pages/blog/[slug].astro index 418d449bb6..63b6eb70e5 100644 --- a/packages/astro/test/fixtures/core-image-deletion/src/pages/blog/[slug].astro +++ b/packages/astro/test/fixtures/core-image-deletion/src/pages/blog/[slug].astro @@ -1,6 +1,6 @@ --- -import type { GetStaticPaths } from "astro"; import { getCollection } from "astro:content"; +import type { GetStaticPaths } from "astro"; export const getStaticPaths = (async () => { const blog = await getCollection("blog"); diff --git a/packages/astro/test/fixtures/core-image/src/pages/blog/[...slug].astro b/packages/astro/test/fixtures/core-image/src/pages/blog/[...slug].astro index 33f96a70da..dcf329ec42 100644 --- a/packages/astro/test/fixtures/core-image/src/pages/blog/[...slug].astro +++ b/packages/astro/test/fixtures/core-image/src/pages/blog/[...slug].astro @@ -1,5 +1,5 @@ --- -import { getImage,Image } from 'astro:assets'; +import { Image, getImage} from 'astro:assets'; import { getCollection } from 'astro:content'; export async function getStaticPaths() { diff --git a/packages/astro/test/fixtures/css-import-as-inline/src/pages/index.astro b/packages/astro/test/fixtures/css-import-as-inline/src/pages/index.astro index 89a7288ae1..90838f002b 100644 --- a/packages/astro/test/fixtures/css-import-as-inline/src/pages/index.astro +++ b/packages/astro/test/fixtures/css-import-as-inline/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Layout from '../layouts/Layout.astro'; import inline from '../inline.css?inline'; +import Layout from '../layouts/Layout.astro'; import raw from '../raw.css?raw'; --- diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/src/pages/index.astro b/packages/astro/test/fixtures/css-inline-stylesheets/src/pages/index.astro index bfdbeb5f8e..2aecfb0f2e 100644 --- a/packages/astro/test/fixtures/css-inline-stylesheets/src/pages/index.astro +++ b/packages/astro/test/fixtures/css-inline-stylesheets/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Button from '../components/Button.astro'; import { getEntryBySlug } from 'astro:content'; +import Button from '../components/Button.astro'; const entry = await getEntryBySlug('en', 'endeavour'); const { Content } = await entry.render(); diff --git a/packages/astro/test/fixtures/css-order-import/src/pages/component.astro b/packages/astro/test/fixtures/css-order-import/src/pages/component.astro index 1b779d18db..3d5f263399 100644 --- a/packages/astro/test/fixtures/css-order-import/src/pages/component.astro +++ b/packages/astro/test/fixtures/css-order-import/src/pages/component.astro @@ -1,7 +1,7 @@ --- +import Client2 from '../components/Client2.jsx'; import One from '../components/One.astro'; import Two from '../components/Two.astro'; -import Client2 from '../components/Client2.jsx'; --- diff --git a/packages/astro/test/fixtures/css-order-import/src/pages/dedupe.astro b/packages/astro/test/fixtures/css-order-import/src/pages/dedupe.astro index ea3a016706..bbd26ad6b2 100644 --- a/packages/astro/test/fixtures/css-order-import/src/pages/dedupe.astro +++ b/packages/astro/test/fixtures/css-order-import/src/pages/dedupe.astro @@ -1,6 +1,6 @@ --- -import '../styles/AstroJsx.css'; import Dedupe from '../components/Dedupe.jsx'; +import '../styles/AstroJsx.css'; --- diff --git a/packages/astro/test/fixtures/css-order-import/src/pages/index.astro b/packages/astro/test/fixtures/css-order-import/src/pages/index.astro index 0a6baab594..6cc9ac708e 100644 --- a/packages/astro/test/fixtures/css-order-import/src/pages/index.astro +++ b/packages/astro/test/fixtures/css-order-import/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import '../styles/base.css'; import Client1 from '../components/Client1.jsx'; +import '../styles/base.css'; --- diff --git a/packages/astro/test/fixtures/css-order-layout/src/layouts/Main.astro b/packages/astro/test/fixtures/css-order-layout/src/layouts/Main.astro index 49f378bc64..225b8c1030 100644 --- a/packages/astro/test/fixtures/css-order-layout/src/layouts/Main.astro +++ b/packages/astro/test/fixtures/css-order-layout/src/layouts/Main.astro @@ -1,6 +1,6 @@ --- -import MainHead from "../components/MainHead.astro"; import BlueButton from "../components/BlueButton.astro"; +import MainHead from "../components/MainHead.astro"; --- diff --git a/packages/astro/test/fixtures/css-order-layout/src/layouts/Second.astro b/packages/astro/test/fixtures/css-order-layout/src/layouts/Second.astro index 49f378bc64..225b8c1030 100644 --- a/packages/astro/test/fixtures/css-order-layout/src/layouts/Second.astro +++ b/packages/astro/test/fixtures/css-order-layout/src/layouts/Second.astro @@ -1,6 +1,6 @@ --- -import MainHead from "../components/MainHead.astro"; import BlueButton from "../components/BlueButton.astro"; +import MainHead from "../components/MainHead.astro"; --- diff --git a/packages/astro/test/fixtures/fetch/src/pages/index.astro b/packages/astro/test/fixtures/fetch/src/pages/index.astro index 06a5bd2b3a..944873d0c5 100644 --- a/packages/astro/test/fixtures/fetch/src/pages/index.astro +++ b/packages/astro/test/fixtures/fetch/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Test from '../components/AstroComponent.astro'; import AlreadyImported from '../components/AlreadyImported.astro'; +import Test from '../components/AstroComponent.astro'; import CustomDeclaration from '../components/CustomDeclaration.astro'; import JsxComponent from '../components/JsxComponent.jsx'; import SvelteComponent from '../components/SvelteComponent.svelte'; diff --git a/packages/astro/test/fixtures/fontsource-package/src/pages/index.astro b/packages/astro/test/fixtures/fontsource-package/src/pages/index.astro index 454d7dfbaf..c6aba4c401 100644 --- a/packages/astro/test/fixtures/fontsource-package/src/pages/index.astro +++ b/packages/astro/test/fixtures/fontsource-package/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import "@fontsource/montserrat"; import "@fontsource/monofett"; +import "@fontsource/montserrat"; --- diff --git a/packages/astro/test/fixtures/head-injection/src/pages/with-slot-in-slot.astro b/packages/astro/test/fixtures/head-injection/src/pages/with-slot-in-slot.astro index 85b228c436..1bd33e5778 100644 --- a/packages/astro/test/fixtures/head-injection/src/pages/with-slot-in-slot.astro +++ b/packages/astro/test/fixtures/head-injection/src/pages/with-slot-in-slot.astro @@ -1,6 +1,6 @@ --- -import Layout from "../components/SlotRenderLayout.astro"; import RegularSlot from "../components/RegularSlot.astro" +import Layout from "../components/SlotRenderLayout.astro"; --- diff --git a/packages/astro/test/fixtures/head-injection/src/pages/with-slot-render.astro b/packages/astro/test/fixtures/head-injection/src/pages/with-slot-render.astro index 337b4a95cf..b9cbfae961 100644 --- a/packages/astro/test/fixtures/head-injection/src/pages/with-slot-render.astro +++ b/packages/astro/test/fixtures/head-injection/src/pages/with-slot-render.astro @@ -1,6 +1,6 @@ --- -import Layout from "../components/SlotRenderLayout.astro"; import Component from "../components/SlotRenderComponent.astro" +import Layout from "../components/SlotRenderLayout.astro"; --- diff --git a/packages/astro/test/fixtures/html-slots/src/pages/index.astro b/packages/astro/test/fixtures/html-slots/src/pages/index.astro index aa4a3bd258..6ccfffe417 100644 --- a/packages/astro/test/fixtures/html-slots/src/pages/index.astro +++ b/packages/astro/test/fixtures/html-slots/src/pages/index.astro @@ -1,7 +1,7 @@ --- import Default from '../components/Default.html'; -import Named from '../components/Named.html'; import Inline from '../components/Inline.html'; +import Named from '../components/Named.html'; --- Default diff --git a/packages/astro/test/fixtures/hydration-race/src/components/Wrapper.astro b/packages/astro/test/fixtures/hydration-race/src/components/Wrapper.astro index c751b2f77f..d3e1e31e8f 100644 --- a/packages/astro/test/fixtures/hydration-race/src/components/Wrapper.astro +++ b/packages/astro/test/fixtures/hydration-race/src/components/Wrapper.astro @@ -1,6 +1,6 @@ --- -import One from './One.jsx'; import Deeper from './Deeper.astro'; +import One from './One.jsx'; ---
diff --git a/packages/astro/test/fixtures/hydration-race/src/pages/index.astro b/packages/astro/test/fixtures/hydration-race/src/pages/index.astro index d5272cc756..6b196b36d0 100644 --- a/packages/astro/test/fixtures/hydration-race/src/pages/index.astro +++ b/packages/astro/test/fixtures/hydration-race/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Wrapper from '../components/Wrapper.astro'; import One from '../components/One.jsx'; +import Wrapper from '../components/Wrapper.astro'; --- diff --git a/packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/index.astro b/packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/index.astro index d138455a3e..c6186a7b76 100644 --- a/packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/index.astro +++ b/packages/astro/test/fixtures/i18n-routing-subdomain/src/pages/index.astro @@ -1,5 +1,5 @@ --- -import { getRelativeLocaleUrl, getAbsoluteLocaleUrl, getPathByLocale, getLocaleByPath } from "astro:i18n"; +import { getAbsoluteLocaleUrl, getLocaleByPath, getPathByLocale, getRelativeLocaleUrl } from "astro:i18n"; let absoluteLocaleUrl_pt = getAbsoluteLocaleUrl("pt", "about"); let absoluteLocaleUrl_it = getAbsoluteLocaleUrl("it"); diff --git a/packages/astro/test/fixtures/i18n-routing/src/pages/virtual-module.astro b/packages/astro/test/fixtures/i18n-routing/src/pages/virtual-module.astro index f65356e8fa..4ec7e5ae57 100644 --- a/packages/astro/test/fixtures/i18n-routing/src/pages/virtual-module.astro +++ b/packages/astro/test/fixtures/i18n-routing/src/pages/virtual-module.astro @@ -1,5 +1,5 @@ --- -import { getRelativeLocaleUrl, getAbsoluteLocaleUrl, getPathByLocale, getLocaleByPath } from "astro:i18n"; +import { getAbsoluteLocaleUrl, getLocaleByPath, getPathByLocale, getRelativeLocaleUrl } from "astro:i18n"; let about = getRelativeLocaleUrl("pt", "about"); let spanish = getRelativeLocaleUrl("es", "about"); diff --git a/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro b/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro index cfd28a3d4b..91c1b5ebab 100644 --- a/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro +++ b/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro @@ -1,10 +1,10 @@ --- -import FrameworkSolid from '../components/solid/SolidCounter.jsx' -import FrameworkPreact from '../components/preact/PreactCounter.jsx' -import FrameworkReact from '../components/react/ReactCounter.jsx' +import FrameworkMDX from '../components/Content.mdx' import FrameworkSvelte from '../components/SvelteCounter.svelte' import FrameworkVue from '../components/VueCounter.vue' -import FrameworkMDX from '../components/Content.mdx' +import FrameworkPreact from '../components/preact/PreactCounter.jsx' +import FrameworkReact from '../components/react/ReactCounter.jsx' +import FrameworkSolid from '../components/solid/SolidCounter.jsx' ---
diff --git a/packages/astro/test/fixtures/multiple-renderers/src/pages/index.astro b/packages/astro/test/fixtures/multiple-renderers/src/pages/index.astro index 1708d1cc9c..c5f4756c35 100644 --- a/packages/astro/test/fixtures/multiple-renderers/src/pages/index.astro +++ b/packages/astro/test/fixtures/multiple-renderers/src/pages/index.astro @@ -1,5 +1,5 @@ --- - function Component() { +function Component() { return `
works
`; } --- diff --git a/packages/astro/test/fixtures/preact-component/src/pages/fn.astro b/packages/astro/test/fixtures/preact-component/src/pages/fn.astro index ced75e3019..6d8f6f7ed7 100644 --- a/packages/astro/test/fixtures/preact-component/src/pages/fn.astro +++ b/packages/astro/test/fixtures/preact-component/src/pages/fn.astro @@ -1,6 +1,6 @@ --- -import FunctionComponent from '../components/Function.jsx'; import ArrowFunctionComponent from '../components/ArrowFunction.jsx'; +import FunctionComponent from '../components/Function.jsx'; --- diff --git a/packages/astro/test/fixtures/preact-component/src/pages/signals.astro b/packages/astro/test/fixtures/preact-component/src/pages/signals.astro index bfe4a10205..b68fde36d6 100644 --- a/packages/astro/test/fixtures/preact-component/src/pages/signals.astro +++ b/packages/astro/test/fixtures/preact-component/src/pages/signals.astro @@ -1,6 +1,6 @@ --- -import Signals from '../components/Signals'; import { signal } from '@preact/signals'; +import Signals from '../components/Signals'; const count = signal(1); --- diff --git a/packages/astro/test/fixtures/react-jsx-export/src/pages/index.astro b/packages/astro/test/fixtures/react-jsx-export/src/pages/index.astro index 945f965f56..0d774e80bb 100644 --- a/packages/astro/test/fixtures/react-jsx-export/src/pages/index.astro +++ b/packages/astro/test/fixtures/react-jsx-export/src/pages/index.astro @@ -1,6 +1,6 @@ --- +import {ConstDeclarationExport, FunctionDeclarationExport,LetDeclarationExport } from '../components/DeclarationExportTest' import ListAsDefaultExport, {ListExport, RenamedListExport, ListExportTestComponent} from '../components/ListExportTest' -import {ConstDeclarationExport, LetDeclarationExport, FunctionDeclarationExport} from '../components/DeclarationExportTest' import AnonymousArrowDefaultExport from '../components/defaultExport/AnonymousArrowDefaultExport' import AnonymousFunctionDefaultExport from '../components/defaultExport/AnonymousFunctionDefaultExport' import HocDefaultExport from '../components/defaultExport/HocDefaultExport' diff --git a/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/[...catchall].astro b/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/[...catchall].astro index 622638e700..f212b6e53e 100644 --- a/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/[...catchall].astro +++ b/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/[...catchall].astro @@ -1,5 +1,5 @@ --- - export async function getStaticPaths() { +export async function getStaticPaths() { return [ { params: { lang: 'de', catchall: '1/2' } }, { params: { lang: 'en', catchall: '1/2' } } diff --git a/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/index.astro b/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/index.astro index a0bf178818..4af288f0bf 100644 --- a/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/index.astro +++ b/packages/astro/test/fixtures/routing-priority/src/pages/[lang]/index.astro @@ -1,5 +1,5 @@ --- - export async function getStaticPaths() { +export async function getStaticPaths() { return [ { params: { lang: 'de' } }, // always shadowed by /de/index.astro { params: { lang: 'en' } } diff --git a/packages/astro/test/fixtures/routing-priority/src/pages/[page].astro b/packages/astro/test/fixtures/routing-priority/src/pages/[page].astro index 7543bce3a4..74f5d463f2 100644 --- a/packages/astro/test/fixtures/routing-priority/src/pages/[page].astro +++ b/packages/astro/test/fixtures/routing-priority/src/pages/[page].astro @@ -1,5 +1,5 @@ --- - export async function getStaticPaths() { +export async function getStaticPaths() { return [ { params: { page: "page-1" } diff --git a/packages/astro/test/fixtures/routing-priority/src/pages/[slug].astro b/packages/astro/test/fixtures/routing-priority/src/pages/[slug].astro index 4099428441..55e8161bb4 100644 --- a/packages/astro/test/fixtures/routing-priority/src/pages/[slug].astro +++ b/packages/astro/test/fixtures/routing-priority/src/pages/[slug].astro @@ -1,5 +1,5 @@ --- - export async function getStaticPaths() { +export async function getStaticPaths() { return [ { params: { slug: "slug-1" }, diff --git a/packages/astro/test/fixtures/routing-priority/src/pages/posts/[...slug].astro b/packages/astro/test/fixtures/routing-priority/src/pages/posts/[...slug].astro index 839a46f9bd..a3a57b006a 100644 --- a/packages/astro/test/fixtures/routing-priority/src/pages/posts/[...slug].astro +++ b/packages/astro/test/fixtures/routing-priority/src/pages/posts/[...slug].astro @@ -1,5 +1,5 @@ --- - export async function getStaticPaths() { +export async function getStaticPaths() { return [ { params: { slug: "1/2" }, diff --git a/packages/astro/test/fixtures/routing-priority/src/pages/posts/[pid].astro b/packages/astro/test/fixtures/routing-priority/src/pages/posts/[pid].astro index 47b332a321..a9245b5ba1 100644 --- a/packages/astro/test/fixtures/routing-priority/src/pages/posts/[pid].astro +++ b/packages/astro/test/fixtures/routing-priority/src/pages/posts/[pid].astro @@ -1,5 +1,5 @@ --- - export async function getStaticPaths() { +export async function getStaticPaths() { return [ { params: { pid: 'post-1' } }, { params: { pid: 'post-2' } } diff --git a/packages/astro/test/fixtures/solid-component/src/pages/index.astro b/packages/astro/test/fixtures/solid-component/src/pages/index.astro index 06a35b2879..e4931ded1e 100644 --- a/packages/astro/test/fixtures/solid-component/src/pages/index.astro +++ b/packages/astro/test/fixtures/solid-component/src/pages/index.astro @@ -1,9 +1,9 @@ --- -import Hello from '../components/Hello.jsx'; -import WithNewlines from '../components/WithNewlines.jsx'; import { Router } from "@solidjs/router"; -import ProxyComponent from '../components/ProxyComponent.jsx'; import { Counter as DepCounter } from '@test/solid-jsx-component'; +import Hello from '../components/Hello.jsx'; +import ProxyComponent from '../components/ProxyComponent.jsx'; +import WithNewlines from '../components/WithNewlines.jsx'; --- Solid diff --git a/packages/astro/test/fixtures/solid-component/src/pages/ssr-client-none.astro b/packages/astro/test/fixtures/solid-component/src/pages/ssr-client-none.astro index 60f0b429b5..bf968b5aca 100644 --- a/packages/astro/test/fixtures/solid-component/src/pages/ssr-client-none.astro +++ b/packages/astro/test/fixtures/solid-component/src/pages/ssr-client-none.astro @@ -1,6 +1,6 @@ --- -import { AsyncComponent } from '../components/async-components.jsx'; import { LazyCounter } from '../components/LazyCounter.jsx'; +import { AsyncComponent } from '../components/async-components.jsx'; --- diff --git a/packages/astro/test/fixtures/special-chars-in-component-imports/src/pages/index.astro b/packages/astro/test/fixtures/special-chars-in-component-imports/src/pages/index.astro index 9f44b97c5f..62d5e4afdf 100644 --- a/packages/astro/test/fixtures/special-chars-in-component-imports/src/pages/index.astro +++ b/packages/astro/test/fixtures/special-chars-in-component-imports/src/pages/index.astro @@ -1,11 +1,11 @@ --- import CaretCounter from '../components/^--with-carets/Counter'; import RocketCounter from '../components/and-rockets-🚀/Counter'; +import RoundBracketCounter from '../components/with-(round-brackets)/Counter'; +import SquareBracketCounter from '../components/with-[square-brackets]/Counter'; // Not supported in Vite // import PercentCounter from '../components/now-100%-better/Counter'; import SpaceCounter from '../components/with some spaces/Counter'; -import RoundBracketCounter from '../components/with-(round-brackets)/Counter'; -import SquareBracketCounter from '../components/with-[square-brackets]/Counter'; --- diff --git a/packages/astro/test/fixtures/static-build/src/pages/hoisted.astro b/packages/astro/test/fixtures/static-build/src/pages/hoisted.astro index 9677a6c52b..6d66d98967 100644 --- a/packages/astro/test/fixtures/static-build/src/pages/hoisted.astro +++ b/packages/astro/test/fixtures/static-build/src/pages/hoisted.astro @@ -1,6 +1,6 @@ --- -import InlineHoisted from '../components/InlineHoisted.astro'; import ExternalHoisted from '../components/ExternalHoisted.astro'; +import InlineHoisted from '../components/InlineHoisted.astro'; --- diff --git a/packages/astro/test/fixtures/static-build/src/pages/index.astro b/packages/astro/test/fixtures/static-build/src/pages/index.astro index 5bd2410ac4..054b82a01f 100644 --- a/packages/astro/test/fixtures/static-build/src/pages/index.astro +++ b/packages/astro/test/fixtures/static-build/src/pages/index.astro @@ -1,7 +1,7 @@ --- +import { test as ssrConfigTest } from '@test/static-build-pkg'; import MainHead from '../components/MainHead.astro'; import Nav from '../components/Nav/index.jsx'; -import { test as ssrConfigTest } from '@test/static-build-pkg'; let allPosts = await Astro.glob('./posts/*.md'); // Note that this just tests a warning diff --git a/packages/astro/test/fixtures/streaming/src/pages/index.astro b/packages/astro/test/fixtures/streaming/src/pages/index.astro index ef0e8eb49b..dd680eba76 100644 --- a/packages/astro/test/fixtures/streaming/src/pages/index.astro +++ b/packages/astro/test/fixtures/streaming/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Header from '../components/Header.astro'; import AsyncEach from '../components/AsyncEach.astro'; +import Header from '../components/Header.astro'; import { wait } from '../wait'; async function * list() { diff --git a/packages/create-astro/src/messages.ts b/packages/create-astro/src/messages.ts index 0109835c6a..eeeba5a504 100644 --- a/packages/create-astro/src/messages.ts +++ b/packages/create-astro/src/messages.ts @@ -1,6 +1,6 @@ import { exec } from 'node:child_process'; /* eslint no-console: 'off' */ -import { color, label, say as houston, spinner as load } from '@astrojs/cli-kit'; +import { color, say as houston, label, spinner as load } from '@astrojs/cli-kit'; import { align, sleep } from '@astrojs/cli-kit/utils'; import stripAnsi from 'strip-ansi'; import { shell } from './shell.js'; diff --git a/packages/db/test/fixtures/basics/db/config.ts b/packages/db/test/fixtures/basics/db/config.ts index d8c476db19..010ed3a186 100644 --- a/packages/db/test/fixtures/basics/db/config.ts +++ b/packages/db/test/fixtures/basics/db/config.ts @@ -1,5 +1,5 @@ -import { Themes } from './theme'; import { column, defineDb, defineTable } from 'astro:db'; +import { Themes } from './theme'; const Author = defineTable({ columns: { diff --git a/packages/db/test/fixtures/basics/db/seed.ts b/packages/db/test/fixtures/basics/db/seed.ts index ec5ab2e0c2..9a1ef4322e 100644 --- a/packages/db/test/fixtures/basics/db/seed.ts +++ b/packages/db/test/fixtures/basics/db/seed.ts @@ -1,6 +1,6 @@ +import { Author, Session, User, db } from 'astro:db'; import { asDrizzleTable } from '@astrojs/db/utils'; import { Themes as ThemesConfig } from './theme'; -import { Author, Session, User, db } from 'astro:db'; const Themes = asDrizzleTable('Themes', ThemesConfig); export default async function () { diff --git a/packages/db/test/fixtures/basics/src/pages/index.astro b/packages/db/test/fixtures/basics/src/pages/index.astro index 2d21f81103..2be0c4b238 100644 --- a/packages/db/test/fixtures/basics/src/pages/index.astro +++ b/packages/db/test/fixtures/basics/src/pages/index.astro @@ -1,6 +1,6 @@ --- /// -import { Author, db, Themes } from 'astro:db'; +import { Author, Themes, db } from 'astro:db'; const authors = await db.select().from(Author); const themes = await db.select().from(Themes); diff --git a/packages/db/test/fixtures/basics/src/pages/login.astro b/packages/db/test/fixtures/basics/src/pages/login.astro index 41b86ab149..4551fc4832 100644 --- a/packages/db/test/fixtures/basics/src/pages/login.astro +++ b/packages/db/test/fixtures/basics/src/pages/login.astro @@ -1,5 +1,5 @@ --- -import { db, Session, User, eq } from 'astro:db'; +import { Session, User, db, eq } from 'astro:db'; const users = await db.select().from(User); const sessions = await db.select().from(Session).innerJoin(User, eq(Session.userId, User.id)); diff --git a/packages/db/test/fixtures/basics/src/pages/run.json.ts b/packages/db/test/fixtures/basics/src/pages/run.json.ts index 82d5a6a7c5..a866193144 100644 --- a/packages/db/test/fixtures/basics/src/pages/run.json.ts +++ b/packages/db/test/fixtures/basics/src/pages/run.json.ts @@ -1,6 +1,6 @@ +import { db, sql } from 'astro:db'; /// import type { APIRoute } from 'astro'; -import { db, sql } from 'astro:db'; export const GET: APIRoute = async () => { const authors = await db.run(sql`SELECT * FROM Author`); diff --git a/packages/db/test/fixtures/db-in-src/db/seed.ts b/packages/db/test/fixtures/db-in-src/db/seed.ts index 7ff9f5f30d..a84e634549 100644 --- a/packages/db/test/fixtures/db-in-src/db/seed.ts +++ b/packages/db/test/fixtures/db-in-src/db/seed.ts @@ -1,5 +1,5 @@ -import { asDrizzleTable } from '@astrojs/db/utils'; import { User, db } from 'astro:db'; +import { asDrizzleTable } from '@astrojs/db/utils'; export default async function () { await db.batch([ diff --git a/packages/db/test/fixtures/db-in-src/pages/index.astro b/packages/db/test/fixtures/db-in-src/pages/index.astro index 90f6381150..4b79dba2c8 100644 --- a/packages/db/test/fixtures/db-in-src/pages/index.astro +++ b/packages/db/test/fixtures/db-in-src/pages/index.astro @@ -1,6 +1,6 @@ --- /// -import { db, User } from 'astro:db'; +import { User, db } from 'astro:db'; const users = await db.select().from(User); --- diff --git a/packages/db/test/fixtures/error-handling/src/pages/foreign-key-constraint.json.ts b/packages/db/test/fixtures/error-handling/src/pages/foreign-key-constraint.json.ts index 9aef159c9b..8e6bad8c36 100644 --- a/packages/db/test/fixtures/error-handling/src/pages/foreign-key-constraint.json.ts +++ b/packages/db/test/fixtures/error-handling/src/pages/foreign-key-constraint.json.ts @@ -1,5 +1,5 @@ -import type { APIRoute } from 'astro'; import { Ingredient, db, isDbError } from 'astro:db'; +import type { APIRoute } from 'astro'; export const GET: APIRoute = async () => { try { diff --git a/packages/db/test/fixtures/integration-only/integration/config.ts b/packages/db/test/fixtures/integration-only/integration/config.ts index d1f1aac263..71490be957 100644 --- a/packages/db/test/fixtures/integration-only/integration/config.ts +++ b/packages/db/test/fixtures/integration-only/integration/config.ts @@ -1,5 +1,5 @@ -import { menu } from './shared'; import { defineDb } from 'astro:db'; +import { menu } from './shared'; export default defineDb({ tables: { diff --git a/packages/db/test/fixtures/integration-only/integration/seed.ts b/packages/db/test/fixtures/integration-only/integration/seed.ts index d46b05e1c1..ed2b2e2ebf 100644 --- a/packages/db/test/fixtures/integration-only/integration/seed.ts +++ b/packages/db/test/fixtures/integration-only/integration/seed.ts @@ -1,6 +1,6 @@ +import { db } from 'astro:db'; import { asDrizzleTable } from '@astrojs/db/utils'; import { menu } from './shared'; -import { db } from 'astro:db'; export default async function () { const table = asDrizzleTable('menu', menu); diff --git a/packages/db/test/fixtures/integrations/integration/config.ts b/packages/db/test/fixtures/integrations/integration/config.ts index d1f1aac263..71490be957 100644 --- a/packages/db/test/fixtures/integrations/integration/config.ts +++ b/packages/db/test/fixtures/integrations/integration/config.ts @@ -1,5 +1,5 @@ -import { menu } from './shared'; import { defineDb } from 'astro:db'; +import { menu } from './shared'; export default defineDb({ tables: { diff --git a/packages/db/test/fixtures/integrations/integration/seed.ts b/packages/db/test/fixtures/integrations/integration/seed.ts index d46b05e1c1..ed2b2e2ebf 100644 --- a/packages/db/test/fixtures/integrations/integration/seed.ts +++ b/packages/db/test/fixtures/integrations/integration/seed.ts @@ -1,6 +1,6 @@ +import { db } from 'astro:db'; import { asDrizzleTable } from '@astrojs/db/utils'; import { menu } from './shared'; -import { db } from 'astro:db'; export default async function () { const table = asDrizzleTable('menu', menu); diff --git a/packages/db/test/fixtures/local-prod/db/seed.ts b/packages/db/test/fixtures/local-prod/db/seed.ts index 7ff9f5f30d..a84e634549 100644 --- a/packages/db/test/fixtures/local-prod/db/seed.ts +++ b/packages/db/test/fixtures/local-prod/db/seed.ts @@ -1,5 +1,5 @@ -import { asDrizzleTable } from '@astrojs/db/utils'; import { User, db } from 'astro:db'; +import { asDrizzleTable } from '@astrojs/db/utils'; export default async function () { await db.batch([ diff --git a/packages/db/test/fixtures/local-prod/src/pages/index.astro b/packages/db/test/fixtures/local-prod/src/pages/index.astro index 1e2bdc7b97..f36d44bd4e 100644 --- a/packages/db/test/fixtures/local-prod/src/pages/index.astro +++ b/packages/db/test/fixtures/local-prod/src/pages/index.astro @@ -1,6 +1,6 @@ --- /// -import { db, User } from 'astro:db'; +import { User, db } from 'astro:db'; const users = await db.select().from(User); --- diff --git a/packages/db/test/fixtures/no-apptoken/src/pages/index.astro b/packages/db/test/fixtures/no-apptoken/src/pages/index.astro index 62d7b08578..477e18fa33 100644 --- a/packages/db/test/fixtures/no-apptoken/src/pages/index.astro +++ b/packages/db/test/fixtures/no-apptoken/src/pages/index.astro @@ -1,6 +1,6 @@ --- /// -import { db, User } from 'astro:db'; +import { User, db } from 'astro:db'; // Just for the side-effect of running all the code await db.select().from(User); diff --git a/packages/db/test/fixtures/recipes/src/pages/index.astro b/packages/db/test/fixtures/recipes/src/pages/index.astro index f1856c12ed..9fd2dac419 100644 --- a/packages/db/test/fixtures/recipes/src/pages/index.astro +++ b/packages/db/test/fixtures/recipes/src/pages/index.astro @@ -1,6 +1,6 @@ --- /// -import { Recipe, Ingredient, db, eq } from 'astro:db'; +import { Ingredient, Recipe, db, eq } from 'astro:db'; const ingredientsByRecipe = await db .select({ diff --git a/packages/db/test/fixtures/ticketing-example/src/components/Form.tsx b/packages/db/test/fixtures/ticketing-example/src/components/Form.tsx index a4f69c5585..f393d82816 100644 --- a/packages/db/test/fixtures/ticketing-example/src/components/Form.tsx +++ b/packages/db/test/fixtures/ticketing-example/src/components/Form.tsx @@ -1,6 +1,5 @@ // Generated by simple:form -import { type ComponentProps, createContext, useContext, useState } from 'react'; import { navigate } from 'astro:transitions/client'; import { type FieldErrors, @@ -13,6 +12,7 @@ import { toValidateField, validateForm, } from 'simple:form'; +import { type ComponentProps, createContext, useContext, useState } from 'react'; export function useCreateFormContext(validator: FormValidator, fieldErrors?: FieldErrors) { const initial = getInitialFormState({ validator, fieldErrors }); diff --git a/packages/db/test/fixtures/ticketing-example/src/pages/[event]/_Ticket.tsx b/packages/db/test/fixtures/ticketing-example/src/pages/[event]/_Ticket.tsx index bb244122bd..5e488d69d7 100644 --- a/packages/db/test/fixtures/ticketing-example/src/pages/[event]/_Ticket.tsx +++ b/packages/db/test/fixtures/ticketing-example/src/pages/[event]/_Ticket.tsx @@ -1,7 +1,7 @@ +import { createForm } from 'simple:form'; import { useState } from 'react'; import { z } from 'zod'; import { Form, Input } from '../../components/Form'; -import { createForm } from 'simple:form'; export const ticketForm = createForm({ email: z.string().email(), diff --git a/packages/integrations/lit/server-shim.js b/packages/integrations/lit/server-shim.js index 7cbee09f40..ed371f89a3 100644 --- a/packages/integrations/lit/server-shim.js +++ b/packages/integrations/lit/server-shim.js @@ -1,4 +1,4 @@ -import { HTMLElement as litShimHTMLElement, customElements as litCE } from '@lit-labs/ssr-dom-shim'; +import { customElements as litCE, HTMLElement as litShimHTMLElement } from '@lit-labs/ssr-dom-shim'; // Something at build time injects document.currentScript = undefined instead of // document.currentScript = null. This causes Sass build to fail because it diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts index 5168c49c16..8fc4bd77cc 100644 --- a/packages/integrations/markdoc/src/content-entry-type.ts +++ b/packages/integrations/markdoc/src/content-entry-type.ts @@ -6,7 +6,7 @@ import Markdoc from '@markdoc/markdoc'; import type { AstroConfig, ContentEntryType } from 'astro'; import { emitESMImage } from 'astro/assets/utils'; import matter from 'gray-matter'; -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/markdoc/src/runtime-assets-config.ts b/packages/integrations/markdoc/src/runtime-assets-config.ts index d93605f6c9..0211c1381c 100644 --- a/packages/integrations/markdoc/src/runtime-assets-config.ts +++ b/packages/integrations/markdoc/src/runtime-assets-config.ts @@ -1,7 +1,7 @@ -import type { Config as MarkdocConfig } from '@markdoc/markdoc'; -import Markdoc from '@markdoc/markdoc'; //@ts-expect-error Cannot find module 'astro:assets' or its corresponding type declarations. import { Image } from 'astro:assets'; +import type { Config as MarkdocConfig } from '@markdoc/markdoc'; +import Markdoc from '@markdoc/markdoc'; export const assetsConfig: MarkdocConfig = { nodes: { diff --git a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js index 75dd29d8e9..cb3c846526 100644 --- a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js +++ b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/collection.json.js @@ -1,6 +1,6 @@ +import { getCollection } from 'astro:content'; import { stringify } from 'devalue'; import { stripAllRenderFn } from '../../utils.js'; -import { getCollection } from 'astro:content'; export async function GET() { const posts = await getCollection('blog'); diff --git a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js index 1399aa3aae..53dd17013b 100644 --- a/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js +++ b/packages/integrations/markdoc/test/fixtures/content-collections/src/pages/entry.json.js @@ -1,6 +1,6 @@ +import { getEntryBySlug } from 'astro:content'; import { stringify } from 'devalue'; import { stripRenderFn } from '../../utils.js'; -import { getEntryBySlug } from 'astro:content'; export async function GET() { const post = await getEntryBySlug('blog', 'post-1'); diff --git a/packages/integrations/markdoc/test/fixtures/headings-custom/src/pages/[slug].astro b/packages/integrations/markdoc/test/fixtures/headings-custom/src/pages/[slug].astro index 2baef9d696..90b021e955 100644 --- a/packages/integrations/markdoc/test/fixtures/headings-custom/src/pages/[slug].astro +++ b/packages/integrations/markdoc/test/fixtures/headings-custom/src/pages/[slug].astro @@ -1,5 +1,5 @@ --- -import { getCollection, CollectionEntry } from "astro:content"; +import { CollectionEntry, getCollection } from "astro:content"; export async function getStaticPaths() { const docs = await getCollection('docs'); diff --git a/packages/integrations/markdoc/test/fixtures/headings/src/pages/[slug].astro b/packages/integrations/markdoc/test/fixtures/headings/src/pages/[slug].astro index 2baef9d696..90b021e955 100644 --- a/packages/integrations/markdoc/test/fixtures/headings/src/pages/[slug].astro +++ b/packages/integrations/markdoc/test/fixtures/headings/src/pages/[slug].astro @@ -1,5 +1,5 @@ --- -import { getCollection, CollectionEntry } from "astro:content"; +import { CollectionEntry, getCollection } from "astro:content"; export async function getStaticPaths() { const docs = await getCollection('docs'); diff --git a/packages/integrations/markdoc/test/fixtures/image-assets/src/components/Image.astro b/packages/integrations/markdoc/test/fixtures/image-assets/src/components/Image.astro index aac1294525..e572c04d78 100644 --- a/packages/integrations/markdoc/test/fixtures/image-assets/src/components/Image.astro +++ b/packages/integrations/markdoc/test/fixtures/image-assets/src/components/Image.astro @@ -1,7 +1,7 @@ --- +import { Image } from 'astro:assets'; // src/components/MyImage.astro import type { ImageMetadata } from 'astro'; -import { Image } from 'astro:assets'; type Props = { src: string | ImageMetadata; alt: string; diff --git a/packages/integrations/markdoc/test/fixtures/render-html/src/pages/[slug].astro b/packages/integrations/markdoc/test/fixtures/render-html/src/pages/[slug].astro index 1f60f6589b..bea51d3b58 100644 --- a/packages/integrations/markdoc/test/fixtures/render-html/src/pages/[slug].astro +++ b/packages/integrations/markdoc/test/fixtures/render-html/src/pages/[slug].astro @@ -1,5 +1,5 @@ --- -import { getEntryBySlug, getCollection } from "astro:content"; +import { getCollection, getEntryBySlug } from "astro:content"; const { slug } = Astro.params; diff --git a/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/posts/[post].astro b/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/posts/[post].astro index 7d6ca0ca4d..5afb5be922 100644 --- a/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/posts/[post].astro +++ b/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/posts/[post].astro @@ -1,7 +1,7 @@ --- import { getCollection } from 'astro:content'; -import Layout from '../../layouts/ContentLayout.astro'; import SmallCaps from '../../components/SmallCaps.astro'; +import Layout from '../../layouts/ContentLayout.astro'; export async function getStaticPaths() { const entries = await getCollection('posts'); diff --git a/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/remote.astro b/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/remote.astro index 9a7b76a102..7c80006425 100644 --- a/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/remote.astro +++ b/packages/integrations/mdx/test/fixtures/css-head-mdx/src/pages/remote.astro @@ -1,8 +1,8 @@ --- -import '../styles/global.css' -import Layout from '../layouts/One.astro'; -import Paragraph from '../components/P.astro'; import { Markdown } from 'astro-remote' +import Paragraph from '../components/P.astro'; +import Layout from '../layouts/One.astro'; +import '../styles/global.css' --- diff --git a/packages/integrations/mdx/test/fixtures/mdx-images/src/components/MyImage.astro b/packages/integrations/mdx/test/fixtures/mdx-images/src/components/MyImage.astro index e3541867c7..3cb699e3ab 100644 --- a/packages/integrations/mdx/test/fixtures/mdx-images/src/components/MyImage.astro +++ b/packages/integrations/mdx/test/fixtures/mdx-images/src/components/MyImage.astro @@ -1,6 +1,6 @@ --- -import type { ImageMetadata } from 'astro'; import { Image } from 'astro:assets'; +import type { ImageMetadata } from 'astro'; type Props = { src: string | ImageMetadata; diff --git a/packages/integrations/mdx/test/fixtures/mdx-images/src/pages/esm-import.astro b/packages/integrations/mdx/test/fixtures/mdx-images/src/pages/esm-import.astro index e5f7a61d97..4e4db66a4d 100644 --- a/packages/integrations/mdx/test/fixtures/mdx-images/src/pages/esm-import.astro +++ b/packages/integrations/mdx/test/fixtures/mdx-images/src/pages/esm-import.astro @@ -1,6 +1,6 @@ --- -import MDX from '../components/Component.mdx'; import MyImage from 'src/components/MyImage.astro'; +import MDX from '../components/Component.mdx'; --- diff --git a/packages/integrations/mdx/test/fixtures/mdx-optimize/src/pages/import.astro b/packages/integrations/mdx/test/fixtures/mdx-optimize/src/pages/import.astro index b522a30280..9bfa7cebf7 100644 --- a/packages/integrations/mdx/test/fixtures/mdx-optimize/src/pages/import.astro +++ b/packages/integrations/mdx/test/fixtures/mdx-optimize/src/pages/import.astro @@ -1,6 +1,6 @@ --- -import { Content, components } from './index.mdx' import Strong from '../components/Strong.astro' +import { Content, components } from './index.mdx' --- diff --git a/packages/integrations/react/server.js b/packages/integrations/react/server.js index f7de2ff2e2..b2e94fbf0b 100644 --- a/packages/integrations/react/server.js +++ b/packages/integrations/react/server.js @@ -1,8 +1,8 @@ +import opts from 'astro:react:opts'; import React from 'react'; import ReactDOM from 'react-dom/server'; import { incrementId } from './context.js'; import StaticHtml from './static-html.js'; -import opts from 'astro:react:opts'; const slotName = (str) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w.toUpperCase()); const reactTypeof = Symbol.for('react.element'); diff --git a/packages/integrations/react/test/fixtures/react-component/src/pages/index.astro b/packages/integrations/react/test/fixtures/react-component/src/pages/index.astro index 3afd8233f2..b3b95c4b3b 100644 --- a/packages/integrations/react/test/fixtures/react-component/src/pages/index.astro +++ b/packages/integrations/react/test/fixtures/react-component/src/pages/index.astro @@ -1,12 +1,12 @@ --- -import Hello from '../components/Hello.jsx'; -import Later from '../components/Goodbye.vue'; import ArrowFunction from '../components/ArrowFunction.jsx'; -import PropsSpread from '../components/PropsSpread.jsx'; -import {Research2} from '../components/Research.jsx'; -import Pure from '../components/Pure.jsx'; -import TypeScriptComponent from '../components/TypeScriptComponent'; import CloneElement from '../components/CloneElement'; +import Later from '../components/Goodbye.vue'; +import Hello from '../components/Hello.jsx'; +import PropsSpread from '../components/PropsSpread.jsx'; +import Pure from '../components/Pure.jsx'; +import {Research2} from '../components/Research.jsx'; +import TypeScriptComponent from '../components/TypeScriptComponent'; import WithChildren from '../components/WithChildren'; import WithId from '../components/WithId'; diff --git a/packages/integrations/vue/client.js b/packages/integrations/vue/client.js index 3fdf53dae9..807f843fc9 100644 --- a/packages/integrations/vue/client.js +++ b/packages/integrations/vue/client.js @@ -1,6 +1,6 @@ +import { setup } from 'virtual:@astrojs/vue/app'; import { Suspense, createApp, createSSRApp, h } from 'vue'; import StaticHtml from './static-html.js'; -import { setup } from 'virtual:@astrojs/vue/app'; export default (element) => async (Component, props, slotted, { client }) => { diff --git a/packages/integrations/vue/server.js b/packages/integrations/vue/server.js index 55d61871d8..be57dd43ab 100644 --- a/packages/integrations/vue/server.js +++ b/packages/integrations/vue/server.js @@ -1,7 +1,7 @@ +import { setup } from 'virtual:@astrojs/vue/app'; import { createSSRApp, h } from 'vue'; import { renderToString } from 'vue/server-renderer'; import StaticHtml from './static-html.js'; -import { setup } from 'virtual:@astrojs/vue/app'; function check(Component) { return !!Component['ssrRender'] || !!Component['__ssrInlineRender']; diff --git a/packages/integrations/vue/test/fixtures/app-entrypoint/src/pages/index.astro b/packages/integrations/vue/test/fixtures/app-entrypoint/src/pages/index.astro index a517f8a979..511b626baa 100644 --- a/packages/integrations/vue/test/fixtures/app-entrypoint/src/pages/index.astro +++ b/packages/integrations/vue/test/fixtures/app-entrypoint/src/pages/index.astro @@ -1,8 +1,8 @@ --- import Foo from '../components/Foo.vue'; -import MultipleScriptBlocks, { doubleNumber } from '../components/MultipleScriptBlocks.vue'; import GenericComponent from '../components/Generics.vue'; import GenericsAndBlocks, { customFormatter } from '../components/GenericsAndBlocks.vue'; +import MultipleScriptBlocks, { doubleNumber } from '../components/MultipleScriptBlocks.vue'; --- diff --git a/packages/integrations/vue/test/fixtures/basics/src/pages/index.astro b/packages/integrations/vue/test/fixtures/basics/src/pages/index.astro index e17de6edf9..b2f292d105 100644 --- a/packages/integrations/vue/test/fixtures/basics/src/pages/index.astro +++ b/packages/integrations/vue/test/fixtures/basics/src/pages/index.astro @@ -1,6 +1,6 @@ --- -import Parent from '../components/Parent.astro'; import Bar from '../components/Foo.vue'; +import Parent from '../components/Parent.astro'; --- diff --git a/packages/markdown/remark/src/frontmatter-injection.ts b/packages/markdown/remark/src/frontmatter-injection.ts index cb53d2ab28..91b98ebcba 100644 --- a/packages/markdown/remark/src/frontmatter-injection.ts +++ b/packages/markdown/remark/src/frontmatter-injection.ts @@ -1,4 +1,4 @@ -import type { VFile, VFileData as Data } from 'vfile'; +import type { VFileData as Data, VFile } from 'vfile'; import type { MarkdownAstroData } from './types.js'; function isValidAstroData(obj: unknown): obj is MarkdownAstroData { diff --git a/packages/telemetry/src/system-info.ts b/packages/telemetry/src/system-info.ts index 1315c63c94..2913b69414 100644 --- a/packages/telemetry/src/system-info.ts +++ b/packages/telemetry/src/system-info.ts @@ -1,5 +1,5 @@ import os from 'node:os'; -import { isCI, name as ciName } from 'ci-info'; +import { name as ciName, isCI } from 'ci-info'; import isDocker from 'is-docker'; import isWSL from 'is-wsl';