Repository navigation
chore(deps): replace lerna with nx - #315
Merged
jsteinich merged 1 commit intoJul 9, 2026
Merged
Conversation
X-Guardian
force-pushed
the
chore/replace-lerna-with-nx
branch
from
July 7, 2026 15:01
98d4e6b to
febb992
Compare
X-Guardian
marked this pull request as ready for review
July 7, 2026 15:51
jsteinich
approved these changes
Jul 9, 2026
so0k
pushed a commit
that referenced
this pull request
Aug 7, 2026
🤖 Release PR — merge to cut a new release. Kept open and rebased as commits land on `main`. --- <details><summary>0.24.0</summary> ## [0.24.0](v0.23.4...v0.24.0) (2026-08-06) ### ⚠ BREAKING CHANGES * **lib:** validate Terraform function versions by default ([#362](#362)) * **deps:** Require Node 22 minimum ([#345](#345)) * **lib:** preserve symlinks in TerraformAsset walkers ([#321](#321)) * **cli:** replace node-fetch with undici ([#306](#306)) ### Features * **lib:** canonical asset hashes behind the canonicalAssetHashes feature flag ([#323](#323)) ([76dd4ff](76dd4ff)) * **lib:** validate Terraform function versions by default ([#362](#362)) ([4ac0736](4ac0736)) * support newer provider plugin-protocol features via targetVersions (RFC-04) ([#296](#296)) ([90322f9](90322f9)) ### Bug Fixes * **cli:** don't downgrade prebuilt providers on a transient registry failure ([#298](#298)) ([a960c5c](a960c5c)) * **cli:** include dev dependencies in npm version lookup ([#280](#280)) ([955204a](955204a)) * **docs:** fix stale constructs pin breaking with()/IMixin docs ([#305](#305)) ([605cf63](605cf63)) * **gha:** Allow pnpm to update the lockfile after package updates ([#318](#318)) ([a899b7c](a899b7c)) * **gha:** Fix pnpm upgrade workflow ([#335](#335)) ([e1a69fc](e1a69fc)) * **gha:** flip merged release PR label to autorelease: tagged ([#302](#302)) ([8d64f6c](8d64f6c)) * **gha:** mint the Go-publish token from the CDKTN Maintainers app ([#369](#369)) ([71921ce](71921ce)) * **gha:** mint the Go-publish token from the open-constructs-cdktn App ([#368](#368)) ([179f10c](179f10c)) * **gha:** pass the Go-publish App token as x-access-token userinfo ([#370](#370)) ([4e3ff19](4e3ff19)) * **lib:** Disallow constructs 10.8 until support can be added ([#363](#363)) ([8bdae0d](8bdae0d)) * **lib:** preserve symlinks in TerraformAsset walkers ([#321](#321)) ([6360e20](6360e20)) * typo in `moveFromId` JSDoc ([#355](#355)) ([e1cf8ce](e1cf8ce)) ### Miscellaneous Chores * **cli:** replace Ink + React with smaller-tree CLI libraries ([#264](#264)) ([a6aff7e](a6aff7e)) * **cli:** replace node-fetch with undici ([#306](#306)) ([1317141](1317141)) * **deps:** bump glob to 13.0.6 ([#307](#307)) ([47ee2bb](47ee2bb)) * **deps:** bump the github-actions-backward-compatible group with 2 updates ([#295](#295)) ([eab2a01](eab2a01)) * **deps:** replace lerna with nx ([#315](#315)) ([94999fc](94999fc)) * **deps:** Require Node 22 minimum ([#345](#345)) ([2bf315d](2bf315d)) * **deps:** update ci-info to 4.4.0 across all packages ([#329](#329)) ([557a163](557a163)) * **deps:** update fs-extra to 11.3.6 across all packages ([#328](#328)) ([95753a9](95753a9)) * **deps:** update minimatch to 10.2.5 ([#330](#330)) ([d1c1c53](d1c1c53)) * **deps:** Update sscaff to v2.0.388 ([#331](#331)) ([38ea0ba](38ea0ba)) * **deps:** Update zod to v4.4.3 ([#332](#332)) ([c10ee35](c10ee35)) * **deps:** Upgrade dependencies ([#347](#347)) ([45d3a66](45d3a66)) * remove cdktf from tests ([#277](#277)) ([dc9a8e9](dc9a8e9)) * ship Terraform 1.15.8 in the jsii-terraform image ([#367](#367)) ([deaa9b0](deaa9b0)) * Upgrade dependencies for lib ([#348](#348)) ([d616f17](d616f17)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: open-constructs-cdktn[bot] <291052431+open-constructs-cdktn[bot]@users.noreply.github.com>
Contributor
|
I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The repo already uses nx as its task runner for
test,lint, and the affected-graph, but still depends on lerna for a handful of orchestration and release chores. This PR removes lerna entirely and routes those chores through nx, then converts the touched shell scripts to ESM Node.Lerna → nx command mapping:
lerna run --scope <glob> <target>→nx run-many -t <target> -p <glob>(rootbuild,package*,watch,dist-cleanscripts).lerna exec --scope <glob> -- <cmd>→nx exec -p <glob> -- <cmd>(link-packages, and thencuruns inpnpm-upgrade.yml).lerna ls -p(absolute package paths) →pnpm --recursive exec pwd.lerna list --all --json/lerna ls --all --json(only the package names were used) →nx show projects --json.lerna version <v>→nx release version <v>. This needs areleaseblock innx.json(fixed release group ofcdktn,cdktn-cli,@cdktn/*); the command is run with--git-commit/tag/push=false --stage-changes=falseso it only rewrites versions on disk, matching the old--no-git-tag-version --no-pushbehaviour.Other Changes
Dead code deleted rather than converted (both were unreferenced — nothing in the repo or CI invoked them):
tools/build-unit-test-matrix.sh— the unit workflows build their matrix inline vianx show projects --affected; this script was orphaned.tools/setup-prebuild-provider-folder.sh— a manual utility that scaffolded a workspace of clonedhashicorp/*provider repos, which are no longer the canonical source.Shell/batch scripts converted to ESM Node (
.mjs), per the repo's preference for JS ESM tooling:tools/align-version.sh→tools/align-version.mjs. Also drops a deadjqloop that rewrote0.0.0peerDependencies — the only internal peerDep iscdktn: workspace:*, which jsii-pacmak resolves to a concrete version at pack time (verified against the built tarball), so the loop matched nothing.tools/collect-dist.shandtools/collect-dist.bat→ a single cross-platformtools/collect-dist.mjs(usesfs.cpSync(..., { dereference: true })for thersync -aLbehaviour; verified byte-identical output to the old script). The.batwas still callinglerna ls -p, so this also removes the last stray lerna reference.package-windowsnow runs the same.mjsas every other platform.tools/build-example.js→tools/build-example.mjs(CJSrequire/__dirname→ ESM). This leaves no CommonJS in top-leveltools/.Lint coverage for
tools/: the rooteslint.config.mjsignores all**/*.jsand**/*.mjs, and ESLint flat config does not auto-discover nested config files — so the top-leveltools/scripts were never linted (per-project linting only works because nx invokes ESLint per project). Addedtools/project.json(@tools/scripts) so nx infers alinttarget and the scripts are picked up bynx run-many -t lint, plustools/eslint.config.mjsthat lints them as plain ESM JavaScript (no type-aware TS parsing) and defers to the nestedtools/*projects for their own files.Callers updated:
release.yml,unit.yml,pr-unit.yml,examples.yml,pnpm-upgrade.yml,CONTRIBUTING.md, anddocs/release-please.md. Stale!tools/*.jsnegations in.gitignore/.prettierignoreare dropped (the.mjsreplacements aren't caught by the*.jsignore, so they need no negation).Checklist