Skip to content

fix: CLI option count type deprecation warning #257

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 5, 2021

Conversation

hagmic
Copy link
Contributor

@hagmic hagmic commented May 4, 2021

Closes #256

Possible options are:

  • string
  • boolean
  • multiple (strings)

I selected "string" and added a parseInt to handle the option correctly internally. Let me know if I should go a different direction!

@CorentinDoue
Copy link
Contributor

@pgrzesik this one should be quick to validate

Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @hagmic - looks good 👍

@@ -13,7 +13,7 @@ module.exports = {
getLogs() {
const project = this.serverless.service.provider.project;
let func = this.options.function;
const pageSize = this.options.count || 10;
const pageSize = parseInt(this.options.count, 10) || 10;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it worked previously correctly without casting to int, but I think it doesn't hurt here 👍

@pgrzesik pgrzesik changed the title fix: count type deprecation warning fix: CLI option count type deprecation warning May 5, 2021
@pgrzesik pgrzesik merged commit 8b97064 into serverless:master May 5, 2021
@hammadzz
Copy link

hammadzz commented Jun 7, 2021

Which version is this expected to be released?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serverless: Deprecation warning: CLI Options type property
4 participants