fix(release-please): drop root from managed packages; reset cli to 0.1.1#33
fix(release-please): drop root from managed packages; reset cli to 0.1.1#33
Conversation
…cli@0.1.2 Root cause of the recent release wedges: with two packages managed under include-component-in-tag: false, release-please-action wants both packages to share a single tag namespace but uses the highest version's tag for all of them — producing duplicate-tag collisions whenever versions diverge (which happens any time only one package has changes). Fix the architecture: only release-please-manage @gitpulse/cli. Root is private, never published, no consumer reads its version — it doesn't need automated release management. Single-package mode = one tag, one release, no collision possible. Changes: - release-please-config.json: drop "." entry; only "cli" remains - .release-please-manifest.json: drop "." entry; cli reset to 0.1.1 (the last cli version that actually got tagged on git) - cli/package.json: revert version 0.1.2 → 0.1.1 (the 0.1.2 was bumped by a release-please PR that failed to publish — phantom version that never landed on npm or got tagged) - cli/CHANGELOG.md: deleted, release-please will recreate on next release - release-please.yml: revert downstream gating to bare release_created / tag_name / major (with cli as the sole managed package, bare = cli) Expected outcome on merge: release-please sees the rollback as a fix(cli) commit affecting cli/, proposes cli 0.1.1 → 0.1.2, opens release PR. Merging that PR creates a fresh v0.1.2 tag, fires publish-cli via OIDC, lands @gitpulse/cli@0.1.2 on npm. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR consolidates per-package release outputs into three generic outputs in the release-please workflow, updates downstream jobs to use those outputs, removes the root package entry from release-please config/manifest, and reverts the CLI package version and changelog entries to 0.1.1. ChangesRelease Workflow & Package Configuration Simplification
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Review rate limit: 9/10 reviews remaining, refill in 6 minutes. Comment |
|
| Filename | Overview |
|---|---|
| .github/workflows/release-please.yml | Simplified job outputs: drops cli-namespaced outputs, coalesces bare and cli--* forms via ` |
| .release-please-manifest.json | Drops root . entry; resets cli version to 0.1.1 — the last version actually tagged and published on npm |
| release-please-config.json | Removes the root . package entry; cli remains the sole managed package, eliminating the dual-package tag-namespace collision |
| cli/package.json | Reverts version from phantom 0.1.2 back to 0.1.1 to align with the last successfully published and git-tagged release |
| cli/CHANGELOG.md | Deleted — release-please will regenerate from scratch on next release, discarding phantom 0.1.2 entry that was never published |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[push to main] --> B[release-please job]
B --> C{release created?}
C -- "release_created == 'true'\n(bare OR cli-- form)" --> D[move-major-tag]
C -- "release_created == 'true'\n(bare OR cli-- form)" --> E[publish-cli]
C -- no release --> F[no-op]
D --> G["git tag -f v{major} {tag_name}\ngit push --force"]
E --> H[checkout at tag_name]
H --> I[yarn install + build]
I --> J[npm publish via OIDC]
style F fill:#ccc,color:#333
style J fill:#2da44e,color:#fff
style G fill:#0969da,color:#fff
Reviews (2): Last reviewed commit: "fix(release-please): coalesce bare and c..." | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release-please.yml:
- Around line 29-34: The workflow is using unscoped release-please outputs
(release_created, tag_name, major) but release-please emits path-scoped outputs
for non-root packages; update the job outputs to use the path-scoped keys for
the configured package (prefix each output with the package path and two dashes,
e.g. "cli--release_created", "cli--tag_name", "cli--major") so downstream steps
that reference these outputs will receive the correct values from the
release-please step (replace occurrences of release_created, tag_name, major
with their "cli--" counterparts wherever referenced).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0da7eb7f-2851-40dd-bfd1-dc4e501ec5d8
📒 Files selected for processing (5)
.github/workflows/release-please.yml.release-please-manifest.jsoncli/CHANGELOG.mdcli/package.jsonrelease-please-config.json
💤 Files with no reviewable changes (2)
- release-please-config.json
- cli/CHANGELOG.md
Coderabbit flagged that with no root path in release-please-config.json, release-please-action may emit path-scoped outputs (cli--release_created, cli--tag_name, cli--major) instead of the bare ones. Without empirical evidence either way for the no-root-package case, hedge by coalescing both shapes so dependent jobs (publish-cli, move-major-tag) work regardless of which shape the action emits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Why
The recurring release wedges (PRs #27 → #28 → #29 → #30 → #31, none of which actually landed cli on npm) all trace to the same root cause: with two packages managed under `include-component-in-tag: false`, release-please-action wants them to share one tag namespace, but uses the highest version's tag for all of them — producing `Duplicate release tag: vX.Y.Z` collisions whenever versions diverge (which happens any time only one package has changes).
linked-versions tried to keep them in lockstep but introduced its own deadlock when only one package had new commits ("0 candidates"). Removing linked-versions kept the underlying tag-sharing collision.
Fix
Make `@gitpulse/cli` the only package release-please manages. Root is private, never published, no consumer reads its version. With a single package:
Changes
Expected outcome on merge
The rollback commit itself is a `fix(cli):` change affecting `cli/` paths, so:
Side effects (acceptable)
🤖 Generated with Claude Code
Summary by CodeRabbit