Skip to content

GLSP-1636: Make CLI commands package-manager aware#1697

Merged
tortmayr merged 1 commit into
masterfrom
cli-package-manager-aware
Jun 15, 2026
Merged

GLSP-1636: Make CLI commands package-manager aware#1697
tortmayr merged 1 commit into
masterfrom
cli-package-manager-aware

Conversation

@tortmayr

Copy link
Copy Markdown
Contributor

What it does

Make the CLI work against both pnpm- and yarn/lerna-based GLSP repositories so the same commands can be used during a phased migration. This is the minimal, package-manager-agnostic CLI change to drive forward a phased migration of repo per repo.

  • Add pnpm/yarn detection and workspace discovery to package-util (detectPackageManager, getWorkspacePackages, command helpers)
  • Route coverageReport, updateNext, releng version/prepare and the repo build/run/start/vscode commands through the new helpers so they work in both pnpm- and yarn-based repositories
  • Add 'glsp releng publish <next|latest>' (replaces 'lerna publish'): detects the package manager and dispatches to 'pnpm publish -r' for pnpm repos or legacy 'lerna publish' (canary next / from-package latest) for not-yet-migrated yarn repos; '--dry-run' is pnpm-only
  • releng version: package-manager aware via getWorkspacePackages; lerna.json is updated only when present (root package.json is the version source of truth) and workspace: ranges are preserved

Part-of: #1636

How to test

  • CI tests succeed

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

Make the CLI work against both pnpm- and yarn/lerna-based GLSP
repositories so the same commands can be used during a phased migration.
This is the minimal, package-manager-agnostic CLI change to drive
forward a phased migration of repo per repo.

- Add pnpm/yarn detection and workspace discovery to package-util
  (detectPackageManager, getWorkspacePackages, command helpers)
- Route coverageReport, updateNext, releng version/prepare and the
  repo build/run/start/vscode commands through the new helpers so they
  work in both pnpm- and yarn-based repositories
- Add 'glsp releng publish <next|latest>' (replaces 'lerna publish'):
  detects the package manager and dispatches to 'pnpm publish -r' for
  pnpm repos or legacy 'lerna publish' (canary next / from-package
  latest) for not-yet-migrated yarn repos; '--dry-run' is pnpm-only
- releng version: package-manager aware via getWorkspacePackages;
  lerna.json is updated only when present (root package.json is the
  version source of truth) and workspace: ranges are preserved

Part-of: #1636
@tortmayr tortmayr merged commit e34ec0a into master Jun 15, 2026
4 checks passed
@tortmayr tortmayr deleted the cli-package-manager-aware branch June 15, 2026 11:58
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.

1 participant