Fix release build ordering, adopt clack, polish README#2
Merged
Conversation
- Move the Build step to run *after* the Bump version step in release.yml. Previously tsup baked the pre-bump package.json (e.g. 1.0.0-rc.0) into dist/cli.js, while npm published the post-bump version, so the published 1.0.0 still printed v1.0.0-rc.0 at runtime. - Replace the readline-based numbered list with @clack/prompts' select. Arrow-key navigation, hint text for the IP, and a clean cancel path. - Drop the now-unused readline import.
- Lead with the value prop and the demo gif rather than a numbered list. - Add a Use cases section: mobile UI checks, real-device APIs, PWA install flow, multi-device review, cross-browser sanity. - Tighten the Quick start to three real steps. - Rename "Notes" to "Requirements" and make the 0.0.0.0 binding guidance actionable (lists common framework flag spellings).
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
Three related improvements that ship together as the next patch release.
1. Release ordering bug (the real one)
release.ymlran Build before Bump version. Becausesrc/cli.tsdoesimport pjson from "../package.json"and tsup inlines that JSON at bundle time, the published 1.0.0 tarball contained adist/cli.jswhose version string was still1.0.0-rc.0(the value inpackage.jsonat the moment of build). Thepackage.jsonand tag were1.0.0, but the binary printed the wrong version.Fix: swap the order — Bump version first, then Build, then Publish.
2. Clack picker
Replace the readline numbered list with
@clack/prompts'sselect. Arrow-key navigation, hint text for the IP, clean cancel handling viaisCancel. Drops thereadlineimport.Non-TTY fallback (defaulting to the top-sorted candidate without prompting) is preserved.
3. README polish
0.0.0.0binding guidance (common framework flag spellings).Files
.github/workflows/release.yml— reorder stepssrc/cli.ts— swap readline → clack, dropprompt()helperpackage.json/package-lock.json— add@clack/prompts^1.3.0static/demo.gif— regenerate so the gif showsv1.0.0README.md— rewriteTest plan
npm run lintcleannpm run buildproducesdist/cli.js(~5.8 KB), version baked = currentpackage.jsonversionnode dist/cli.js --port 8080 --host 1.2.3.4printslocalview v1.0.0and the expected URL/QR< /dev/null) still picks the top-sorted candidate and logs a notice1.0.0 → 1.0.1(patch default), and the publisheddist/cli.jsprintsv1.0.1