feat: Deprecate service object notation (#8466)

This commit is contained in:
A. Singh 2020-11-04 22:05:01 +05:30 committed by GitHub
parent e47adb47eb
commit c0a2ecf453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,12 @@ layout: Doc
# Serverless Framework Deprecations
<a name="SERVICE_OBJECT_NOTATION"><div>&nbsp;</div></a>
## `service` property object notation
Starting with v3.0.0, object notation for `service` property will no longer be recognized. Set `service` property directly with service name.
<a name="CLOUDFRONT_CACHE_BEHAVIOR_FORWARDED_VALUES_AND_TTL"><div>&nbsp;</div></a>
## `cloudFront` event `behavior.ForwardedValues` property

View File

@ -131,6 +131,11 @@ class Service {
}
if (_.isObject(serverlessFile.service)) {
this.serverless._logDeprecation(
'SERVICE_OBJECT_NOTATION',
'Starting from next major object notation for "service" property will no longer be ' +
'recognized. Set "service" property directly with service name.'
);
this.serviceObject = serverlessFile.service;
this.service = serverlessFile.service.name;
} else {