Skip to content

fix: publish-npm workflow builds invalid JSON on manual dispatch - #87

Open
BhariGowda wants to merge 1 commit into
coingecko:mainfrom
BhariGowda:fix/publish-npm-workflow
Open

fix: publish-npm workflow builds invalid JSON on manual dispatch#87
BhariGowda wants to merge 1 commit into
coingecko:mainfrom
BhariGowda:fix/publish-npm-workflow

Conversation

@BhariGowda

Copy link
Copy Markdown

The workflow_dispatch path input was embedded via string interpolation:

npx tsx scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"

This produces a string-within-a-string that JSON.parse rejects with Expected ',' or '}'. Manual re-publish via the path input always crashes — verified against all three input cases (empty, ., packages/mcp-server).

Fix: use jq to construct the JSON payload properly.

Testing: Verified the new command produces valid JSON for all three dispatch paths.

The workflow_dispatch path input was embedded via string interpolation:
  "{ \"paths_released\": \"\" }"
This produces a string-within-a-string that JSON.parse rejects with
'Expected , or }'. Manual re-publish via the path input always crashes.

Fix: use jq to construct the JSON payload properly.
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