Skip to content

fix: deep-sort publishConfig with the same field order as package.json#94

Merged
Boshen merged 1 commit into
mainfrom
fix/publish-config-deep-sort
May 8, 2026
Merged

fix: deep-sort publishConfig with the same field order as package.json#94
Boshen merged 1 commit into
mainfrom
fix/publish-config-deep-sort

Conversation

@Boshen
Copy link
Copy Markdown
Member

@Boshen Boshen commented May 8, 2026

Summary

  • Closes publishConfig should be ordered with the same order of main package.json #71.
  • publishConfig now recurses through sort_object_keys, so its fields follow the canonical package.json order (e.g. namemaintypesdependencies → unknown fields alphabetically) instead of a flat alphabetical sort.
  • Fixture and snapshot expanded to exercise the new behavior with name, main, types, tag, and a nested dependencies.

🤖 Generated with Claude Code

Closes #71. publishConfig overrides a subset of package.json fields at
publish time, so it should follow the same canonical field ordering
rather than a flat alphabetical sort.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 8, 2026

Merging this PR will degrade performance by 4.98%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 2 regressed benchmarks
✅ 2 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
sort already sorted package.json 174.7 µs 183.1 µs -4.56%
sort small package.json 177.2 µs 186.5 µs -4.98%

Comparing fix/publish-config-deep-sort (2a24bfa) with main (a8840ff)

Open in CodSpeed

@Boshen Boshen merged commit 103dafd into main May 8, 2026
4 of 5 checks passed
@Boshen Boshen deleted the fix/publish-config-deep-sort branch May 8, 2026 12:06
@oxc-guard oxc-guard Bot mentioned this pull request May 8, 2026
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.

publishConfig should be ordered with the same order of main package.json

1 participant