sent-dm-typescript: fix JSON escaping in publish-npm workflow_dispatch branch#54
Merged
Merged
Conversation
…h branch
The release-triggered branch builds `PATHS_RELEASED` with literal-backslash-
escaped quotes so the array survives being embedded inside the outer
`{ "paths_released": "$PATHS_RELEASED" }` JSON string. The
`workflow_dispatch` branch was double-quoted with un-escaped `\"`, which
collapses to bare `"` after bash expansion and produces invalid JSON like
`{ "paths_released": "["packages/mcp-server"]" }` — `JSON.parse` then
fails at position 23 before `npm publish` ever runs.
Matching the escaping pattern from the else branch unblocks manual
re-publishes (e.g. when `@sentdm/sentdm-mcp` needs to be republished
after trusted-publisher setup on npm).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
.github/workflows/publish-npm.yml: theworkflow_dispatchbranch now produces the same backslash-escaped quotes the release-triggered branch already uses, so the outer{ "paths_released": "$PATHS_RELEASED" }argument remains valid JSON after bash expansion.pathinput produced{ "paths_released": "["packages/mcp-server"]" }(unescaped inner quotes) andJSON.parseblew up at position 23 inscripts/publish-packages.tsbeforenpm publishwas ever called. Most recent occurrence: run 25872276660.Why this matters now
@sentdm/sentdm@0.27.2shipped to npm via OIDC trusted publishing on the release-triggered run.@sentdm/sentdm-mcp@0.27.2failed because trusted publishing wasn't configured on the npm side yet. That's been fixed, but the workflow_dispatch path to retry the MCP publish is itself broken — this PR unblocks it. Same template-bug-workaround pattern as the PHP packagist URL, TS MCP manifest formatting, and Java byte-buddy (sentdm/sent-dm-java#32) fixes.Test plan
gh workflow run publish-npm.yml --repo sentdm/sent-dm-typescript -f path=packages/mcp-serverand confirm@sentdm/sentdm-mcp@0.27.2lands on npm.