Skip to content

Commit

Permalink
fix: document the -r option (#5044)
Browse files Browse the repository at this point in the history
close #5019
  • Loading branch information
zkochan committed Jul 17, 2022
1 parent e018a8b commit 348580c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/perfect-peaches-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-publishing": patch
"pnpm": patch
---

`pnpm publish --help` should print the `--recursive` and `--filter` options [#5019](https://github.com/pnpm/pnpm/issues/5019).
1 change: 1 addition & 0 deletions packages/plugin-commands-publishing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"dependencies": {
"@pnpm/cli-utils": "workspace:*",
"@pnpm/client": "workspace:*",
"@pnpm/common-cli-options-help": "workspace:*",
"@pnpm/config": "workspace:*",
"@pnpm/error": "workspace:*",
"@pnpm/exportable-manifest": "workspace:*",
Expand Down
7 changes: 7 additions & 0 deletions packages/plugin-commands-publishing/src/publish.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { promises as fs, existsSync } from 'fs'
import path from 'path'
import { docsUrl, readProjectManifest } from '@pnpm/cli-utils'
import { FILTERING } from '@pnpm/common-cli-options-help'
import { Config, types as allTypes } from '@pnpm/config'
import PnpmError from '@pnpm/error'
import runLifecycleHooks, { RunLifecycleHookOptions } from '@pnpm/lifecycle'
Expand Down Expand Up @@ -88,8 +89,14 @@ export function help () {
description: 'When publishing packages that require two-factor authentication, this option can specify a one-time password',
name: '--otp',
},
{
description: 'Publish all packages from the workspace',
name: '--recursive',
shortAlias: '-r',
},
],
},
FILTERING,
],
url: docsUrl('publish'),
usages: ['pnpm publish [<tarball>|<dir>] [--tag <tag>] [--access <public|restricted>] [options]'],
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-commands-publishing/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
{
"path": "../client"
},
{
"path": "../common-cli-options-help"
},
{
"path": "../config"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/pnpm/src/cmd/help.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ function getHelpText () {
},
],
},
{
title: 'Options',

list: [
{
description: 'Run the command for each project in the workspace.',
name: '--recursive',
shortAlias: '-r',
},
],
},
],
usages: ['pnpm [command] [flags]', 'pnpm [ -h | --help | -v | --version ]'],
})
Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 348580c

Please sign in to comment.