fix: correct package.json path in version-and-commit.mjs for monorepo#18
Merged
fix: correct package.json path in version-and-commit.mjs for monorepo#18
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #17
The git show command uses repository root paths, not the workflow's working directory. Since this is a monorepo with js/ and rust/ folders, the path must be js/package.json instead of just package.json. This was causing "Unexpected end of JSON input" errors when the script tried to read package.json (which doesn't exist at repo root) instead of js/package.json. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the npm publish failure for v0.5.1 by correcting a path bug in
version-and-commit.mjs.Root Cause Analysis
There were two distinct issues that caused the v0.5.1 publish failure:
Issue 1: npm OIDC Token Error (First Run Attempt)
The original npm publish attempt failed with:
This indicates that npm OIDC trusted publishing may not be properly configured on npm's side.
Required action: Verify that npm OIDC trusted publishing is properly configured for the
browser-commanderpackage on npmjs.com.Issue 2: Wrong package.json Path (Rerun Attempt - FIXED)
When the CI run was restarted, it failed with a different error in
version-and-commit.mjs:Root cause: The script used
git show origin/main:package.jsonbut this monorepo has the JS package atjs/package.json. Thegit showcommand uses repository root paths, not the workflow'sworking-directory: jssetting.Changes
version-and-commit.mjsfrompackage.jsontojs/package.jsonfor thegit showcommandCurrent State
After Merging This PR
After this PR is merged, the maintainer needs to:
Verify npm OIDC trusted publishing setup on npmjs.com:
Manually publish v0.5.1 using one of these methods:
npm publishlocally with proper credentialsNote: Since v0.5.1 GitHub release already exists, the CI won't automatically re-publish. A manual trigger is needed.
Fixes #17
🤖 Generated with Claude Code