Skip to content

feat(@angular/cli): add support for the nub package manager#33627

Open
colinhacks wants to merge 1 commit into
angular:mainfrom
colinhacks:feat/nub-package-manager
Open

feat(@angular/cli): add support for the nub package manager#33627
colinhacks wants to merge 1 commit into
angular:mainfrom
colinhacks:feat/nub-package-manager

Conversation

@colinhacks

Copy link
Copy Markdown

PR Checklist

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

The CLI does not recognize nub as a package manager. It is rejected or silently defaulted to npm at every allowlist site: lockfile discovery ignores nub.lock, the schematics executor throws UnknownPackageManagerException, and the packageManager schema enums plus the npm create @angular user-agent allowlist exclude it.

Issue Number: N/A

What is the new behavior?

nub is recognized wherever the other package managers are. nub is pnpm-CLI-compatible and writes a pnpm-v9-format lockfile (nub.lock), so its handling mirrors pnpm throughout.

  • packages/angular/cli/src/package-managers/package-manager-descriptor.ts — adds a nub descriptor to SUPPORTED_PACKAGE_MANAGERS, cloned from the pnpm descriptor with binary: 'nub' and lockfiles: ['nub.lock'], and adds nub to PACKAGE_MANAGER_PRECEDENCE. Lockfile discovery (discovery.ts) is data-driven off the descriptor's lockfiles, so nub.lock is now detected automatically — no separate change needed there.
  • packages/angular_devkit/schematics/tasks/package-manager/executor.ts — adds a nub entry to the executor map (installAll: 'install', installPackage: 'add'), which previously threw UnknownPackageManagerException.
  • packageManager schema enums — adds "nub" to packages/schematics/angular/ng-new/schema.json, packages/schematics/angular/workspace/schema.json, packages/angular/cli/lib/config/workspace-schema.json (both occurrences), and packages/angular_devkit/schematics_cli/{schematic,blank}/schema.json.
  • packages/angular/create/src/index.ts — adds 'nub' to the user-agent allowlist in the npm create @angular shim. nub's user agent is nub/<ver> …, which the shim parses as nub via split('/')[0].

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The nub descriptor mirrors pnpm because nub implements the pnpm CLI grammar and lockfile format; no nub-specific parsing was required. A signed Google CLA is still pending on my side.

Recognize nub (https://nubjs.com) as a supported package manager. nub is
pnpm-CLI-compatible and writes a pnpm-v9-format lockfile (nub.lock), so its
handling mirrors pnpm throughout.

- Add a `nub` descriptor to SUPPORTED_PACKAGE_MANAGERS (cloned from pnpm,
  with `binary: 'nub'` and `lockfiles: ['nub.lock']`) and to
  PACKAGE_MANAGER_PRECEDENCE. Lockfile discovery is data-driven off the
  descriptor, so `nub.lock` is now detected automatically.
- Add a `nub` entry to the schematics package-manager executor map
  (installAll: install, installPackage: add), which previously threw
  UnknownPackageManagerException for nub.
- Add `nub` to the packageManager enum in the workspace, ng-new, and
  schematics-CLI schemas, and to the user-agent allowlist in the
  `npm create @angular` shim.
@google-cla

google-cla Bot commented Jul 22, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: @angular/cli labels Jul 22, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds support for a new package manager named nub across the Angular CLI and schematics. The changes include updating various workspace and schematic schemas to include nub in the packageManager enum, defining its descriptor and precedence in the package manager configurations, and adding its execution commands. There are no review comments, so I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: @angular/cli detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant