Skip to content

Drop lerna#7882

Draft
jtpio wants to merge 5 commits intojupyter:mainfrom
jtpio:drop-lerna
Draft

Drop lerna#7882
jtpio wants to merge 5 commits intojupyter:mainfrom
jtpio:drop-lerna

Conversation

@jtpio
Copy link
Copy Markdown
Member

@jtpio jtpio commented Mar 31, 2026

References

Similar to jupyterlite/jupyterlite#1843

Trying to see if we can do without lerna to help simplify the dev setup and remove many dependencies from the yarn.lock.

Closes #7828
Closes #7831

Code changes

  • Drop lerna and nx
  • Fix custom script for bumping versions
  • Check if we need the yarn workspaces plugin

User-facing changes

None

Backwards-incompatible changes

None

@github-actions
Copy link
Copy Markdown
Contributor

Binder 👈 Launch a Binder on branch jtpio/notebook/drop-lerna

@jtpio jtpio added this to the 7.6.0 milestone Mar 31, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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; shrink yarn.lock accordingly.
  • Replace Lerna/Nx-driven build/test/release commands with workspace-based scripts and new buildutils CLIs (set-workspace-version, npm-pack, updated release:* flows).
  • Adjust TypeScript project references and package dependencies to reflect the updated workspace/build graph, and update CI workflows to use jlpm flows.

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",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js --lerna",
"update:dependency": "node ./node_modules/@jupyterlab/buildutils/lib/update-dependency.js",

Copilot uses AI. Check for mistakes.
jtpio and others added 2 commits April 1, 2026 17:29
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants