Skip to content

fix: add prepublishOnly script for release safety#115

Merged
scottlovegrove merged 2 commits intomainfrom
scottl/fix-release-build-step
Mar 29, 2026
Merged

fix: add prepublishOnly script for release safety#115
scottlovegrove merged 2 commits intomainfrom
scottl/fix-release-build-step

Conversation

@scottlovegrove
Copy link
Copy Markdown
Collaborator

@scottlovegrove scottlovegrove commented Mar 29, 2026

Summary

Add prepublishOnly script to package.json to ensure the package is always built and tested before publishing — whether from semantic-release in CI or a manual npm publish.

Note: v2.21.1 may have been published without a proper build. Consider deprecating it once this fix is released.

Changes

  • Add "prepublishOnly": "npm run build && npm test" to package.json

🤖 Generated with Claude Code

twist-cli has no prepublishOnly script, so the build step is needed
explicitly before semantic-release publishes the package.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@scottlovegrove scottlovegrove self-assigned this Mar 29, 2026
@doistbot doistbot requested a review from rmartins90 March 29, 2026 09:33
@doistbot-app
Copy link
Copy Markdown

doistbot-app Bot commented Mar 29, 2026

⚠️ Doistbot encountered an error while reviewing this PR.

  • Status: FAILED
  • Delivery: 56c43d50-2b52-11f1-8f51-90669759c1fa
  • Logs: Datadog

⚠️ Doistbot hit an error while reviewing this PR:

Unprocessable Entity: "Path could not be resolved" - https://docs.github.com/rest/pulls/reviews#create-a-review-for-a-pull-request

Please, try the command again or contact the team maintaining the bot.

Add prepublishOnly to ensure build and tests run before any publish,
whether from CI or manual. Remove explicit build/test steps from the
release workflow since prepublishOnly handles this automatically.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@scottlovegrove scottlovegrove changed the title fix: add build and test steps before release fix: add prepublishOnly script for release safety Mar 29, 2026
@scottlovegrove scottlovegrove merged commit 7b50727 into main Mar 29, 2026
5 checks passed
@scottlovegrove scottlovegrove deleted the scottl/fix-release-build-step branch March 29, 2026 09:41
doistbot added a commit that referenced this pull request Mar 29, 2026
## [2.21.2](v2.21.1...v2.21.2) (2026-03-29)

### Bug Fixes

* add prepublishOnly script for release safety ([#115](#115)) ([7b50727](7b50727))
@doistbot
Copy link
Copy Markdown
Member

🎉 This PR is included in version 2.21.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Copy Markdown

@rmartins90 rmartins90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants