cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: add geo subdivision mocking

Open JWhist opened this issue 3 years ago โ€ข 1 comments

๐ŸŽ‰ Thanks for submitting a pull request! ๐ŸŽ‰

Summary

Expands upon the geo country mocking, by adding two libraries, a country file and a subdivision file, mapping codes to names and allowing users to mock subdivisions (states/provinces, etc) as well as countries.

Draft PR, have a few glitchy tests and some issues with importing a json file (eslint doesn't like it?)


For us to review and ship your PR efficiently, please perform the following steps:

  • [X] Update or add tests (if any source code was changed or added) ๐Ÿงช
  • [X] Update or add documentation (if features were changed or added) ๐Ÿ“
  • [X] Make sure the status checks below are successful โœ…

A picture of a cute animal (not mandatory, but encouraged)

JWhist avatar Jul 20 '22 22:07 JWhist

๐Ÿ“Š Benchmark results

Comparing with 09009f0dcacb613365469301cb1719d01cd5b945

Package size: 223 MB

(no change)

^  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB  223 MB 
โ”‚   โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend
  • T-30 (1206d872c0e8efab1f0281eaff03bfd33e02803b): 223 MB
  • T-29 (0bf3a84fd22c5ae9734e65eb7943c7d2f69eb59b): 223 MB
  • T-28 (27a78b85e6cdf6616793e9d5e5acab0fd16c405c): 223 MB
  • T-27 (d0a691b968d7da9f1567b29cf24a6e46dff31466): 223 MB
  • T-26 (5067d0ebac8ce101f87e60d41140df94b8b9dd01): 223 MB
  • T-25 (70ee924a18aec59c54689bc48305a4d91a8ce3ad): 223 MB
  • T-24 (095f77e86401ec375114a8773c32b0f462bd3003): 223 MB
  • T-23 (a2b0f458401363e847261695e029d9fd9759e1dc): 223 MB
  • T-22 (8ad767c7d8dfb4e994b10f5cd085280e9992210f): 223 MB
  • T-21 (2f6044def272ca2be436fcad663691456aa0e406): 223 MB
  • T-20 (6af4a441ebc1b1b64363578dcb5f116dc7498202): 223 MB
  • T-19 (528207cef7ede7dc2f2e79d70da4db3f7ea2f0e8): 223 MB
  • T-18 (d399004cb1d8f49790177195e9a1d828bfd22b84): 223 MB
  • T-17 (339cca96c4444d0c987b6e8e9cbea8170dc5271f): 223 MB
  • T-16 (f746dbc8c8810ce7df38eb6825c7d429d01e4e6d): 223 MB
  • T-15 (fc2030468cab8a402c544a702e03e8629d542313): 223 MB
  • T-14 (894608358ec0a5e0dccc6ece54d567a387193718): 223 MB
  • T-13 (82245b28e20b64ca22aac84d41b50180a89577ab): 223 MB
  • T-12 (f10cba1c7da48b874f6da69fabc2c5246d000cf8): 223 MB
  • T-11 (a13eddadabdcf4e849f9465026276ab052b35f30): 223 MB
  • T-10 (e7e15a3ac701321181dedcbf23da581e6e597701): 223 MB
  • T-9 (cc833de3faa1a09bd60e39cfc8b50472dd62125a): 223 MB
  • T-8 (a205266d057edbd5fe722548ff79df475f66386b): 223 MB
  • T-7 (8e392a4da31cf844fd4c11d0fe95bb88cc8e8052): 223 MB
  • T-6 (e977945b73cccbd03f1ca3cc2edd36728c4c149f): 223 MB
  • T-5 (4ed5916bab059ac9858b6f8488a1d07d84c1df55): 223 MB
  • T-4 (3ce29eedf10b2d4c0f6ac6c29aeee932cd40af4a): 223 MB
  • T-3 (6cd52d10e946c9af35e2e3b69e6674d4ca3d3d17): 223 MB
  • T-2 (138681d4709786b38cce632ca018c0a8607fbaf3): 223 MB
  • T-1 (09009f0dcacb613365469301cb1719d01cd5b945): 223 MB
  • T (current commit): 223 MB

github-actions[bot] avatar Jul 20 '22 22:07 github-actions[bot]

Relevant issue: https://github.com/netlify/cli/issues/4498

tinfoil-knight avatar Sep 29 '22 10:09 tinfoil-knight