diff --git a/packages/astro/components/Image.astro b/packages/astro/components/Image.astro index aee198a60278..4e55f5608b8e 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 6dcc50c8e1d6..3984a53e96cb 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 3ada093e7d21..04cb1c110c88 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 d8b30b9cf099..a80bddc0eb0e 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 a3de9b8ecc6b..9a914d8fb333 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 43eb17a4ecb9..1d9511057b4a 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 ded58d8aa188..55b2108cbe9c 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 19ab5042757b..962f8f038599 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 1ab459f743ce..9fb5b4862838 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 91552a8367ca..c4af890a0aa0 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 5648a25814c6..b1b8187d52e7 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 ea0a88f84da3..f8e74ff78642 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 a17337c897fd..4b180602db0e 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 181f2bfba31c..24794367f30d 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 7aeca1aef258..b67eb81ced15 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 948fa51df036..65bff4d4a388 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 db8cc25f3a95..2d14d42a6952 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 f24d216be9d8..0eaff1165ceb 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 9ebfa65f04e8..569a24b1a4f8 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 a51ccc299b2a..1a9b731bf62f 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 34fa6992699b..83fcd4e1820d 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 4190d86efb45..2175ffd0b1ef 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 e887fe6a5e77..bd59d22cfd50 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 430ad946517e..2becd8d1ccd3 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 883d567a118f..533ac408891a 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 37912591cb57..c76ee14521a3 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 fb10e60382d8..fd2e8f9b54c1 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 8271c6557587..262cd67723e9 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 3008f611979e..fbe086bc27fb 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 42c2da57a1c1..6c40fe40e6a8 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 3dd5140cf199..589f9f8b75f1 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 4d29a7fadd02..1d9ac9df64ce 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 68474b0576b7..f16b5a1d9423 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 31cb2c9b538a..e0dce339f769 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 0c9636b307a1..d1bd266cd4ab 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 d9b91a9ce2c6..303846f7608f 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 9ddfd92eb33d..317a037826ff 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 5a9f3536c13d..49eac68fdb25 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 bc9dbd5aa449..2f4e256b760b 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 7a7949e516ad..a5f4ae53cffa 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 c11fe1166e37..c21f9802532b 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 e200a95677cd..a654eeb12e7b 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 25faad0ea74f..e880d48440de 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 c161df438c6b..4521e6f25bcc 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 b771c24335dc..2cc198bb0dd9 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 8c2f73a91eb6..41061c0b99e8 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 10b1a887fc40..f67f29c64bc1 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 bf239197f132..7a7d59b79f00 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 ccfb2b5a06e3..b4d0785670c1 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 635b09699a9f..608394142a5e 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 b5a34f4ceda5..09c0e8eb5251 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 dcb3ebcba5b6..d3f0417562ce 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 ec4ae3158beb..8c256864fd6b 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 8cd31fdd3bed..f383d9e89ae4 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 3645d37bb5b8..e372f5a64ae4 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 638bbea4dcfa..b7b7d847253e 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 e0f123076cff..a05a9138b1d8 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 418d449bb64c..63b6eb70e502 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 33f96a70da84..dcf329ec423a 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 89a7288ae12a..90838f002be7 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 bfdbeb5f8e85..2aecfb0f2eb7 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 1b779d18db03..3d5f2633992b 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 ea3a01670665..bbd26ad6b279 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 0a6baab59486..6cc9ac708ed0 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 49f378bc641f..225b8c1030ce 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 49f378bc641f..225b8c1030ce 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 06a5bd2b3a59..944873d0c5a9 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 454d7dfbaf9b..c6aba4c40194 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 85b228c43696..1bd33e57783d 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 337b4a95cff8..b9cbfae9617f 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 aa4a3bd2587a..6ccfffe417e1 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 c751b2f77fb1..d3e1e31e8fa2 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 d5272cc7563f..6b196b36d057 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 d138455a3e3f..c6186a7b7622 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 f65356e8fab1..4ec7e5ae57fd 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 cfd28a3d4b15..91c1b5ebabd9 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 1708d1cc9cf9..c5f4756c354a 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 ced75e301963..6d8f6f7ed75e 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 bfe4a102058f..b68fde36d633 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 945f965f56fc..0d774e80bbd4 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 622638e70003..f212b6e53eaa 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 a0bf178818d2..4af288f0bfc4 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 7543bce3a429..74f5d463f2ad 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 40994284417d..55e8161bb4d2 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 839a46f9bd0f..a3a57b006af4 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 47b332a321c7..a9245b5ba1e8 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 06a35b2879c4..e4931ded1e61 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 60f0b429b541..bf968b5aca2c 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 9f44b97c5fe8..62d5e4afdf71 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 9677a6c52b86..6d66d98967f4 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 5bd2410ac416..054b82a01fb7 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 ef0e8eb49b9a..dd680eba7650 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 0109835c6a07..eeeba5a50468 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 d8c476db19d3..010ed3a1863d 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 ec5ab2e0c274..9a1ef4322e04 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 2d21f81103b8..2be0c4b2385a 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 41b86ab149ea..4551fc48325f 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 82d5a6a7c5e5..a86619314414 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 7ff9f5f30dc8..a84e6345498e 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 90f6381150e5..4b79dba2c859 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 9aef159c9ba8..8e6bad8c36fc 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 d1f1aac26398..71490be95727 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 d46b05e1c1fa..ed2b2e2ebf2b 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 d1f1aac26398..71490be95727 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 d46b05e1c1fa..ed2b2e2ebf2b 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 7ff9f5f30dc8..a84e6345498e 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 1e2bdc7b975a..f36d44bd4eb3 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 62d7b085784f..477e18fa3306 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 f1856c12ed9e..9fd2dac41915 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 a4f69c55850b..f393d8281609 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 bb244122bdae..5e488d69d70f 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 7cbee09f40b2..ed371f89a32f 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 5168c49c16a5..8fc4bd77cceb 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 d93605f6c91d..0211c1381c74 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 75dd29d8e93e..cb3c84652622 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 1399aa3aaed6..53dd17013ba7 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 2baef9d69637..90b021e95525 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 2baef9d69637..90b021e95525 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 aac1294525ba..e572c04d7839 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 1f60f6589b29..bea51d3b584b 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 7d6ca0ca4d37..5afb5be92216 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 9a7b76a10283..7c8000642521 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 e3541867c7fc..3cb699e3ab68 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 e5f7a61d971d..4e4db66a4d17 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 b522a30280ca..9bfa7cebf7c7 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 f7de2ff2e22b..b2e94fbf0b6e 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 3afd8233f2d7..b3b95c4b3b60 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 CloneElement from '../components/CloneElement'; +import Later from '../components/Goodbye.vue'; +import Hello from '../components/Hello.jsx'; import PropsSpread from '../components/PropsSpread.jsx'; -import {Research2} from '../components/Research.jsx'; import Pure from '../components/Pure.jsx'; +import {Research2} from '../components/Research.jsx'; import TypeScriptComponent from '../components/TypeScriptComponent'; -import CloneElement from '../components/CloneElement'; 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 3fdf53dae964..807f843fc930 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 55d61871d881..be57dd43ab94 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 a517f8a979cc..511b626baa6b 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 e17de6edf9f8..b2f292d1057c 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 cb53d2ab28ee..91b98ebcba63 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 1315c63c9485..2913b69414cb 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';