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

feat: convert Runtime, NodeBundler and ModuleFormat to enums #1179

Merged
merged 2 commits into from
Aug 17, 2022
Merged

Conversation

danez
Copy link
Contributor

@danez danez commented Aug 16, 2022

🎉 Thanks for submitting a pull request! 🎉

Summary

This is split out from #1173

This contains only the change to use enums for Runtime, Bundler, and ModuleFormat.

To be very semver correct, I marked this as breaking, because if someone uses this with typescript the update will be breaking for the types.

BREAKING CHANGE: When using zip-it-and-ship-it with TS the types for the config and some return
types changed. `nodeBundler` in the config, `moduleFormat` and `runtime` in return objects are
now also enums. These const enums are exported in the main entry point for your use.
@danez danez added type: feature code contributing to the implementation of a feature and/or user facing functionality area: typescript labels Aug 16, 2022
@danez danez self-assigned this Aug 16, 2022
@danez danez requested a review from a team August 16, 2022 08:41
@github-actions
Copy link
Contributor

github-actions bot commented Aug 16, 2022

⏱ Benchmark results

Comparing with 850404d

largeDepsEsbuild: 5.9s

⬇️ 2.09% decrease vs. 850404d

^   6.6s                          
│   ┌──┐                          
│ ──┼──┼────6.1s─────6s─────5.9s──
│   |  |    ┌──┐    ┌──┐    ┌──┐  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴──>
    T-3     T-2     T-1      T    
Legend

largeDepsNft: 27.6s

⬆️ 0.03% increase vs. 850404d

^  30.7s                          
│   ┌──┐                          
│ ──┼──┼───────────27.6s───27.6s──
│   |  |            ┌──┐    ┌──┐  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |            |  |    |▒▒|  
│   |  |    n/a     |  |    |▒▒|  
└───┴──┴────────────┴──┴────┴──┴──>
    T-3     T-2     T-1      T    
Legend

largeDepsZisi: 43s

⬆️ 0.97% increase vs. 850404d

^  45.5s   45.4s                  
│   ┌──┐    ┌──┐   42.5s    43s   
│ ──┼──┼────┼──┼────┌──┐────┌──┐──
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴──>
    T-3     T-2     T-1      T    
Legend

Copy link
Member

@eduardoboucas eduardoboucas left a comment

Choose a reason for hiding this comment

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

Nice! ✨

@kodiakhq kodiakhq bot merged commit b472a84 into main Aug 17, 2022
@kodiakhq kodiakhq bot deleted the enums branch August 17, 2022 08:57
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
…/zip-it-and-ship-it#1179)

BREAKING CHANGE: When using zip-it-and-ship-it with TS the types for the config and some return
types changed. `nodeBundler` in the config, `moduleFormat` and `runtime` in return objects are
now also enums. These const enums are exported in the main entry point for your use.

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants