From 9b08facb27abc96a6e993c5d9c236565c0f290da Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 28 Mar 2024 14:32:43 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/content/index.ts | 7 ++++++- packages/astro/src/content/utils.ts | 2 +- packages/astro/src/core/build/plugins/plugin-css.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/content/index.ts b/packages/astro/src/content/index.ts index 582035ece9..dcbbeb55cc 100644 --- a/packages/astro/src/content/index.ts +++ b/packages/astro/src/content/index.ts @@ -2,7 +2,12 @@ export { CONTENT_FLAG, PROPAGATED_ASSET_FLAG } from './consts.js'; export { errorMap } from './error-map.js'; export { attachContentServerListeners } from './server-listeners.js'; export { createContentTypesGenerator } from './types-generator.js'; -export { contentObservable, getContentPaths, getDotAstroTypeReference, hasAssetPropagationFlag } from './utils.js'; +export { + contentObservable, + getContentPaths, + getDotAstroTypeReference, + hasAssetPropagationFlag, +} from './utils.js'; export { astroContentAssetPropagationPlugin } from './vite-plugin-content-assets.js'; export { astroContentImportPlugin } from './vite-plugin-content-imports.js'; export { astroContentVirtualModPlugin } from './vite-plugin-content-virtual-mod.js'; diff --git a/packages/astro/src/content/utils.ts b/packages/astro/src/content/utils.ts index ac0f35ceec..f40de3ff98 100644 --- a/packages/astro/src/content/utils.ts +++ b/packages/astro/src/content/utils.ts @@ -508,7 +508,7 @@ export function getExtGlob(exts: string[]) { export function hasAssetPropagationFlag(id: string): boolean { try { - return new URL(id, 'file://').searchParams.has(PROPAGATED_ASSET_FLAG) + return new URL(id, 'file://').searchParams.has(PROPAGATED_ASSET_FLAG); } catch { return false; } diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts index 4a83b8c171..31cb2c9b53 100644 --- a/packages/astro/src/core/build/plugins/plugin-css.ts +++ b/packages/astro/src/core/build/plugins/plugin-css.ts @@ -6,6 +6,7 @@ import type { AstroBuildPlugin, BuildTarget } from '../plugin.js'; import type { PageBuildData, StaticBuildOptions, StylesheetAsset } from '../types.js'; import { RESOLVED_VIRTUAL_MODULE_ID as ASTRO_CONTENT_VIRTUAL_MODULE_ID } from '../../../content/consts.js'; +import { hasAssetPropagationFlag } from '../../../content/index.js'; import type { AstroPluginCssMetadata } from '../../../vite-plugin-astro/index.js'; import * as assetName from '../css-asset-name.js'; import { @@ -21,7 +22,6 @@ import { isHoistedScript, } from '../internal.js'; import { extendManualChunks, shouldInlineAsset } from './util.js'; -import { hasAssetPropagationFlag } from '../../../content/index.js'; interface PluginOptions { internals: BuildInternals;