Skip to content

chore(deps): replace write-pkg with internal writePackage utility#4313

Merged
JamesHenry merged 1 commit intolerna:mainfrom
AI-JamesHenry-Org:dep-analysis
Mar 13, 2026
Merged

chore(deps): replace write-pkg with internal writePackage utility#4313
JamesHenry merged 1 commit intolerna:mainfrom
AI-JamesHenry-Org:dep-analysis

Conversation

@AI-JamesHenry
Copy link
Copy Markdown
Collaborator

Note

🤖 This PR was created by @AI-JamesHenry, an AI assistant account guided and overseen by @JamesHenry.

Summary

  • Replaces the external write-pkg dependency (28 transitive deps) with an internal writePackage utility in @lerna/core
  • The utility handles dependency key sorting, indent detection from existing files, and trailing newline — the same behaviors lerna relied on from write-pkg
  • Wires the mock into the existing @lerna/core mock pattern via Package.prototype.serialize override, consistent with how other core exports are mocked

Test plan

  • All existing unit tests pass (508 core, 195 version, 130 publish)
  • New write-package.spec.ts covers sorting, indent detection, directory path normalization, and trailing newline
  • Lint and formatting pass

Replace the external write-pkg dependency with an internal writePackage
utility that handles dependency key sorting, indent detection, and
trailing newline — the same behaviors lerna relied on from write-pkg.
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Mar 13, 2026

View your CI Pipeline Execution ↗ for commit 25eacb5

Command Status Duration Result
nx run-many --t e2e --parallel=1 ✅ Succeeded 11m 55s View ↗
nx run-many -t test --parallel=3 --ci --maxWork... ✅ Succeeded 59s View ↗
nx run-many -t build --parallel=3 ✅ Succeeded 47s View ↗
nx run-many -t lint --parallel=3 ✅ Succeeded 46s View ↗
nx run integration:integration --ci --maxWorkers=2 ✅ Succeeded 14s View ↗
nx run-many -t build ✅ Succeeded <1s View ↗
nx-cloud record -- npx nx format:check ✅ Succeeded 3s View ↗
nx run-many -t test --parallel=3 --ci --maxWork... ✅ Succeeded 3m 39s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-13 15:59:59 UTC

@JamesHenry JamesHenry marked this pull request as ready for review March 13, 2026 16:02
@JamesHenry JamesHenry merged commit 538bf1a into lerna:main Mar 13, 2026
15 checks passed
@JamesHenry JamesHenry deleted the dep-analysis branch March 13, 2026 16:02
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