feat(Packaging): Remove package[include|exclude] deprecation

It'll be re-added in context of v3
This commit is contained in:
Mariusz Nowak 2021-10-07 11:58:52 +02:00 committed by Mariusz Nowak
parent 87461007f8
commit 70e2736226
2 changed files with 2 additions and 19 deletions

View File

@ -104,6 +104,8 @@ Starting with v3.0.0 any option extensions which does not have `type` defined wi
Deprecation code: `NEW_PACKAGE_PATTERNS`
_Note: We've resigned from this deprecation in the context of v2 (it'll be re-added in the context of v3). We continue to advise upgrade of services, so they do not rely on `package.include` and `package.exclude` settings._
Support for `package.include` and `package.exclude` will be removed with v3.0.0. Instead please use `package.patterns` with which both _include_ and _exclude_ (prefixed with `!`) rules can be configured.
Check [Packaging Patterns](/framework/docs/providers/aws/guide/packaging/#patterns) documentation for more info.

View File

@ -33,25 +33,6 @@ class Package {
};
this.hooks = {
'initialize': () => {
const useIncludeExclude = (packageConfig = {}) =>
packageConfig.include || packageConfig.exclude;
const servicePackage = this.serverless.service.package || {};
if (
useIncludeExclude(servicePackage) ||
Object.values(this.serverless.service.functions).some((func) =>
useIncludeExclude(func.package)
) ||
Object.values(this.serverless.service.layers || {}).some((func) =>
useIncludeExclude(func.package)
)
) {
this.serverless._logDeprecation(
'NEW_PACKAGE_PATTERNS',
'Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead'
);
}
},
'package:createDeploymentArtifacts': async () =>
BbPromise.bind(this).then(this.packageService),