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

refactor: rename build option to static #1144

Merged
merged 4 commits into from
Apr 16, 2023
Merged

refactor: rename build option to static #1144

merged 4 commits into from
Apr 16, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Apr 15, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 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)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

rename build option (unreleased) to static for better readability of the option purpose.

πŸ“ Checklist

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

@danielroe
Copy link
Member

I still think it's better to use build as that more precisely covers what will and won't happen when enabling the option. I think we might possibly have a preset that isn't fully static but doesn't want the normal nitro build to take place.

@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Merging #1144 (9649ed8) into main (e656948) will decrease coverage by 0.03%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##             main    #1144      +/-   ##
==========================================
- Coverage   67.71%   67.69%   -0.03%     
==========================================
  Files          66       66              
  Lines        6493     6492       -1     
  Branches      718      718              
==========================================
- Hits         4397     4395       -2     
- Misses       2081     2082       +1     
  Partials       15       15              
Impacted Files Coverage Ξ”
src/options.ts 87.39% <50.00%> (-0.31%) ⬇️
src/build.ts 42.27% <100.00%> (ΓΈ)
src/presets/netlify.ts 56.98% <100.00%> (ΓΈ)
src/presets/static.ts 100.00% <100.00%> (ΓΈ)
src/presets/vercel.ts 76.61% <100.00%> (ΓΈ)
src/types/nitro.ts 100.00% <100.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pi0
Copy link
Member Author

pi0 commented Apr 16, 2023

I agree about your perspective way of thinking @danielroe. My main reason for making this change is because nitro normally is supposed to build and this flag is similar to dev for a special running mode. We don't build because we are in static mode and i can't think of any other use cases that do not want to build. Also if we infer static mode from build: false for other purposes like for prepare mode, it can make wrong results. We don't want static behavior adjustments for other modes.

In the end, we might introduce back the build flag also in the future if there were common usecase. (also enable build when static set...)

@pi0 pi0 merged commit 4108efd into main Apr 16, 2023
@pi0 pi0 deleted the refactor/static branch April 16, 2023 12:46
@pi0 pi0 mentioned this pull request Apr 28, 2023
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