Skip to content

fix(cli): include README in published npm package#4

Merged
mrgoonie merged 1 commit intomainfrom
fix/npm-readme
Apr 15, 2026
Merged

fix(cli): include README in published npm package#4
mrgoonie merged 1 commit intomainfrom
fix/npm-readme

Conversation

@mrgoonie
Copy link
Copy Markdown
Contributor

Summary

  • Adds `copy:readme` script that copies repo-root README into `packages/cli/` at prepublish
  • Chained via `prepublishOnly`; also mirrored as a step in the CI release workflow (defense-in-depth)
  • Gitignore `packages/cli/README.md` — single source of truth stays at repo root, no drift

Why

Current npm tarball ships only 3 files (no README) → package page on npmjs.com is blank. Dry-run `npm pack` now shows:
```
README.md 8.4 kB
dist/index.d.ts 13 B
dist/index.js 10.7 kB
package.json 672 B
total files: 4
```

Test plan

  • Local `pnpm copy:readme` → `README.md` appears in `packages/cli/`
  • `npm pack --dry-run` includes README
  • Post-merge: release-please opens new Release PR → merge → verify README on npmjs.com

Note on prior publish failure

Run #24450658992 failed with 404 on `PUT /f2u-cli` — likely an `NPM_TOKEN` scope issue, not the README problem. See separate diagnosis message.

- Add copy:readme script that copies root README into packages/cli
- Hook it into prepublishOnly (local publish path)
- Also copy in CI workflow before publish (defense-in-depth)
- Gitignore packages/cli/README.md so single source of truth stays at repo root

Fixes empty README on npmjs.com/package/f2u-cli
@mrgoonie mrgoonie merged commit 0e39c77 into main Apr 15, 2026
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.

1 participant