A safe and highly functional replacement for npm publish that validates packages before publishing to the registry.
Publish-please is a command-line tool that replaces the standard `npm publish` command with a safer, more robust publishing workflow. It validates packages before publishing by running tests, checking for vulnerabilities, verifying git state, and ensuring no sensitive files are included. This helps developers avoid common publishing mistakes and maintain clean, secure npm packages.
JavaScript and Node.js developers who regularly publish packages to npm and want to automate validation and enforce publishing standards. It's particularly useful for teams managing open-source projects or internal packages.
Developers choose Publish-please because it provides a comprehensive, configurable validation layer over npm publish, reducing human error and ensuring consistent, high-quality package releases. Its flexibility allows it to be used as a full publishing tool or just for validation.
Safe and highly functional replacement for npm publish.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically runs tests, vulnerability audits, git state checks, and sensitive file detection before publishing, as outlined in the default Validation Workflow section.
Allows disabling or customizing every validation step via a .publishrc file, including custom scripts and branch patterns, making it adaptable to diverse project needs.
Includes a --ci mode for automated environments and a --dry-run option to preview package contents, preventing accidental publishes without actual registry pushes.
Supports running custom scripts after successful publishing, such as for release announcements or binary uploads, adding flexibility to the release process.
Heavily relies on npm-specific features like npm audit and npm publish, making it less suitable for projects using yarn, pnpm, or alternative registries without significant workarounds.
Setting up and maintaining the .publishrc file and related configurations (e.g., .auditignore, .sensitivedata) can be verbose and complex, especially for teams not needing all validations.
As noted in the Upgrading section, existing prepublish scripts must be renamed to prepublishOnly after installation, which could break established publishing processes.