Skip to content

fix: add runner metadata version handling to release script#4371

Merged
NathanFlurry merged 1 commit intomainfrom
fix-runner-metadata-version
Mar 6, 2026
Merged

fix: add runner metadata version handling to release script#4371
NathanFlurry merged 1 commit intomainfrom
fix-runner-metadata-version

Conversation

@NathanFlurry
Copy link
Member

Summary

Update the release script to handle RivetKit version updates in example package.json files. This ensures that version bumps are consistently applied across the repository, preventing stale versions in examples.

Changes

  • Add support for updating @rivetkit/* and rivetkit dependencies in examples/**/package.json
  • Introduce optional file matching for patterns that may not exist in all release scenarios
  • Fix path handling by renaming conflicting path import to pathModule
  • Reset regex lastIndex before test/replace operations to prevent state-related bugs
  • Add development warning in CLAUDE.md to ensure version updates are tracked in the script

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Testing

The changes have been reviewed against the codebase to ensure compatibility with the existing release workflow.

@railway-app
Copy link

railway-app bot commented Mar 6, 2026

🚅 Deployed to the rivet-pr-4371 environment in rivet-frontend

Service Status Web Updated (UTC)
website ✅ Success (View Logs) Web Mar 6, 2026 at 8:52 am
frontend-inspector ✅ Success (View Logs) Web Mar 6, 2026 at 8:48 am
frontend-cloud ✅ Success (View Logs) Web Mar 6, 2026 at 8:48 am
mcp-hub ✅ Success (View Logs) Web Mar 6, 2026 at 8:48 am
ladle ❌ Build Failed (View Logs) Web Mar 6, 2026 at 8:48 am

@claude
Copy link

claude bot commented Mar 6, 2026

PR Review

Overall this is a solid bug fix. A few things to call out.

Path resolution fix - The original code passed relative glob paths directly to fs.readFile/fs.writeFile without joining with opts.root, meaning file reads/writes would resolve relative to the process CWD rather than the repo root. The fix is correct.

Regex lastIndex reset - Using .test() then .replace() on a stateful global regex without resetting lastIndex is a known footgun. The double-reset pattern is correct.

path import renamed to pathModule - The loop variable shadowed the imported path module. The rename eliminates the ambiguity cleanly.

Potential Issue: Regex Does Not Match Wildcard Versions - Per CLAUDE.md, examples should use * as the version for RivetKit dependencies. The new pattern only matches semver strings like ^1.2.3 or 1.2.3-beta.1 and will not match * wildcards that examples currently use. If the intent is to pin examples to semver versions during release, the regex should also cover * and workspace:* patterns. If the intent is specifically to only update already-pinned semver versions, a clarifying comment would help.

Minor Nit - The outer assert(paths.length > 0) still fires regardless of required. If no examples/**/package.json files existed at all, the release script would fail even with required: false. Probably fine in practice but worth noting.

CLAUDE.md Addition - The new development warning is useful and well-placed.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 6, 2026

More templates

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4371

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4371

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4371

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4371

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4371

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4371

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4371

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4371

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4371

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4371

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4371

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4371

commit: ff63571

@NathanFlurry NathanFlurry merged commit 4fee2df into main Mar 6, 2026
11 of 16 checks passed
@NathanFlurry NathanFlurry deleted the fix-runner-metadata-version branch March 6, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant