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(externals): sort bundledDependencies keys in output package.json #967

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Feb 20, 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

This reduces change between two builds of the same package. It's quite a minor change but can help ensure reproducible nitro builds.

πŸ“ Checklist

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

@danielroe danielroe added the bug Something isn't working label Feb 20, 2023
@danielroe danielroe requested a review from pi0 February 20, 2023 23:43
@danielroe danielroe self-assigned this Feb 20, 2023
@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Merging #967 (ab773dc) into main (8f76db8) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main     #967      +/-   ##
==========================================
- Coverage   67.34%   67.34%   -0.01%     
==========================================
  Files          60       60              
  Lines        6073     6072       -1     
  Branches      680      681       +1     
==========================================
- Hits         4090     4089       -1     
  Misses       1974     1974              
  Partials        9        9              
Impacted Files Coverage Ξ”
src/rollup/plugins/externals-legacy.ts 6.80% <0.00%> (ΓΈ)
src/rollup/plugins/externals.ts 94.31% <100.00%> (-0.02%) ⬇️

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

pi0 commented Feb 21, 2023

Keys order are expected to remain as is from original package. Is there a more specific reason doing this?

@danielroe
Copy link
Member Author

danielroe commented Feb 21, 2023

When I run the same build more than once, these keys are reordered, so this is not currently deterministic. That makes me think that they are not remaining as-is.

@pi0
Copy link
Member

pi0 commented Feb 21, 2023

LGTM. Only note that we might probably drop bundledDependencies property it was mainly for debugging purposes but also to introduce new manifest file in top level .output containing timestamp of build time.

I wish knew more about initiatives behind this PR...

@pi0 pi0 changed the title fix(externals): sort keys in generated package.json refactor(externals): sort bundledDependencies keys in output package.json Feb 21, 2023
@pi0 pi0 merged commit 9bbf667 into main Feb 21, 2023
@pi0 pi0 deleted the fix/sort-pkg-json branch February 21, 2023 11:08
@danielroe
Copy link
Member Author

I wish knew more about initiatives behind this PR...

I was debugging a bundle size diff for a renovate update PR and spotted the discrepancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants