docs(sbom): Correct option name and document remaining flags#783
docs(sbom): Correct option name and document remaining flags#783
Conversation
- `--format` -> `--sbom-format` - Add other options in docs Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
|
|
|
@sh-cho is attempting to deploy a commit to the pnpm Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe ChangesSBOM CLI Documentation
Estimated Code Review Effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value). Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
docs/cli/sbom.md (2)
48-59: ⚡ Quick winDocument flag interaction/precedence for optional dependencies.
Right now:
--prod/-Psays it includesoptionalDependencies--no-optionalsays it excludesoptionalDependenciesBut there’s no explicit note on what happens when both are provided. A short “
--no-optionaloverrides optionalDependencies inclusion from--prod/-P” (or whatever the real precedence is) would remove ambiguity.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cli/sbom.md` around lines 48 - 59, The docs for SBOM flags are ambiguous about interaction between --prod/-P and --no-optional; update the section describing --prod, -P, --dev, -D and --no-optional to add a single clear sentence that specifies precedence (e.g., state that --no-optional always overrides inclusion of optionalDependencies even if --prod/-P is passed), referencing the flags --prod/-P, --dev/-D and --no-optional and the term optionalDependencies so readers can find and understand the rule.
40-47: ⚡ Quick winClarify whether
--sbom-authors/--sbom-supplierapply to SPDX too.The docs currently state these are written to
metadata.authors/metadata.supplierin the CycloneDX output. If the flags are also supported for SPDX (or are ignored), the behavior should be explicitly documented to avoid user confusion.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/cli/sbom.md` around lines 40 - 47, Update the SBOM docs for the flags --sbom-authors and --sbom-supplier (the sections that currently say "Written to `metadata.authors`" / "`metadata.supplier`" in the CycloneDX output) to explicitly state their behavior for SPDX output as well: if these flags are mapped into SPDX fields, document the exact SPDX properties used (e.g., "Written to SPDX `documentNamespace`/`creator` or `creators`" or whatever mapping your code implements); if they are ignored for SPDX, state that they are only applied to CycloneDX output and are ignored for SPDX. Mention the flags by name (--sbom-authors, --sbom-supplier) so readers can locate the relevant doc sections.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/cli/sbom.md`:
- Around line 26-29: The option heading placeholders in docs/cli/sbom.md include
stray backslashes before the closing angle entity (e.g., "### --sbom-format
<cyclonedx|spdx\>") which can render incorrectly; remove the extraneous
"\" before each ">" so headings like "--sbom-format <cyclonedx|spdx>",
"--sbom-type <library|application>", and the name/list placeholders
"<names>" and "<name>" (appearing around the blocks you flagged,
lines ~26–47) use properly escaped HTML entities without the backslash.
---
Nitpick comments:
In `@docs/cli/sbom.md`:
- Around line 48-59: The docs for SBOM flags are ambiguous about interaction
between --prod/-P and --no-optional; update the section describing --prod, -P,
--dev, -D and --no-optional to add a single clear sentence that specifies
precedence (e.g., state that --no-optional always overrides inclusion of
optionalDependencies even if --prod/-P is passed), referencing the flags
--prod/-P, --dev/-D and --no-optional and the term optionalDependencies so
readers can find and understand the rule.
- Around line 40-47: Update the SBOM docs for the flags --sbom-authors and
--sbom-supplier (the sections that currently say "Written to `metadata.authors`"
/ "`metadata.supplier`" in the CycloneDX output) to explicitly state their
behavior for SPDX output as well: if these flags are mapped into SPDX fields,
document the exact SPDX properties used (e.g., "Written to SPDX
`documentNamespace`/`creator` or `creators`" or whatever mapping your code
implements); if they are ignored for SPDX, state that they are only applied to
CycloneDX output and are ignored for SPDX. Mention the flags by name
(--sbom-authors, --sbom-supplier) so readers can locate the relevant doc
sections.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| ### --sbom-format <cyclonedx|spdx\> | ||
|
|
||
| The SBOM format to generate. Supported values: `cyclonedx`, `spdx`. | ||
| The SBOM output format. This option is required. Supported values: `cyclonedx`, `spdx`. | ||
|
|
There was a problem hiding this comment.
Fix malformed escaped placeholders (likely stray \ before >).
In the option headings, the argument placeholders include a trailing backslash (e.g. <cyclonedx|spdx\>, <library|application\>, <names\>, <name\>). That can render incorrectly in the docs.
🛠️ Proposed fix
-### --sbom-format <cyclonedx|spdx\>
+### --sbom-format <cyclonedx|spdx>
-### --sbom-type <library|application\>
+### --sbom-type <library|application>
-### --sbom-authors <names\>
+### --sbom-authors <names>
-### --sbom-supplier <name\>
+### --sbom-supplier <name>Also applies to: 30-35, 40-47
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@docs/cli/sbom.md` around lines 26 - 29, The option heading placeholders in
docs/cli/sbom.md include stray backslashes before the closing angle entity
(e.g., "### --sbom-format <cyclonedx|spdx\>") which can render
incorrectly; remove the extraneous "\" before each ">" so headings like
"--sbom-format <cyclonedx|spdx>", "--sbom-type
<library|application>", and the name/list placeholders "<names>" and
"<name>" (appearing around the blocks you flagged, lines ~26–47) use
properly escaped HTML entities without the backslash.
--format->--sbom-formatSummary by CodeRabbit
pnpm sbomcommand documentation with revised usage examples demonstrating proper command syntax and option combinations for Software Bill of Materials generation.