Skip to content

chore(ci): Move monorepo to nx#19325

Merged
chargome merged 23 commits intodevelopfrom
cg/lerna-bye
Feb 17, 2026
Merged

chore(ci): Move monorepo to nx#19325
chargome merged 23 commits intodevelopfrom
cg/lerna-bye

Conversation

@chargome
Copy link
Member

@chargome chargome commented Feb 13, 2026

  • Replace lerna with Nx for all monorepo task execution (lerna runnx run-many). Lerna was already using Nx under the hood, so this removes the wrapper layer and uses Nx directly.
  • Replace lerna version with a custom scripts/bump-version.js for release version bumping. The script replicates lerna version --force-publish --exact --no-git-tag-version --no-push – bumps all workspace package versions and updates internal dependency references to exact versions. Also added some unit tests.
  • Remove lerna dependency (lerna.json, lerna devDependency) and add nx as a direct devDependency (22.5.0).
  • Move lockfile stability check to its own CI jo (job_check_lockfile) that runs in parallel with the build.
  • Configure Nx TUI to auto-exit so yarn build doesn't hang waiting for ESC.
  • Adds a .version.json as a single source of truth for the current version (this works well with triggering gitflow)
  • Update docs (CLAUDE.md, CONTRIBUTING.md, .cursor/rules) to reflect the migration.

Closes #19340 (added automatically)

@chargome chargome self-assigned this Feb 13, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 9,336 - 9,059 +3%
GET With Sentry 1,611 17% 1,586 +2%
GET With Sentry (error only) 5,976 64% 6,061 -1%
POST Baseline 1,190 - 1,185 +0%
POST With Sentry 569 48% 577 -1%
POST With Sentry (error only) 1,039 87% 1,045 -1%
MYSQL Baseline 3,263 - 3,245 +1%
MYSQL With Sentry 476 15% 444 +7%
MYSQL With Sentry (error only) 2,649 81% 2,635 +1%

View base workflow run

@chargome chargome marked this pull request as ready for review February 16, 2026 13:10
chargome added a commit to getsentry/rrweb that referenced this pull request Mar 25, 2026
Remove lerna and replace its two uses with lighter alternatives:

- **`lerna version`** → `scripts/bump-version.js` — a ~80-line Node
script that updates all workspace `package.json` versions and
`@sentry-internal/*` cross-references to the exact new version. Modeled
after
[sentry-javascript#19325](getsentry/sentry-javascript#19325).
- **`lerna run build:tarball`** → `turbo run build:tarball` — Turborepo
is already used for all other cross-package tasks.

Lerna was pulling in a large transitive dependency tree including
packages with known vulnerabilities. This removes ~2,300 lines from
`yarn.lock`.

### Dependabot alerts resolved

**Fully resolved** (vulnerable package completely removed from
lockfile):

| Alert | Severity | Package | Summary |
|-------|----------|---------|---------|
| #217 | HIGH | `tar` | Symlink Path Traversal via Drive-Relative
Linkpath |
| #216 | HIGH | `tar` | Hardlink Path Traversal via Drive-Relative
Linkpath |
| #185 | HIGH | `tar` | Arbitrary File Read/Write via Hardlink Target
Escape Through Symlink Chain |
| #176 | HIGH | `tar` | Arbitrary File Creation/Overwrite via Hardlink
Path Traversal |
| #174 | HIGH | `tar` | Race Condition via Unicode Ligature Collisions
on macOS APFS |
| #172 | HIGH | `tar` | Arbitrary File Overwrite and Symlink Poisoning
via Insufficient Path Sanitization |
| #137 | HIGH | `axios` | SSRF and Credential Leakage via Absolute URL |

**Partially resolved** (some vulnerable entries removed, but the package
still exists via other dependency chains):

| Alert | Severity | Package | Remaining source |
|-------|----------|---------|-----------------|
| #213, #208, #207, #205 | HIGH | `minimatch` | `markdownlint-cli`,
`vite-plugin-dts` still pull in vulnerable versions |
| #161 | HIGH | `glob` | `markdownlint-cli`, `web-ext-run` still pull in
vulnerable versions |
| #136, #135 | CRITICAL | `form-data` | `jest` (via jsdom) still pulls
in `form-data@3.0.2` |
| #158, #157 | MEDIUM | `js-yaml` | `@changesets/cli`, `jest` still pull
in `js-yaml@3.14.1` |

The partially resolved alerts will be addressed in later phases (Phase
6: mop up remaining — bumping `markdownlint-cli`, `@changesets/cli`,
`jest`/rrvideo, etc.).

Part of the ongoing effort to resolve all Dependabot alerts on this
repo.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

chore(ci): Move monorepo to nx

4 participants