serverless-plugin-aws-alerts icon indicating copy to clipboard operation
serverless-plugin-aws-alerts copied to clipboard

fix: ensure to extend function schema only if method available

Open pgrzesik opened this issue 4 years ago • 1 comments

What did you implement:

Closes #173

In order to not break the plugin for serverless in version lower than 2.10.0 where defineFunctionProperties was added (https://github.com/serverless/serverless/blob/master/CHANGELOG.md#2100-2020-11-03), we should check for it's existence before extending the schema

How did you implement it:

Checking for the existence of defineFunctionProperties before calling it

How can we verify it:

If you try to use plugin with serverless in version <2.10.0, it will fail as described in the linked issue. With this change, it will no longer fail.

Todos:

  • [] Write tests
  • [] Write documentation
  • [x] Fix linting errors
  • [] Provide verification config/commands/resources

pgrzesik avatar Apr 28 '21 16:04 pgrzesik

Currently working on a project that is using a version of serverless affected by this. Is there anything i can do to help this PR?

AdamSlack avatar Aug 26 '21 11:08 AdamSlack