diff --git a/.changeset/fifty-pets-hunt.md b/.changeset/fifty-pets-hunt.md new file mode 100644 index 000000000000..d9ec8d6d7cbf --- /dev/null +++ b/.changeset/fifty-pets-hunt.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adds the feature name to logs about feature deprecation / experimental status. diff --git a/packages/astro/src/integrations/astroFeaturesValidation.ts b/packages/astro/src/integrations/astroFeaturesValidation.ts index 4c6b1131b328..8bae77846c29 100644 --- a/packages/astro/src/integrations/astroFeaturesValidation.ts +++ b/packages/astro/src/integrations/astroFeaturesValidation.ts @@ -80,9 +80,9 @@ function validateSupportKind( if (supportKind === STABLE) { return true; } else if (supportKind === DEPRECATED) { - featureIsDeprecated(adapterName, logger); + featureIsDeprecated(adapterName, logger, featureName); } else if (supportKind === EXPERIMENTAL) { - featureIsExperimental(adapterName, logger); + featureIsExperimental(adapterName, logger, featureName); } if (hasCorrectConfig() && supportKind === UNSUPPORTED) { @@ -94,20 +94,20 @@ function validateSupportKind( } function featureIsUnsupported(adapterName: string, logger: Logger, featureName: string) { - logger.error('config', `The feature ${featureName} is not supported (used by ${adapterName}).`); + logger.error('config', `The feature "${featureName}" is not supported (used by ${adapterName}).`); } -function featureIsExperimental(adapterName: string, logger: Logger) { +function featureIsExperimental(adapterName: string, logger: Logger, featureName: string) { logger.warn( 'config', - `The feature is experimental and subject to change (used by ${adapterName}).` + `The feature "${featureName}" is experimental and subject to change (used by ${adapterName}).` ); } -function featureIsDeprecated(adapterName: string, logger: Logger) { +function featureIsDeprecated(adapterName: string, logger: Logger, featureName: string) { logger.warn( 'config', - `The feature is deprecated and will be removed in the future (used by ${adapterName}).` + `The feature "${featureName}" is deprecated and will be removed in the future (used by ${adapterName}).` ); }