Skip to content

👷 replace lerna publish with yarn npm publish#4276

Draft
BenoitZugmeyer wants to merge 4 commits intomainfrom
benoit/prepare-lerna-removal
Draft

👷 replace lerna publish with yarn npm publish#4276
BenoitZugmeyer wants to merge 4 commits intomainfrom
benoit/prepare-lerna-removal

Conversation

@BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Mar 4, 2026

This is a follow-up of #4275

Motivation

Second step toward removing lerna from the project. This PR replaces lerna publish with
yarn workspaces foreach npm publish, and switches package file inclusion from .npmignore
to the files field in package.json for reliable yarn-compatible packaging.

Changes

The publish script now uses yarn workspaces foreach npm publish with YARN_NPM_AUTH_TOKEN
for authentication, and gains a --dry-run option. The old lerna-based script is preserved
as publish-npm-legacy.ts as a fallback. The check-packages.ts script is updated to use
yarn pack for dry-run validation, and now also verifies that packed files match the files
field. All public packages gain a files field (replacing .npmignore) and a LICENSE
symlink so the license is included in published tarballs.

Test instructions

  • Run node scripts/deploy/publish-npm.ts --dry-run — should list files that would be published without actually publishing
  • Run node scripts/check-packages.ts — should pass without errors

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/prepare-lerna-removal branch 2 times, most recently from 2bc8233 to ce5cfa2 Compare March 4, 2026 14:40
@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Mar 4, 2026

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 175.00 KiB 175.00 KiB 0 B 0.00%
Rum Profiler 6.16 KiB 6.16 KiB 0 B 0.00%
Rum Recorder 27.46 KiB 27.46 KiB 0 B 0.00%
Logs 56.80 KiB 56.80 KiB 0 B 0.00%
Flagging 944 B 944 B 0 B 0.00%
Rum Slim 130.64 KiB 130.64 KiB 0 B 0.00%
Worker 23.63 KiB 23.63 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base CPU Time (ms) Local CPU Time (ms) 𝚫%
RUM - add global context 0.0046 0.0061 +32.61%
RUM - add action 0.0127 0.0173 +36.22%
RUM - add error 0.0135 0.0147 +8.89%
RUM - add timing 0.0025 0.0033 +32.00%
RUM - start view 0.0122 0.0157 +28.69%
RUM - start/stop session replay recording 0.0007 0.0008 +14.29%
Logs - log message 0.0144 0.0202 +40.28%
🧠 Memory Performance
Action Name Base Memory Consumption Local Memory Consumption 𝚫
RUM - add global context 27.37 KiB 26.68 KiB -705 B
RUM - add action 53.07 KiB 52.15 KiB -942 B
RUM - add timing 25.97 KiB 26.33 KiB +373 B
RUM - add error 55.69 KiB 55.25 KiB -450 B
RUM - start/stop session replay recording 25.52 KiB 25.39 KiB -136 B
RUM - start view 462.52 KiB 461.86 KiB -679 B
Logs - log message 44.79 KiB 44.56 KiB -237 B

🔗 RealWorld

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 4, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 77.21% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8851870 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/prepare-lerna-removal branch 2 times, most recently from aca9fd3 to abc9601 Compare March 4, 2026 16:30
Base automatically changed from benoit/prepare-release to main March 5, 2026 14:01
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/prepare-lerna-removal branch from abc9601 to c9b94d1 Compare March 5, 2026 16:49
Uses YARN_NPM_AUTH_TOKEN instead of writing to .npmrc, and adds a
--dry-run option. The legacy lerna-based script is kept as
publish-npm-legacy.ts with a corresponding manual CI job as a fallback.
Contrary to lerna, yarn does not include LICENSE files in packages out
of the box.
.npmignore re-exclusion after negation didn't work with yarn pack,
causing spec files to be included in published packages.
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/prepare-lerna-removal branch from c9b94d1 to 8851870 Compare March 13, 2026 13:51
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.

1 participant