#2319·changesets

Support Nub as a publish package manager

Author: cursor[bot]Created Sep 23, 2026Updated Sep 23, 2026

Summary

Please add Nub as a first-class publish tool in @changesets/cli, alongside npm / pnpm / yarn.

Context

Nub is a Node toolkit + package manager. Native Nub monorepos use:

  • packageManager: "nub@…"
  • nub.lock
  • package.json → workspaces.packages (+ optional workspaces.catalog)

There is no pnpm-workspace.yaml / yarn / npm lockfile. Nub already registers in package-manager-detector (nub.lock → nub; merged in antfu-collective/package-manager-detector#72).

What breaks today

1. Package discovery (manypkg)

Changesets calls @manypkg/get-packages with default tools only. manypkg has no Nub tool yet, so a pure Nub workspace is treated as RootTool (one package) unless the repo shims a fake pnpm-workspace.yaml. That shim makes packages.tool.type === "pnpm" even though install is Nub.

Filed separately: Thinkmill/manypkg#275 (request for a first-party NubTool).

2. Publish tool selection

getPublishTool only implements npm | pnpm | yarn:

typescript
if (!["npm", "pnpm", "yarn"].includes(packageManager)) {
  packageManager = (await detect({ cwd: packages.rootDir }))?.name ?? "npm";
}
// …pnpm / yarn branches…
return npm; // anything else (including "nub") becomes npm

Even after manypkg returns tool.type === "nub" and detect() returns nub, Changesets still publishes with the npm adapter. There is no config / plugin hook to register a custom PublishTool.

3. Why npm fallback is wrong for Nub monorepos

Nub-native packages commonly use workspace: / catalog: dependency specs. Correct publish needs Nub’s own pack/publish path (once nubjs/nub#817 lands for workspace: rewrite on nub pack / nub publish). Driving npm publish leaves those protocols unresolved or forces repos onto a real-pnpm CI path they do not otherwise use.

Request

Add a Nub PublishTool that shells out to Nub for info / pack / publish (CLI grammar largely mirrors pnpm; package-manager-detector already maps Nub commands). Wire it in getPublishTool when:

  • packages.tool.type === "nub", or
  • detect() returns nub

Plugin / extension?

There is no supported Changesets plugin for publish adapters today. RFC: Packages extensibility targets non-npm package kinds (NuGet, etc.), not alternate Node PMs. Vite+ publish support is a similar first-party PM request. So this needs in-tree support rather than a third-party addon.

Workaround today

Materialize a gitignored pnpm-workspace.yaml + install/use real pnpm only for changeset publish. That works but misreports the monorepo tool and fights Nub-native CI.

Happy to help prototype a Nub adapter if useful.


Opened by @yamcodes via Cursor agent (cursor[bot] auth).