Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the repository’s Lerna/Nx-based monorepo tooling and replaces the related workflows with Yarn workspaces–driven scripts plus custom buildutils helpers for versioning and packaging.
Changes:
- Remove
lerna,nx, and associated configuration; shrinkyarn.lockaccordingly. - Replace Lerna/Nx-driven build/test/release commands with workspace-based scripts and new
buildutilsCLIs (set-workspace-version,npm-pack, updatedrelease:*flows). - Adjust TypeScript project references and package dependencies to reflect the updated workspace/build graph, and update CI workflows to use
jlpmflows.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Drops transitive dependency graph introduced by Lerna/Nx and related tooling. |
| package.json | Replaces Lerna scripts with workspace-based build/test/watch commands; adds workspace version setter. |
| lerna.json | Removed (Lerna no longer used). |
| nx.json | Removed (Nx task caching no longer used). |
| pyproject.toml | Updates hatch/jupyter-releaser scripts to use new Node utilities instead of Lerna. |
| CONTRIBUTING.md | Removes documentation section about Lerna/Nx task caching. |
| buildutils/src/utils.ts | Adds workspace package discovery/version syncing + pack helper utilities. |
| buildutils/src/release-bump.ts | Reworks version bump logic to use Hatch + workspace version syncing (no Lerna). |
| buildutils/src/release-patch.ts | Reworks patch release flow to use Hatch + workspace version syncing (no Lerna). |
| buildutils/src/set-workspace-version.ts | New CLI to align workspace package versions to a provided version. |
| buildutils/src/npm-pack.ts | New CLI to npm pack all public workspaces. |
| packages/tree/package.json | Removes dependency on @jupyter-notebook/application. |
| packages/tree/tsconfig.json | Removes TS project reference to ../application. |
| packages/tree-extension/package.json | Removes dependency on @jupyter-notebook/application. |
| packages/tree-extension/tsconfig.json | Updates TS project reference from ../application to ../tree. |
| packages/notebook-extension/tsconfig.json | Adds TS project reference to ../application. |
| packages/documentsearch-extension/tsconfig.json | Adds TS project reference to ../application. |
| packages/lab-extension/package.json | Removes Nx targets metadata from package manifest. |
| app/package.json | Removes @jupyterlab/buildutils devDependency. |
| .github/workflows/buildutils.yml | Updates versioning workflow to use new workspace versioning/release scripts. |
| .github/workflows/build.yml | Switches lint job Node setup from global yarn to jlpm + JupyterLab install. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "test": "lerna run test", | ||
| "set:workspace-version": "node ./buildutils/lib/set-workspace-version.js", | ||
| "test": "npm test --workspaces --if-present", | ||
| "update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js --lerna", |
There was a problem hiding this comment.
The update:dependency script still passes --lerna to @jupyterlab/buildutils/lib/update-dependency.js, but this PR removes lerna.json and drops Lerna from the toolchain. If the script uses Lerna configuration to discover packages, this will now fail (or at least be misleading). Consider switching this to the non-Lerna mode (or an explicit workspace-based option) so dependency updates don’t rely on removed Lerna config.
| "update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js --lerna", | |
| "update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js", |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
References
Similar to jupyterlite/jupyterlite#1843
Trying to see if we can do without
lernato help simplify the dev setup and remove many dependencies from theyarn.lock.Closes #7828
Closes #7831
Code changes
lernaandnxyarn workspacespluginUser-facing changes
None
Backwards-incompatible changes
None