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
[FIX] getCities #117
Comments
@hyanmandian RC should not introduce new breaking changes. I think it is better to deprecate the current API and introduce the new API as another helper. |
Maybe we should remove this utility... Talking to @andreoav we discover that this function adds a lot of unnecessary bytes and this type of utility should have an API to consume. We concluded that this is out of our scope. |
Good point about the cities with the same name, but with a different state. I didn't consider this because I've never seen an usage of all cities together because it returns a huge amount of data. The application gets the state first and after the cities of the selected state. About
are you talking about removing |
Yes @arantespp :( This util increase a lot of bytes in our library. Look that: https://bundlephobia.com/result?p=@brazilian-utils/brazilian-utils@1.0.0-rc.6 Jumps from 18.3kb to 102.4kb |
I see. Is the size huge even with tree shaking? About the project scope, if Make sense for the project to create a package called |
Yes, even with tree shaking we have a problem because today our tree shaking is not so good :( I think that we have 2 ways to fix that, the first and easier to do is just remove that function, another way is fixing our tree shaking and maybe create a Today we import something like that: I think the second approach is better for our future, but in that case, I don't know if it's applicable. Interacting with |
I didn't know that the cities name changed a lot. So it's better remove |
Should another issue be opened regarding the tree-shaking problem? This way we can proceed removing |
Also removing the |
Nice idea @pedrovsp ! First, we need to deprecate this function with Are you guys ok with that? |
Yes, sounds good to me! Should another issue be opened regarding the creation of |
I agree with moving cities to another package, because that will make the core utils much smaller when someone looks in bundlephobia The "size" ins't really an issue, as I pointed in #157 (comment), but the majority of users will feel afraid after seeing the size of the whole package and the name maybe something like |
Nice thoughts @saculbr ! I prefer What do you guys think about that? |
@hyanmandian how is the status of this issue? First will we deprecated the API and after creating |
We just need to decide what we should do. At first, I thought that deprecate this function and create another package make sense, but after @morhogg discovered in #157 that the tree shake works fine, I think we can just improve the current behavior to what I've suggested in this issue and finally publish v1 with a note in the changelog explaning about the API changes. |
Does this mean that we change the |
Yes.. What do you think about it? |
Or we can do what @andreoav suggested. I know that this approach it's correct, but I would not like to do that :( |
I prefer keeping @hyanmandian have you ever considered creating a method with a name like |
Because today |
Make sense. I'd go for keeping the |
@arantespp can you help us to fix |
I'll do that and enjoy your vacation :) |
I don't know if this still up or if its already done, since its from last year. I think its a good idea. So, what's the actual situation? |
Hello @Isaius sorry for the delay :( . Right now I don't have much time to focus on current issues. If you know how to improve that, please, be comfortable contributing. |
Today
getCities
return just city name, but in Brazil, we have some cities with same name in different states... So I think that we should returnstateCode
and maybecode
(IBGE id) in the returned data.Something like that:
I know this change will break our API, but since we're still in RC, maybe it's not a big problem. What do you think about it @arantespp @andreoav ?
The text was updated successfully, but these errors were encountered: