Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Deprecate numbers at layers[].allowedAccounts[] #8305

Closed
medikoo opened this issue Sep 30, 2020 · 2 comments
Closed

Deprecate numbers at layers[].allowedAccounts[] #8305

medikoo opened this issue Sep 30, 2020 · 2 comments
Labels
deprecation Deprecation proposal (breaking with next major) good first issue help wanted refactor

Comments

@medikoo
Copy link
Contributor

medikoo commented Sep 30, 2020

Currently we accept and eventually coerce a number at account value:

if (typeof account === 'number' && !isNaN(account)) {
parsedAccount = `${account}`;
}

It's uncommon and doesn't follow general project conventions where we do not introduce such corecions.

It'll be great to clean this up, so first deprecate number form, and with next major remove support for it.

@medikoo medikoo added good first issue refactor help wanted deprecation Deprecation proposal (breaking with next major) labels Sep 30, 2020
@arjbholu
Copy link

arjbholu commented Oct 1, 2020

Hi @medikoo

I had like to work on this issue if that's okay.

Correct me if I am wrong. Following is what I need to do:

  1. I need to first add an entry to deprecate file.
  2. Then add this.serverless._logDeprecation("code", "message") to the part you mentioned in the comment.

Apologies if there is any mistake. Please bear with me as this is my first time 😄

Thanks,
Arjav

@medikoo
Copy link
Contributor Author

medikoo commented Oct 1, 2020

@arjbholu great thanks for jumping in! Still today we've merged improvements that make this obsolete (sorry forgot to close it on time 🤦 ).

Through #8319 and #8299 users can input numbers and it'll be automatically coerced to string by validation engine (so in processing logic we can be sure we deal with strings).

Closing this now, to avoid further confusion

@medikoo medikoo closed this as completed Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Deprecation proposal (breaking with next major) good first issue help wanted refactor
Projects
None yet
Development

No branches or pull requests

2 participants