Skip to content

Commit

Permalink
Merge branch 'main' into vue-app-entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Dec 12, 2023
2 parents 0e75b33 + 63b3cd1 commit da8cfef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-pets-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Adds the feature name to logs about feature deprecation / experimental status.
14 changes: 7 additions & 7 deletions packages/astro/src/integrations/astroFeaturesValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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}).`
);
}

Expand Down

0 comments on commit da8cfef

Please sign in to comment.