Home / Function/ logFeatureSupport() — astro Function Reference

logFeatureSupport() — astro Function Reference

Architecture documentation for the logFeatureSupport() function in features-validation.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  ba9c512e_0aa9_11ba_c951_9d1d2512b2ed["logFeatureSupport()"]
  66c4596f_b3a5_daf2_22c7_dc5b1ad0471c["features-validation.ts"]
  ba9c512e_0aa9_11ba_c951_9d1d2512b2ed -->|defined in| 66c4596f_b3a5_daf2_22c7_dc5b1ad0471c
  594e5c25_43a2_cf6f_9a26_b095b502935e["validateSupportKind()"]
  594e5c25_43a2_cf6f_9a26_b095b502935e -->|calls| ba9c512e_0aa9_11ba_c951_9d1d2512b2ed
  style ba9c512e_0aa9_11ba_c951_9d1d2512b2ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/integrations/features-validation.ts lines 140–183

function logFeatureSupport(
	adapterName: string,
	logger: Logger,
	featureName: string,
	supportKind: AdapterSupport,
	adapterMessage?: string,
	suppress?: 'all' | 'default',
) {
	if (!suppress) {
		switch (supportKind) {
			case AdapterFeatureStability.STABLE:
				break;
			case AdapterFeatureStability.DEPRECATED:
				logger.warn(
					'config',
					`The adapter ${adapterName} has deprecated its support for "${featureName}", and future compatibility is not guaranteed. The adapter may completely remove support for this feature without warning.`,
				);
				break;
			case AdapterFeatureStability.EXPERIMENTAL:
				logger.warn(
					'config',
					`The adapter ${adapterName} provides experimental support for "${featureName}". You may experience issues or breaking changes until this feature is fully supported by the adapter.`,
				);
				break;
			case AdapterFeatureStability.LIMITED:
				logger.warn(
					'config',
					`The adapter ${adapterName} has limited support for "${featureName}". Certain features may not work as expected.`,
				);
				break;
			case AdapterFeatureStability.UNSUPPORTED:
				logger.error(
					'config',
					`The adapter ${adapterName} does not currently support the feature "${featureName}". Your project may not build correctly.`,
				);
				break;
		}
	}

	// If the adapter specified a custom message, log it after the default message (when not suppressed)
	if (adapterMessage && suppress !== 'all') {
		logger.warn('adapter', adapterMessage);
	}
}

Domain

Subdomains

Frequently Asked Questions

What does logFeatureSupport() do?
logFeatureSupport() is a function in the astro codebase, defined in packages/astro/src/integrations/features-validation.ts.
Where is logFeatureSupport() defined?
logFeatureSupport() is defined in packages/astro/src/integrations/features-validation.ts at line 140.
What calls logFeatureSupport()?
logFeatureSupport() is called by 1 function(s): validateSupportKind.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free