Skip to content

Commit

Permalink
fix(Packaging): Ensure to show deprecation in all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 18, 2021
1 parent 59f2d27 commit cc71fc9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/plugins/aws/package/index.js
Expand Up @@ -59,6 +59,13 @@ class AwsPackage {

this.hooks = {
'initialize': () => {
if (this.serverless.service.provider.disableDefaultOutputExportNames) {
this.serverless._logDeprecation(
'DISABLE_DEFAULT_OUTPUT_EXPORT_NAMES',
'Starting with `v3.0.0`, it will not be possible to disable default export names for outputs. To hide this deprecation message and ensure seamless upgrade, please remove this flag.'
);
}

if (this.serverless.processedInput.commands.join(' ') === 'package') {
log.notice();
log.notice(
Expand All @@ -79,13 +86,6 @@ class AwsPackage {
},

'package:initialize': async () => {
if (this.serverless.service.provider.disableDefaultOutputExportNames) {
this.serverless._logDeprecation(
'DISABLE_DEFAULT_OUTPUT_EXPORT_NAMES',
'Starting with `v3.0.0`, it will not be possible to disable default export names for outputs. To hide this deprecation message and ensure seamless upgrade, please remove this flag.'
);
}

return this.generateCoreTemplate();
},

Expand Down

0 comments on commit cc71fc9

Please sign in to comment.