Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

feat: expose the api version in the results #1460

Merged
merged 2 commits into from
Jun 13, 2023
Merged

feat: expose the api version in the results #1460

merged 2 commits into from
Jun 13, 2023

Conversation

danez
Copy link
Contributor

@danez danez commented Jun 12, 2023

Summary

Expose the property runtimeAPIVersion in the result of zip* and list* methods

This property has multiple meanings:

  • list*
    • undefined: we do not know, because we did not check/parse the file or there was a parsing error
    • 2: we detected version 2
    • 1: not detected version 2
  • zip*
    • undefined: something went wrong, parsing error etc.
    • 2: we detected version 2
    • 1: not detected version 2

The diff is best viewed with whitespace diffing off :D

@danez danez self-assigned this Jun 12, 2023
@danez danez requested a review from a team as a code owner June 12, 2023 14:55
@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2023

⏱ Benchmark results

Comparing with 418a420

largeDepsEsbuild: 2.9s

⬇️ 4.54% decrease vs. 418a420

^                                                           3.5s                                          
│                                                           ┌──┐                                          
│                                                           |  |                                          
│   2.9s                                                    |  |                             3s           
│   ┌──┐                                    2.9s            |  |                            ┌──┐    2.9s  
│   |  |                    2.7s            ┌──┐    2.6s    |  |    2.6s    2.6s            |  |    ┌──┐  
│ ──┼──┼────2.4s────────────┌──┐────────────┼──┼────┌──┐────┼──┼────┌──┐────┌──┐────2.5s────┼──┼────|▒▒|──
│   |  |    ┌──┐            |  |            |  |    |  |    |  |    |  |    |  |    ┌──┐    |  |    |▒▒|  
│   |  |    |  |     2s     |  |     2s     |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    ┌──┐    |  |    ┌──┐    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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

largeDepsNft: 9.4s

⬇️ 1.34% decrease vs. 418a420

^                                                          12.1s                                          
│                                                           ┌──┐                                          
│  10.9s                                                    |  |                                          
│   ┌──┐                    10s            10.6s            |  |                                          
│   |  |                    ┌──┐            ┌──┐            |  |                            9.6s    9.4s  
│   |  |    8.7s            |  |            |  |            |  |                            ┌──┐    ┌──┐  
│ ──┼──┼────┌──┐────────────┼──┼────────────┼──┼────────────┼──┼────────────────────────────┼──┼────|▒▒|──
│   |  |    |  |            |  |            |  |    8.1s    |  |     8s     8.1s    8.1s    |  |    |▒▒|  
│   |  |    |  |    7.1s    |  |            |  |    ┌──┐    |  |    ┌──┐    ┌──┐    ┌──┐    |  |    |▒▒|  
│   |  |    |  |    ┌──┐    |  |    6.9s    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    ┌──┐    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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

largeDepsZisi: 18.1s

⬇️ 3.15% decrease vs. 418a420

^                                                          22.5s                                          
│                                                           ┌──┐                                          
│  20.4s                                   20.5s            |  |                                          
│   ┌──┐                   18.7s            ┌──┐            |  |                           18.7s          
│   |  |                    ┌──┐            |  |            |  |                            ┌──┐   18.1s  
│ ──┼──┼───17.4s────────────┼──┼────────────┼──┼────────────┼──┼────────────────────────────┼──┼────┌──┐──
│   |  |    ┌──┐            |  |            |  |   15.9s    |  |    16s     16s    16.2s    |  |    |▒▒|  
│   |  |    |  |   14.1s    |  |            |  |    ┌──┐    |  |    ┌──┐    ┌──┐    ┌──┐    |  |    |▒▒|  
│   |  |    |  |    ┌──┐    |  |    14s     |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    ┌──┐    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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


Which exact runtime this function should be using. (e.g. `nodejs18.x`). This value is detected based on the input
`nodeVersion`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the only two actual changes in this file, the rest is formatting from prettier.

runtimeVersion was introduced in #1367, but never documented

schedule: inSourceConfig?.schedule ?? config.schedule,
generator: config.generator,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorting + runtimeAPIVersion added :)

Copy link
Contributor

@Skn0tt Skn0tt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, especially the broad test coverage! Left a small comment.

src/utils/format_result.ts Show resolved Hide resolved
@danez danez merged commit bae1ee5 into main Jun 13, 2023
@danez danez deleted the apiversion branch June 13, 2023 09:22
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants