fix npm publish path spec: bare dist-npm/<name> parses as GitHub shorthand - #27
Merged
Merged
Conversation
A bare "dist-npm/<name>" argument matches npm's GitHub owner/repo shorthand, so the v0.2.1 publish tried to fetch github.com/dist-npm/darwin-arm64 over git and failed with exit 128 before publishing anything. Prefixing ./ makes the spec unambiguously a local directory. Latent since the workflow was introduced; this was its first real execution.
This was referenced Jul 29, 2026
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.
Motivation
The v0.2.1 release — the first real execution of
npm-publish.yml— failed in the Publish step with:The publish loop strips the trailing slash from each package directory (
publish "${pkg%/}"), and npm's spec parser treats a barea/bargument as the GitHub shorthandgithub:a/b, not a local path — so npm tried to fetch a nonexistent GitHub repo over SSH instead of publishing the directory. The bug was latent since the workflow was introduced in #24. Prefixing./makes the argument unambiguously a filesystem path.Nothing was published before the failure (it died on the first package), so re-dispatching the workflow for
v0.2.1after this merges will perform the complete bootstrap publish.Verified by local reproduction:
npm publish --dry-run dist-npm/foofails with the same git error;npm publish --dry-run ./dist-npm/foopacks the directory correctly. Also verified the./prefix keeps thepackage.jsonname lookup insidepublish()working, and the workflow passes YAML validation.Test Plan
npm publish --dry-run(see above).Publish to npmwith tagv0.2.1after merge; all six packages should publish.Related PRs