Skip to content

Conversation

@MaxBlack-dev
Copy link
Contributor

Summary

This PR adds workspace usage examples to the npm publish documentation to address confusion about the proper syntax for publishing workspaces.

Related issue

Fixes #3543

What changed

  • Added an "Examples" section to docs/lib/content/commands/npm-publish.md
  • Included clear examples for:
    • Publishing the current directory
    • Publishing a specific workspace
    • Publishing multiple workspaces
    • Publishing all workspaces

Why this change is needed

Users were confused about the proper syntax for npm publish --workspace. The documentation had no examples demonstrating workspace usage, which made it difficult for users to understand how to use this feature.

Type of change

  • Documentation improvement
  • Bug fix
  • New feature

Testing

  • Documentation builds without errors
  • Examples are syntactically correct and follow npm CLI conventions

Checklist

Add clear examples demonstrating how to use npm publish with workspaces. This addresses a documentation gap where users were confused about the proper syntax for publishing workspaces.

Fixes npm#3543
@MaxBlack-dev MaxBlack-dev requested a review from a team as a code owner November 19, 2025 07:47
@owlstronaut owlstronaut changed the title docs(publish): add workspace usage examples docs: add workspace usage examples Nov 19, 2025
@owlstronaut owlstronaut merged commit ca53c21 into npm:latest Nov 19, 2025
9 checks passed
@github-actions github-actions bot mentioned this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Add command example for npm publish --workspace

2 participants