Skip to content

Use root README on crates.io and npm pages#195

Merged
sdairs merged 2 commits into
mainfrom
clickhousectl-root-readme
May 18, 2026
Merged

Use root README on crates.io and npm pages#195
sdairs merged 2 commits into
mainfrom
clickhousectl-root-readme

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented May 18, 2026

clickhousectl had no README at all, so its crates.io page renders with just the description. Same for the npm wrapper. Point both at the repo root README instead — single source of truth.

Approach

  • crates.io: crates/clickhousectl/Cargo.toml gets readme = "../../README.md". Cargo copies the file into the published tarball as README.md. Verified with cargo package --list -p clickhousectl (README.md appears) and cargo publish --dry-run -p clickhousectl (clean run, 38 files, 152.7 KiB compressed).
  • npm: npm/package.json gets a prepack script that runs cp ../README.md README.md before pack. npm doesn't follow symlinks pointing outside the package dir and won't accept .. in files, so prepack is the simplest mechanism. Verified with npm pack --dry-run (README.md included, 31.7 KB). The copied file is gitignored so the source of truth stays at the repo root.
  • The old wrapper-specific npm/README.md is deleted.

Test plan

Next steps after merging

To make 0.2.0 the README-included version (per the discussion):

  1. Merge this PR.
  2. Delete the clickhousectl crate on crates.io (Settings → Delete; <72h window, 0 downloads, eligible).
  3. Delete the v0.2.0 GH release + tag.
  4. Wait 24 hours (crates.io same-name republish cooldown).
  5. Re-tag v0.2.0. Workflow republishes everything cleanly.

🤖 Generated with Claude Code

clickhousectl had no README and was thus rendering with just the
description on crates.io / npm. Repoint both at the repo root README so
they show the actual CLI docs.

- crates/clickhousectl/Cargo.toml: `readme = "../../README.md"`. Cargo
  copies the file into the published tarball as README.md (verified via
  `cargo package --list` and `cargo publish --dry-run`).
- npm/package.json: `prepack` script copies ../README.md before npm
  packs the tarball. npm doesn't follow symlinks pointing outside the
  package directory, and `"files"` doesn't accept `..` paths, so a
  prepack hook is the simplest mechanism. The copied file is gitignored
  so the source of truth stays at the repo root.
- Drop the wrapper-specific npm/README.md.
@sdairs sdairs requested a review from iskakaushik as a code owner May 18, 2026 21:43
clickhousectl@0.2.0 was published to crates.io without a README (and
without the npm publish working at all due to OIDC issues now fixed in
#193). Bump to 0.2.1 so the README-fixed release in this PR can ship
clean. The old 0.2.0 will be yanked once 0.2.1 lands.

Bumps:
- crates/clickhousectl: 0.2.0 -> 0.2.1
- crates/clickhouse-cloud-api: 0.2.0 -> 0.2.1 (kept in lockstep)
- clickhousectl's dep on cloud-api: 0.2.0 -> 0.2.1
- npm/package.json: 0.2.0 -> 0.2.1
- Cargo.lock regenerated
@sdairs sdairs temporarily deployed to cloud-integration May 18, 2026 21:46 — with GitHub Actions Inactive
@sdairs sdairs merged commit dc8d4c4 into main May 18, 2026
13 checks passed
@sdairs sdairs deleted the clickhousectl-root-readme branch May 18, 2026 21:47
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.

2 participants