feat: add npm publishing for opencode plugin#53
Conversation
- Rename package from @cloud-atlas-ai/bottle to @open-horizon-labs/bottle-opencode - Add publish-npm job to release workflow for automated npm publishing - Uses OIDC provenance for supply chain security Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds a new Changes
Sequence Diagram(s)sequenceDiagram
participant GH as GitHub Actions
participant Runner as Action Runner
participant Repo as Repository
participant Bun as Bun/Node build
participant NPM as npm Registry
GH->>Runner: trigger release workflow (is_release && not dry-run)
Runner->>Repo: checkout code (tag available)
Runner->>Runner: extract version from git tag
Runner->>Repo: update \`opencode-plugin/package.json\` version
Runner->>Bun: install deps with Bun & build
Bun-->>Runner: build artifacts verified
Runner->>NPM: publish package with NPM_TOKEN (public)
NPM-->>Runner: publish result
Runner-->>GH: job completes
Possibly related issues
Possibly related PRs
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Superego Code ReviewWhat's Working Well
Suggestions1. Version sync gap (potential gotcha) 2. Package rename - deprecation notice? npm deprecate @cloud-atlas-ai/bottle "Moved to @open-horizon-labs/bottle-opencode"3. Build verification - name: Verify build output
working-directory: opencode-plugin
run: test -f dist/index.js && test -f dist/index.d.ts4. Minor: npm upgrade step Questions to Consider
Overall this is a straightforward, well-structured addition. The main thing I'd address is communicating the package rename to any existing users. 🧠 Superego review (code prompt) |
- Add _versionNote field to package.json explaining version is set at publish time - Add build verification step to check dist/index.js exists before npm publish - Add comment explaining why npm upgrade is needed (Node 22 has npm 10.x, OIDC requires 11.5.1+) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
@cloud-atlas-ai/bottleto@open-horizon-labs/bottle-opencodepublish-npmjob to release workflow for automated npm publishing on releaseTest plan
@open-horizon-labs/bottle-opencodeNotes
NPM_TOKENsecret to be configured in thenpmenvironmentGenerated with Claude Code
Summary by CodeRabbit
Chores
Chores
✏️ Tip: You can customize this high-level summary in your review settings.