mopub
v0.0.4
Published
Publish packages in a pnpm monorepo
Readme
mopub
Publish every package in a pnpm monorepo with one command. It builds, packs, diffs against what's on the registry, prompts for the new version(s), and publishes.
Use it
Dry-run first (packs everything into a temp folder so you can inspect):
npx mopubIt'll figure out when you last published, calculate a changelog based on git history in each sub-package, prompt you for version number(s) you'd like to publish, and write a ready-to-publish package + changelog to a staging folder under /tmp. It'll print out the command for actually publishing at your leisure:
npx mopub prebuilt /tmp/mopub/your-repo-name-will-be-here/1777048359189Once the publish succeeds, it prints a command for drafting a GitHub release (opens the "new release" page with the changelog prefilled — no side effects until you click "Create release"):
npx mopub release-notes --comparison 0.0.3-7...0.0.3-8Other commands:
npx mopub localreplaces workspace deps withfile:paths and printspnpm addcommands so you can test installs in another project.npx mopub --helpfor the full option list.
Caveats
- pnpm only. It shells out to
pnpm listandpnpm recursive exec, and looks for apnpm-workspace.yamlorpnpm-lock.yamlat the workspace root. - For monorepos. A single-package repo works, but there's no real reason to reach for this over
np. - Rough and ready. Expect to answer a few prompts and read some output before trusting
--publish. The dry-run folder it prints (/tmp/mopub/...) is the source of truth for what will be shipped.
