netlify / zip-it-and-ship-it

Intelligently prepare Node.js Lambda functions for deployment
https://www.npmjs.com/package/@netlify/zip-it-and-ship-it
MIT License
316 stars 35 forks source link

feat: add runtime API version property #1575

Closed jenae-janzen closed 1 year ago

jenae-janzen commented 1 year ago

๐ŸŽ‰ Thanks for submitting a pull request! ๐ŸŽ‰ Adds a property to surface the runtime API version for the function in build data. Part of issue https://linear.app/netlify/issue/COM-6/expose-the-ability-to-query-for-functions-using-the-v2-api

We added this to an object called build data to distinguish it from info about the function runtime and to allow us to add more properties about the build in the future.

Summary

Fixes #


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

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

github-actions[bot] commented 1 year ago

โฑ Benchmark results

Comparing with 11d452bd8c4ef7a25655a4d3f2c612c68f7625ba

largeDepsEsbuild: 3.2s

โฌ†๏ธ 21.79% increase vs. 11d452bd8c4ef7a25655a4d3f2c612c68f7625ba

^                                                           3.7s                                          
โ”‚                                                           โ”Œโ”€โ”€โ”                                          
โ”‚                                                           |  |                                          
โ”‚           3.2s                                    3.1s    |  |            3.1s                    3.2s  
โ”‚           โ”Œโ”€โ”€โ”                                    โ”Œโ”€โ”€โ”    |  |            โ”Œโ”€โ”€โ”                    โ”Œโ”€โ”€โ”  
โ”‚ โ”€โ”€2.7sโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€2.8sโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€|โ–’โ–’|โ”€โ”€
โ”‚   โ”Œโ”€โ”€โ”    |  |    2.5s    โ”Œโ”€โ”€โ”    2.6s            |  |    |  |    2.6s    |  |    2.6s    2.5s    |โ–’โ–’|  
โ”‚   |  |    |  |    โ”Œโ”€โ”€โ”    |  |    โ”Œโ”€โ”€โ”    2.4s    |  |    |  |    โ”Œโ”€โ”€โ”    |  |    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    โ”Œโ”€โ”€โ”    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    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-19 (38cde6efec37b5d60593c15810f756da8b5177e6): 2.6s - T-18 (2211f39741e1088a7c9cde0af57c9bc27108c606): 2.7s - T-17 (54b79e3c973805ed06c5ec4bc0259a122a880913): 2.7s - T-16 (87886247aa8acabd74cf76f13c3465a22bf63078): 3.5s - T-15 (27155874fa16fb54d0c00f71d1e98e2e856642c4): 2.8s - T-14 (0c76ba5d3ebfd00ce70b3bfd382bed28a6885017): 2.6s - T-13 (3092484b754b25c3635f1fb36bae0eaf8f9db6f0): 2.6s - T-12 (b5b9b1a41e3c40b4d41e625131cd5e2c1d8e5dd1): 2.7s - T-11 (22967a315e6f619bcbb4d01eba839868fca47bed): 3.2s - T-10 (af1c7e0fb3c5f24139307a0c5a3f199ff9a11ccd): 2.5s - T-9 (909382c875d5162ca98ef0111dd8da877dba384e): 2.8s - T-8 (56767675a84e1625759a8ac74011288075046754): 2.6s - T-7 (364c92a78cd9bfc3d922a064c69a1d830ec23662): 2.4s - T-6 (c9978755768e1f7c2e8b3df00b64da3731190228): 3.1s - T-5 (8803f81ff71856192f9a1d523eb8e2f489ecc36d): 3.7s - T-4 (627fed0c14b94377ce05668ef711afdf0aae69b3): 2.6s - T-3 (a3e629996493877ab8fb5ea29b30eb12ae3ed83a): 3.1s - T-2 (6b6f02a3e5b95e15452e4d03023ba58f90a7c896): 2.6s - T-1 (11d452bd8c4ef7a25655a4d3f2c612c68f7625ba): 2.5s - **T (current commit): 3.2s**

largeDepsNft: 9.7s

โฌ†๏ธ 22.76% increase vs. 11d452bd8c4ef7a25655a4d3f2c612c68f7625ba

^                                                          11.7s                                          
โ”‚                                                           โ”Œโ”€โ”€โ”                                          
โ”‚                                                           |  |                                          
โ”‚           9.9s                                    9.8s    |  |            9.7s                    9.7s  
โ”‚           โ”Œโ”€โ”€โ”                                    โ”Œโ”€โ”€โ”    |  |            โ”Œโ”€โ”€โ”                    โ”Œโ”€โ”€โ”  
โ”‚           |  |            8.5s                    |  |    |  |            |  |                    |โ–’โ–’|  
โ”‚ โ”€โ”€8.2sโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”Œโ”€โ”€โ”โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€8.2sโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€|โ–’โ–’|โ”€โ”€
โ”‚   โ”Œโ”€โ”€โ”    |  |    7.5s    |  |    7.8s    7.5s    |  |    |  |    โ”Œโ”€โ”€โ”    |  |    7.9s    7.5s    |โ–’โ–’|  
โ”‚   |  |    |  |    โ”Œโ”€โ”€โ”    |  |    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |  |    |  |    |  |    |  |    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    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-19 (38cde6efec37b5d60593c15810f756da8b5177e6): 8.2s - T-18 (2211f39741e1088a7c9cde0af57c9bc27108c606): 8.4s - T-17 (54b79e3c973805ed06c5ec4bc0259a122a880913): 8.4s - T-16 (87886247aa8acabd74cf76f13c3465a22bf63078): 11.2s - T-15 (27155874fa16fb54d0c00f71d1e98e2e856642c4): 8.7s - T-14 (0c76ba5d3ebfd00ce70b3bfd382bed28a6885017): 8.2s - T-13 (3092484b754b25c3635f1fb36bae0eaf8f9db6f0): 8.3s - T-12 (b5b9b1a41e3c40b4d41e625131cd5e2c1d8e5dd1): 8.2s - T-11 (22967a315e6f619bcbb4d01eba839868fca47bed): 9.9s - T-10 (af1c7e0fb3c5f24139307a0c5a3f199ff9a11ccd): 7.5s - T-9 (909382c875d5162ca98ef0111dd8da877dba384e): 8.5s - T-8 (56767675a84e1625759a8ac74011288075046754): 7.8s - T-7 (364c92a78cd9bfc3d922a064c69a1d830ec23662): 7.5s - T-6 (c9978755768e1f7c2e8b3df00b64da3731190228): 9.8s - T-5 (8803f81ff71856192f9a1d523eb8e2f489ecc36d): 11.7s - T-4 (627fed0c14b94377ce05668ef711afdf0aae69b3): 8.2s - T-3 (a3e629996493877ab8fb5ea29b30eb12ae3ed83a): 9.7s - T-2 (6b6f02a3e5b95e15452e4d03023ba58f90a7c896): 7.9s - T-1 (11d452bd8c4ef7a25655a4d3f2c612c68f7625ba): 7.5s - **T (current commit): 9.7s**

largeDepsZisi: 18.6s

โฌ†๏ธ 22.36% increase vs. 11d452bd8c4ef7a25655a4d3f2c612c68f7625ba

^                                                          22.3s                                          
โ”‚                                                           โ”Œโ”€โ”€โ”                                          
โ”‚                                                           |  |                                          
โ”‚          19.3s                                   19.3s    |  |                                   18.6s  
โ”‚           โ”Œโ”€โ”€โ”                                    โ”Œโ”€โ”€โ”    |  |           18.3s                    โ”Œโ”€โ”€โ”  
โ”‚           |  |                                    |  |    |  |            โ”Œโ”€โ”€โ”                    |โ–’โ–’|  
โ”‚ โ”€15.8sโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€16.1sโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€15.4sโ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ผโ”€โ”€โ”€15.2sโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€|โ–’โ–’|โ”€โ”€
โ”‚   โ”Œโ”€โ”€โ”    |  |    15s     โ”Œโ”€โ”€โ”   14.6s   14.9s    |  |    |  |    โ”Œโ”€โ”€โ”    |  |    โ”Œโ”€โ”€โ”   14.4s    |โ–’โ–’|  
โ”‚   |  |    |  |    โ”Œโ”€โ”€โ”    |  |    โ”Œโ”€โ”€โ”    โ”Œโ”€โ”€โ”    |  |    |  |    |  |    |  |    |  |    โ”Œโ”€โ”€โ”    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ”‚   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |โ–’โ–’|  
โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”ดโ”€โ”€>
    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-19 (38cde6efec37b5d60593c15810f756da8b5177e6): 15.8s - T-18 (2211f39741e1088a7c9cde0af57c9bc27108c606): 15.6s - T-17 (54b79e3c973805ed06c5ec4bc0259a122a880913): 16.4s - T-16 (87886247aa8acabd74cf76f13c3465a22bf63078): 21s - T-15 (27155874fa16fb54d0c00f71d1e98e2e856642c4): 16.9s - T-14 (0c76ba5d3ebfd00ce70b3bfd382bed28a6885017): 16.2s - T-13 (3092484b754b25c3635f1fb36bae0eaf8f9db6f0): 16.1s - T-12 (b5b9b1a41e3c40b4d41e625131cd5e2c1d8e5dd1): 15.8s - T-11 (22967a315e6f619bcbb4d01eba839868fca47bed): 19.3s - T-10 (af1c7e0fb3c5f24139307a0c5a3f199ff9a11ccd): 15s - T-9 (909382c875d5162ca98ef0111dd8da877dba384e): 16.1s - T-8 (56767675a84e1625759a8ac74011288075046754): 14.6s - T-7 (364c92a78cd9bfc3d922a064c69a1d830ec23662): 14.9s - T-6 (c9978755768e1f7c2e8b3df00b64da3731190228): 19.3s - T-5 (8803f81ff71856192f9a1d523eb8e2f489ecc36d): 22.3s - T-4 (627fed0c14b94377ce05668ef711afdf0aae69b3): 15.4s - T-3 (a3e629996493877ab8fb5ea29b30eb12ae3ed83a): 18.3s - T-2 (6b6f02a3e5b95e15452e4d03023ba58f90a7c896): 15.2s - T-1 (11d452bd8c4ef7a25655a4d3f2c612c68f7625ba): 14.4s - **T (current commit): 18.6s**