mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
feat(Packaging): Remove package[include|exclude] deprecation
It'll be re-added in context of v3
This commit is contained in:
parent
87461007f8
commit
70e2736226
@ -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.
|
||||
|
||||
@ -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),
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user