ci: npm publishing was still failing#12
Conversation
WalkthroughRelease workflow modified to add a Bun-based install/cache/build path gated on release creation and to change release gating from Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor GitHub
participant Release as "Release Action\n(Release Please)"
participant Runner as "Workflow Runner"
participant Bun as "Bun (setup & cache)"
participant Node as "Node Setup (conditional)"
participant Build as "Build step (bun run build)"
participant Publish as "Publish to npm"
GitHub->>Release: tag/release event
Release-->>Runner: outputs.release_created = true
Runner->>Bun: Install Bun (oven-sh/setup-bun)
Runner->>Bun: Restore/cache bun deps (~/.bun/install/cache, node_modules)
Runner->>Runner: Run `bun ci`
Runner->>Build: Run `bun run build`
Runner->>Node: Setup Node (only if release_created)
Runner->>Publish: Publish to npm (guard: release_created)
note right of Publish#lightgreen: Publish guarded by release_created
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 24 24
=========================================
Hits 24 24 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
.github/workflows/release.yml (3)
25-35: Optional: Speed up CI with Bun cache and new lockfileBun v1.2 switched to a text lockfile (
bun.lock). If you add dependency caching, key it on**/bun.lock(notbun.lockb). This complementsbun cireproducibility. (bun.com)Example cache step:
+ - name: Cache Bun downloads + if: ${{ steps.release.outputs.release_created == 'true' }} + uses: actions/cache@v4 + with: + path: ~/.bun/install/cache + key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} + restore-keys: | + ${{ runner.os }}-bun-
25-28: Pin Bun version for deterministic builds
oven-sh/setup-bun@v2defaults to latest. Pin a major/minor (e.g.,1.2.x) or use.bun-versionviabun-version-fileto avoid surprise breaks. (github.com)- uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.2.x
44-49: Consider provenance on publishFor stronger supply-chain guarantees, consider
npm publish --provenance --access public(requires Node 18+, which you have, and npm >= 9). This is optional but increasingly common.- run: npm publish --access public + run: npm publish --provenance --access publicREADME.md (1)
8-15: Replace inline SVG badge with a standard image for reliable renderingGitHub often sanitizes inline SVG with external
<image>hrefs; this badge may not render consistently. Prefer a shields.io badge or a simple<img>.-<a href="https://bun.sh"> - <svg width="120" height="20" xmlns="http://www.w3.org/2000/svg"> - <rect width="120" height="20" rx="3" fill="#000"/> - <text x="30" y="15" fill="white" font-family="Arial" font-size="11">Made with Bun</text> - <image x="5" y="2" width="16" height="16" href="https://api.iconify.design/logos:bun.svg"/> - </svg> -</a> +<a href="https://bun.sh"> + <img alt="Made with Bun" src="https://img.shields.io/badge/Made%20with-Bun-000?logo=bun&logoColor=white" /> +</a>
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/release.yml(1 hunks)README.md(4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-22T20:08:07.461Z
Learnt from: angelxmoreno
PR: angelxmoreno/axios-cache-interceptor-keyv#10
File: .github/workflows/pr-check.yml:20-29
Timestamp: 2025-08-22T20:08:07.461Z
Learning: Bun v1.2 (January 2025) switched from binary bun.lockb to text-based bun.lock (JSONC format) as the default lockfile. The cache key pattern should use '**/bun.lock' for current Bun versions.
Applied to files:
.github/workflows/release.yml
🪛 LanguageTool
README.md
[grammar] ~4-~4: There might be a mistake here.
Context: ...adge/License-MIT-yellow.svg)](./LICENSE) [
[grammar] ~162-~162: There might be a mistake here.
Context: ...he community. For a complete list, visit the [Keyv Community Adapters](https://gi...
(QB_NEW_EN)
🪛 actionlint (1.7.7)
.github/workflows/release.yml
26-26: property "release" is not defined in object type {}
(expression)
30-30: property "release" is not defined in object type {}
(expression)
34-34: property "release" is not defined in object type {}
(expression)
🔇 Additional comments (4)
README.md (4)
3-3: LGTM: npm badge target updatedThe npm badge now points to the package page; looks good.
150-158: Table looks good; double-check adapter package namesThe backend table reads well. Please verify the exact package names (e.g.,
@keyvhq/postgresvs.@keyvhq/postgresql) match what you intend to recommend.Would you like me to open a quick PR to align any names after you confirm?
162-164: Verify community adapters link/anchorConfirm the “Keyv Community Adapters” link resolves to the correct section of the current KeyvHQ README (anchors sometimes change).
If it’s off, I can suggest the updated URL.
141-141: Consistent options formattingThe
{debug: true}compact style is now used consistently in examples. Nice touch.Also applies to: 249-249
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (6)
README.md (2)
16-18: Make the CodeRabbit badge clickable; keep alt textShields “link” param isn’t reliably honored on GitHub. Wrap the image in a link for expected UX.
- +[](https://coderabbit.ai)
150-158: Minor docs enhancement: adapter installation hint per backendThe table is helpful. Consider adding a preface line reminding users to install the corresponding adapter package when using non-memory backends to reduce setup friction.
Example addition immediately above the table:
+Note: For each backend below, install the corresponding adapter package (see “Package Required”).Happy to batch-update the backend examples to include the explicit
bun add @keyvhq/<adapter>line where applicable..github/workflows/release.yml (4)
26-32: Harden npm auth setup and future-proofAdd
always-auth: trueso npm always sends auth to the registry, avoiding edge cases with scoped packages or multiple publishes.- name: Setup Node if: ${{ steps.release.outputs.release_created == 'true' }} uses: actions/setup-node@v4 with: node-version: 20 registry-url: https://registry.npmjs.org + always-auth: true
33-36: Optionally pin Bun for reproducibilityCI determinism improves if you pin a major.minor (e.g., 1.2.x). Not mandatory but recommended.
- name: Install Bun if: ${{ steps.release.outputs.release_created == 'true' }} uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.2.x
37-47: Cache scope: avoid caching node_modules with BunBun’s
ciuses the global install cache; cachingnode_modulescan become stale and provide little benefit. Keep Bun cache only. The key correctly uses '**/bun.lock' per latest Bun.- name: Cache Bun dependencies if: ${{ steps.release.outputs.release_created == 'true' }} uses: actions/cache@v4 with: path: | ~/.bun/install/cache - node_modules key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} restore-keys: | ${{ runner.os }}-bun-
56-61: Add provenance to npm publish and required permissionEnable npm provenance for the published package and grant
id-token: writeat workflow level.permissions: contents: write pull-requests: write + id-token: write @@ - name: Publish to npm if: ${{ steps.release.outputs.release_created == 'true' }} - run: npm publish --access public + run: npm publish --access public --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_CONFIG_PROVENANCE: trueI can also add a “dry-run” guard behind a boolean input if you want safe testing on forks.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/release.yml(1 hunks)README.md(4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-22T20:08:07.461Z
Learnt from: angelxmoreno
PR: angelxmoreno/axios-cache-interceptor-keyv#10
File: .github/workflows/pr-check.yml:20-29
Timestamp: 2025-08-22T20:08:07.461Z
Learning: Bun v1.2 (January 2025) switched from binary bun.lockb to text-based bun.lock (JSONC format) as the default lockfile. The cache key pattern should use '**/bun.lock' for current Bun versions.
Applied to files:
.github/workflows/release.yml
🪛 LanguageTool
README.md
[grammar] ~4-~4: There might be a mistake here.
Context: ...adge/License-MIT-yellow.svg)](./LICENSE) [
[grammar] ~162-~162: There might be a mistake here.
Context: ...he community. For a complete list, visit the [Keyv Community Adapters](https://gi...
(QB_NEW_EN)
🔇 Additional comments (6)
README.md (3)
3-3: npm badge link looks goodPoints to the official npm package page; no action needed.
141-142: Debug example consistencyGood call tightening the object spacing to {debug: true}. Matches other examples and typical TS style.
249-249: Good: debug logging sample uses the new options shape consistentlyNo changes needed.
.github/workflows/release.yml (3)
19-25: Correctly moved Release Please earlier and switched to release_createdThis fixes the gating bug that skipped build/publish. Good.
52-55: Build step aligns with Bun toolchainLooks good; relies on package.json scripts being wired for Bun.
48-51: bun.lock present – no action neededThe verification script confirmed that
bun.lockexists in the repository root, sobun ciwill run successfully as configured.No further changes are required.
Summary by CodeRabbit
Documentation
Chores