Skip to content
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
roottool merged 1 commit intomainfrom
refactor/explicit-publish-workflow
Jan 2, 2026
Merged

refactor: replace prepublishOnly with explicit publish workflow#46
roottool merged 1 commit intomainfrom
refactor/explicit-publish-workflow

Conversation

@roottool
Copy link
Copy Markdown
Owner

@roottool roottool commented Jan 2, 2026

Summary

Replace prepublishOnly script with explicit prepare:publish command and move publishing documentation to docs/PUBLISHING.md to align with the library's design principles.

Changes

Code Changes

  • package.json: Replace prepublishOnly with prepare:publish script
  • publish.yml: Add explicit validation step using prepare:publish

Documentation Changes

  • docs/PUBLISHING.md (new): Publishing guide for maintainers
    • Local validation instructions
    • Workflow overview
    • Design rationale for removing prepublishOnly
  • CONTRIBUTING.md: Remove Publishing Process section (moved to docs/)
  • README.md: Add Contributing section with links to CONTRIBUTING.md and docs/PUBLISHING.md

Rationale

prepublishOnly violated the explicit over implicit principle by running automatically during npm publish. The new workflow:

  • ✅ Declares all validation steps explicitly in the workflow file
  • ✅ Ensures transparency and traceability
  • ✅ Aligns with "security over convenience" and "no silent fixes" principles
  • ✅ Separates contributor documentation (CONTRIBUTING.md) from maintainer documentation (docs/)

Design Principles Alignment

Principle Implementation
Explicit over implicit prepare:publish is called explicitly, not triggered automatically
Security over convenience All validation steps are visible and traceable
Boundary-focused Clear separation between development and publishing processes
No silent fixes No hidden automation; every step is declared

Test Plan

  • Local validation: bun run prepare:publish succeeds
  • Workflow syntax: gh workflow view publish.yml passes
  • Pre-commit hooks: lint, format pass
  • Pre-push hooks: type check, tests pass (100% coverage)

🤖 Generated with Claude Code

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
Copy link
Copy Markdown

codecov Bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (97ad436) to head (41dd911).
⚠️ Report is 1 commits behind head on main.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roottool roottool merged commit 710318b into main Jan 2, 2026
12 checks passed
@roottool roottool deleted the refactor/explicit-publish-workflow branch January 2, 2026 11:33
@roottool roottool added documentation Improvements or additions to documentation ci Some changes have been changed to CI. labels Jan 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ci Some changes have been changed to CI. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant