Skip to content

Commit eee52a5

Browse files
author
ArtificerEntertainment
authored
Merge pull request #1 from MichaelRBond/lifecycle-update
Update to new lifecycle hook, `package` to remove deprecation warning
2 parents 091375d + 099e063 commit eee52a5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

add-log-retention.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class AwsAddLogRetention {
1616
this.options = options;
1717
this.provider = this.serverless.getProvider('aws');
1818
this.hooks = {
19-
'before:deploy:createDeploymentArtifacts': this.beforeDeploy.bind(this),
19+
'package:createDeploymentArtifacts': this.beforeDeploy.bind(this),
2020
};
2121
}
2222

test/add-log-retention.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ describe('serverless-plugin-log-retention', function() {
3737
const instance = createTestInstance();
3838
expect(instance)
3939
.to.have.property('hooks')
40-
.that.has.all.keys('before:deploy:createDeploymentArtifacts');
40+
.that.has.all.keys('package:createDeploymentArtifacts');
4141

4242
const stub = sinon.stub(instance, 'addLogRetentionForFunctions');
43-
instance.hooks['before:deploy:createDeploymentArtifacts']();
43+
instance.hooks['package:createDeploymentArtifacts']();
4444

4545
sinon.assert.calledOnce(stub);
4646
});

0 commit comments

Comments
 (0)