Skip to content
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

feat: support framework config #1843

Merged
merged 3 commits into from
Nov 12, 2023
Merged

feat: support framework config #1843

merged 3 commits into from
Nov 12, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Oct 20, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This adds a new advanced framework configuration allowing meta-frameworks such as Nuxt to declare their meta-data that can be passed to the underlying presets or reflect nitro behavior when needed. The default is framework: { name: 'nitro', version } when using nitro CLI/API directly.

Update: Draft status is to check if we might need "multi" framework information (having version info about both nitro and nuxt for example)

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 requested a review from danielroe October 20, 2023 12:57
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

Merging #1843 (f390a3e) into main (e8fa771) will increase coverage by 0.46%.
Report is 13 commits behind head on main.
The diff coverage is 100.00%.

❗ Current head f390a3e differs from pull request most recent head 0304bf5. Consider uploading reports for the commit 0304bf5 to get more accurate results

@@            Coverage Diff             @@
##             main    #1843      +/-   ##
==========================================
+ Coverage   51.94%   52.40%   +0.46%     
==========================================
  Files         174      170       -4     
  Lines       12035    11790     -245     
  Branches      913      907       -6     
==========================================
- Hits         6252     6179      -73     
+ Misses       5686     5515     -171     
+ Partials       97       96       -1     
Files Coverage Ξ”
src/options.ts 96.40% <100.00%> (+0.04%) ⬆️
src/types/nitro.ts 100.00% <100.00%> (ΓΈ)

... and 15 files with indirect coverage changes

@pi0 pi0 marked this pull request as draft October 20, 2023 13:12
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Nice idea! What are you thinking that presets will do with this info? I'm sure you've thought about it, but is there a danger that this ends up coupling Nitro presets too closely to upstream frameworks?

@pi0
Copy link
Member Author

pi0 commented Oct 20, 2023

I think the main reason would be displaying info in output meta. I also agree that there should be absolutely no differences when coupled with an upstream framework to have a platform behavior other than displaying.

@pi0 pi0 marked this pull request as ready for review November 12, 2023 20:14
@pi0 pi0 merged commit 786d3f8 into main Nov 12, 2023
3 of 5 checks passed
@pi0 pi0 deleted the feat/fw-info branch November 12, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants