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

fix: sort dependencies in .output/package.json #1708

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

jenjen75
Copy link
Contributor

@jenjen75 jenjen75 commented Sep 8, 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

It is critical to keep package.json consistent on each building. Some CI/CD, like Docker, shines when caching layer is defined to prevent a heavy-low compilation time. The problem is at each building, package.json is inconsistent (version 2.6.3).

In the generation, sort and localeCompare are called, but the comparison is evaluated only for the first char of each key.
This PR solve the problem, to compare each string instead of each char.

Thank you

πŸ“ Checklist

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

@pi0 pi0 changed the title fix(package.json): sorting depedencies fix: sort dependencies in .output/package.json Sep 8, 2023
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Merging #1708 (a617c26) into main (11a2412) will decrease coverage by 0.11%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main    #1708      +/-   ##
==========================================
- Coverage   77.29%   77.19%   -0.11%     
==========================================
  Files          75       75              
  Lines        7893     7893              
  Branches      805      801       -4     
==========================================
- Hits         6101     6093       -8     
- Misses       1790     1797       +7     
- Partials        2        3       +1     
Files Changed Coverage Ξ”
src/presets/firebase.ts 23.52% <0.00%> (ΓΈ)
src/rollup/plugins/externals.ts 92.26% <100.00%> (-0.74%) ⬇️

... and 1 file with indirect coverage changes

@pi0 pi0 merged commit 6b5f1d1 into unjs:main Sep 8, 2023
7 of 8 checks passed
@pi0 pi0 mentioned this pull request Oct 5, 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.

None yet

2 participants