Repository navigation
docs: fix the README's stale version line, code links and License link - #455
Conversation
oclif readme can't find its usage and commands blocks in a CRLF file, so it added a second copy of each instead of replacing them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n line oclif.repositoryPrefix makes `pnpm readme` link each command's source on main; its default, blob/v<version>, now gives v0.0.0-semantically-released. The usage block is no longer generated, so it loses the stale version line, and the License badge now links LICENSE on main instead of a 404 on master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mrafnadeem-apimatic
left a comment
There was a problem hiding this comment.
The CRLF diagnosis and fix check out: after pnpm build && pnpm readme the README stays byte-identical, a core.autocrlf=true clone gets LF, all 13 linked files and LICENSE exist on main, and the merge notes for #438 and #445 hold. Two changes:
1. Link code by version. See the inline suggestion on repositoryPrefix; it also needs the prepack change, and the description's "Links" bullet would then name dev and the release tag instead of main.
2. Keep the regeneration rule in the repo. "Run pnpm readme with colour on" lives only in this description. With colour off, oclif prefixes all 28 example lines with $ : picocolors is always on under win32 unless NO_COLOR is set, but off on macOS/Linux without a TTY. With COLUMNS=80, 229 lines re-wrap. Suggested addition to the Common Commands block in .ai/instructions.md:
# Format
pnpm format # Prettier write on src/**/*.{js,ts}
+# README
+pnpm readme # after pnpm build; needs colour on (FORCE_COLOR=1 without a TTY, NO_COLOR unset) and COLUMNS unset
+
# Test (all)…nce packed The committed README links dev, where every command exists. prepack now regenerates the README, so the one npm shows links the tag semantic-release pushes before it publishes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|



Follows up the
oclif readmenote in #453. Tracked in apimatic-io issue 2315.The problem
The README, which npm shows on the package page, still carries 1.3.1:
apimatic --versionprinting@apimatic/cli/1.3.1.blob/v1.3.1/, the 1.x source of each command.blob/master/package.json, which is a 404:masterholds the old Python CLI.pnpm readmecouldn't repair it. Since #453 it writesblob/v0.0.0-semantically-released/links, and on the CRLF README it adds a second usage block and a second commands block instead of replacing them.What changes
README.mdis stored with LF endings, and a new.gitattributeskeeps it LF on every checkout. The first commit is that conversion alone, so the Files tab shows the whole README as changed; the other commits have the real changes.oclif.repositoryPrefixinpackage.jsonmakespnpm readmelink each command's source ondev, where every command exists.prepacknow runsoclif readmetoo, so the README packed for npm links the release's own tag, which semantic-release pushes before it publishes. The plugin-autocomplete and plugin-help links still point at those plugins' own repositories.<!-- usage -->markers go, sopnpm readmeno longer rewrites the block.blob/main/LICENSE.plugin generatedescription.A
docs:change makes no release, so npm shows this README from the next release.Checked
README.mdhas no1.3.1, noapimatic-cli/blob/vand noblob/master. All 13 linked files exist ondev, andLICENSEonmain.pnpm build && pnpm readmeleaves the README unchanged, with one commands block and no usage block.npm version 2.1.0 --no-git-tag-version && npm packpacks a README whose 13 links point atblob/v2.1.0/and which otherwise matches the committed one;2.1.0-beta.1givesblob/v2.1.0-beta.1/. At the placeholder version,pnpm packleaves the README unchanged.CIset, as in the release job,oclif manifest && oclif readmewrites the committed README byte for byte.core.autocrlftrue,falseandinput.Open PRs that edit the README
portal copilot synccommand #438 merges cleanly withgit merge -X renormalize origin/dev; a plain merge conflicts on the line endings. Itsportal copilot synclink points atblob/v1.3.1/, so runpnpm readmeafter the merge.-X renormalize, in the usage block and the 13 links. Keepdev's side in each conflict, then runpnpm readme.Regenerating the README
Run
pnpm readmeafterpnpm build, with colour on andCOLUMNSunset;.ai/instructions.mdnow says so. Our command examples carry colour codes, so oclif leaves them as written. With colour off, every example gains a$prefix.pnpm buildalso deletes anyoclif.manifest.json, whose examplesoclif readmewould otherwise use.🤖 Generated with Claude Code