This repository was archived by the owner on Mar 9, 2026. It is now read-only.
refactor: replace prepublishOnly with explicit publish workflow#46
Merged
refactor: replace prepublishOnly with explicit publish workflow#46
Conversation
Remove `prepublishOnly` script and replace with explicit `prepare:publish` command to align with the library's "explicit over implicit" design principle. Changes: - package.json: Replace `prepublishOnly` with `prepare:publish` script - publish.yml: Add explicit validation step using `prepare:publish` - CONTRIBUTING.md: Document publishing process and rationale for removal Why: `prepublishOnly` violated the boundary principle by running implicitly during `npm publish`. The new workflow declares all validation steps explicitly in the workflow file, ensuring transparency and traceability. Design principles alignment: - ✓ Explicit over implicit - ✓ Security over convenience - ✓ No silent fixes - ✓ Boundary-focused 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #46 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 22 22
Branches 6 6
=========================================
Hits 22 22 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
prepublishOnlyscript with explicitprepare:publishcommand and move publishing documentation todocs/PUBLISHING.mdto align with the library's design principles.Changes
Code Changes
prepublishOnlywithprepare:publishscriptprepare:publishDocumentation Changes
prepublishOnlyRationale
prepublishOnlyviolated the explicit over implicit principle by running automatically duringnpm publish. The new workflow:Design Principles Alignment
prepare:publishis called explicitly, not triggered automaticallyTest Plan
bun run prepare:publishsucceedsgh workflow view publish.ymlpasses🤖 Generated with Claude Code