Skip to content

Commit

Permalink
feat(Packaging): Remove package[include|exclude] deprecation
Browse files Browse the repository at this point in the history
It'll be re-added in context of v3
  • Loading branch information
medikoo committed Oct 7, 2021
1 parent 8746100 commit 70e2736
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
2 changes: 2 additions & 0 deletions docs/deprecations.md
Expand Up @@ -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.
Expand Down
19 changes: 0 additions & 19 deletions lib/plugins/package/package.js
Expand Up @@ -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),

Expand Down

0 comments on commit 70e2736

Please sign in to comment.