Skip to content

Commit 5c0b9bd

Browse files
authored
chore: migrate from lerna to lerna-lite and remove nx (#1988)
## Summary Migrate the monorepo tooling from `lerna` to `lerna-lite` and drop the `nx` dependency. This reduces install size and removes the unused `nx.json` configuration while keeping the existing workspace commands working. - lerna/lerna#4055 ## Changes - Replace `lerna` with `lerna-lite` in `package.json` - Remove `nx` and `nx.json` - Update `pnpm-workspace.yaml` and regenerate `pnpm-lock.yaml` ## Breaking Changes None. ## Test Plan - [ ] CI passes (build, test, lint) - [ ] `pnpm install` resolves cleanly - [ ] Workspace scripts driven via lerna-lite still execute as expected
1 parent cd785ef commit 5c0b9bd

5 files changed

Lines changed: 1261 additions & 2003 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
cache: "pnpm"
2626
- name: Install
2727
run: pnpm install
28+
- name: Build
29+
run: pnpm run build
2830
- name: Test
2931
run: pnpm test
3032
- name: Test Examples

nx.json

Lines changed: 0 additions & 54 deletions
This file was deleted.

package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "root",
33
"private": true,
44
"scripts": {
5-
"build": "lerna run build",
5+
"build": "pnpm -r run build",
66
"ci:release": "lerna publish from-package --yes",
77
"ci:versionup:major": "lerna version major --no-push --no-git-tag-version --yes && pnpm run commit-version",
88
"ci:versionup:minor": "lerna version minor --no-push --no-git-tag-version --yes && pnpm run commit-version",
99
"ci:versionup:patch": "lerna version patch --no-push --no-git-tag-version --yes && pnpm run commit-version",
10-
"clean": "lerna run clean",
10+
"clean": "pnpm -r run clean",
1111
"commit-version": "git add . && git commit -m \"chore(release): v`node -p 'require(\"./lerna.json\").version'`\"",
1212
"eslint": "eslint --cache \"packages/**/{src,test}/**/*.{js,ts}\"",
1313
"eslint:fix": "eslint --fix --cache \"packages/**/{src,test}/**/*.{js,ts}\"",
@@ -19,16 +19,16 @@
1919
"release": "lerna publish from-package",
2020
"test": "npm-run-all --parallel lint test:projectReferences test:packages",
2121
"test:all": "npm-run-all test test:examples test:integration test:docs",
22-
"test:docs": "lerna run test --scope textlint-website",
23-
"test:examples": "lerna run test:ci --scope textlint-example-*",
24-
"test:integration": "lerna run test --scope integration-test",
25-
"test:packages": "lerna run test --ignore integration-test --ignore textlint-example-* --ignore textlint-script-* --ignore textlint-website",
22+
"test:docs": "pnpm --filter textlint-website run test",
23+
"test:examples": "pnpm --filter \"textlint-example-*\" run test:ci",
24+
"test:integration": "pnpm --filter integration-test run test",
25+
"test:packages": "pnpm --filter \"!root\" --filter \"!integration-test\" --filter \"!textlint-example-*\" --filter \"!textlint-scripts-*\" --filter \"!textlint-website\" -r run test",
2626
"test:projectReferences": "workspaces-to-typescript-project-references --includesRoot --check",
2727
"type-check": "tsc -b .",
2828
"update:projectReferences": "workspaces-to-typescript-project-references --includesRoot ",
29-
"updateSnapshot": "lerna run updateSnapshot",
29+
"updateSnapshot": "pnpm -r run updateSnapshot",
3030
"versionup": "lerna version",
31-
"website": "pnpm run build && lerna run build --scope textlint-website"
31+
"website": "pnpm run build && pnpm --filter textlint-website run build"
3232
},
3333
"lint-staged": {
3434
"*.{js,jsx,ts,tsx,css}": [
@@ -43,14 +43,16 @@
4343
},
4444
"devDependencies": {
4545
"@eslint/js": "^9.39.4",
46+
"@lerna-lite/cli": "^4.11.5",
47+
"@lerna-lite/publish": "^4.11.5",
48+
"@lerna-lite/version": "^4.11.5",
4649
"@monorepo-utils/workspaces-to-typescript-project-references": "^2.11.0",
4750
"@typescript-eslint/eslint-plugin": "^8.58.0",
4851
"@typescript-eslint/parser": "^8.58.0",
4952
"ajv": "^8.18.0",
5053
"eslint": "^9.0.0",
5154
"eslint-config-prettier": "^10.1.8",
5255
"globals": "^16.5.0",
53-
"lerna": "^9.0.7",
5456
"lint-staged": "^16.4.0",
5557
"npm-run-all2": "^8.0.4",
5658
"prettier": "^2.7.1",

0 commit comments

Comments
 (0)