Skip to content

fix: CLI option count type deprecation warning#257

Merged
pgrzesik merged 1 commit into
serverless:masterfrom
hagmic:master
May 5, 2021
Merged

fix: CLI option count type deprecation warning#257
pgrzesik merged 1 commit into
serverless:masterfrom
hagmic:master

Conversation

@hagmic

@hagmic hagmic commented May 4, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

@pgrzesik this one should be quick to validate

@pgrzesik pgrzesik left a comment

Copy link
Copy Markdown
Contributor

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 👍

Comment thread logs/lib/retrieveLogs.js
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
Copy Markdown
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

hammadzz commented Jun 7, 2021

Copy link
Copy Markdown

Which version is this expected to be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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