chore: open-source hygiene — CI, contributing guide, changelog, version fix
Cleanup pass to make citecheck genuinely adoptable by outside contributors.
Adoptability infrastructure
- CI (
.github/workflows/ci.yml) — runs on push tomainand every PR:
bun install --frozen-lockfile→bun run build(tsc) →bun test→bun run smoke.
Uses bun (the suite is written withbun:test) plus Node 20 (smoke runs the
compiled CLI under Node to honorengines: >=18). Fully offline — all 105
tests mockglobalThis.fetch, so no secrets or network access are required. - CONTRIBUTING.md — dev setup, project-layout table, the offline fetch-mock
test convention, and PR/commit conventions. - CHANGELOG.md — backfilled
1.0.0→1.2.0from tags + PR history
(Keep a Changelog format).
Bug fix: version drift
src/http.ts hardcoded VERSION = "1.1.1" and was never bumped, so the
published 1.2.0 reports 1.1.1 for --version, the --help banner, and
the Crossref/OpenAlex User-Agent. It now reads the version from package.json
(always shipped in the npm tarball, one level up from dist/), so it can never
drift again. Verified the compiled CLI, the help banner, and the src path all
report 1.2.0.
The source self-corrects, but the published 1.2.0 will keep reporting
1.1.1 until a new release (e.g. a 1.2.1 patch) is published.
README
- Added a CI badge.
- Fixed the "Programmatic use" example — it used
Bun.file(...), which throws
Bun is not definedfor the Node users this package targets; now uses
node:fs/promisesreadFile. - Added a Contributing section linking the two new docs.
Verification
tsc clean · 105/105 tests pass · bun run smoke exits 0 · --version → 1.2.0.
Summary by cubic
Adds offline CI, a contributing guide, and a backfilled changelog, and fixes version reporting by reading from package.json. This makes citecheck easier to contribute to and prevents CLI/API version drift.
-
New Features
- CI on push to
mainand PRs usingbunand Node 20:bun install --frozen-lockfile→ build (tsc) →bun test→ smoke run under Node; fully offline (no network/secrets). - Docs: added
CONTRIBUTING.md(dev setup, test convention) andCHANGELOG.md(1.0.0–1.2.0). README adds a CI badge, fixes the programmatic example to usenode:fs/promises, and links to the new docs.
- CI on push to
-
Bug Fixes
- Version drift:
VERSIONnow reads frompackage.json, so--version,--help, and APIUser-Agentalways match the published version. Note: published1.2.0still reports1.1.1until the next release.
- Version drift:
Summary by CodeRabbit
-
New Features
- Added automated CI/CD workflow for running tests and builds on each push and pull request.
-
Documentation
- Added CHANGELOG documenting release history across versions.
- Added CONTRIBUTING guide for developers with setup and development instructions.
- Updated README with CI status badge and improved examples.