release: v1.0.0 — stable API + bunker port type fix (#26, #29)#30
Conversation
Fix #29: bunker fuels response types now match the live backend (V1::BunkerFuelsController). port() prices is an ARRAY of per-grade entries, not a keyed object; all()/compare()/spreads()/historical() shapes corrected (all() and historical() previously returned undefined at runtime because the declared envelope never matched the API). - Rewrite bunker-fuels types against the backend controller: new BunkerPortInfo, BunkerSpreadValue, BunkerResponseMetadata, PortPricesEntry, AllBunkerPrices, PortToPortSpreadDetail, HistoricalBunkerData, BunkerExportRow exports - Extend unit tests to cover the array shape and all response envelopes (429 passing) - README: fix bunker examples (SIN not SGSIN — route requires [A-Z]{3}; compare takes a port-code array), drop stale 0.x "NEW in vX" markers - Bump to 1.0.0 (package.json + SDK_VERSION), add CHANGELOG entry with breaking-change notes (#26 first stable release) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Cuts v1.0.0 — the first stable release (#26) — and fixes the bunker port response types (#29).
Closes #29. Closes #26 (the quick-start half already landed in #28; this delivers the 1.0.0 versioning half).
Bunker type fix (#29) — Breaking
Verified against the backend
V1::BunkerFuelsController(oilpriceapi-api): the port endpoint returns{ "data": { "port": { "code": "SIN", "name": "Singapore", "country": "...", "timezone": "...", "volume_rank": 1 }, "prices": [ { "grade": "VLSFO", "grade_name": "...", "price": 650.5, "currency": "USD", "unit": "MT", "change_24h": -2.25, "change_pct_24h": -0.35, "supplier_count": 12, "availability": "Good", "last_updated": "..." }, ... ], "spreads": { "to_rtm": { "vlsfo": { "value": ..., "percentage": ... } }, "vlsfo_hsfo_spread": { "value": ..., "percentage": ..., "scrubber_benefit_daily": ... } }, "metadata": { "request_id": "...", "timestamp": "...", "cache_ttl": 300, "data_source": "Ship & Bunker", ... } } }i.e.
pricesis an array of per-grade entries (one per fuel grade) andportis an info object — not the{ prices: { VLSFO: number } }keyed shape the pre-1.0 types claimed.While fixing #29 against the controller, the audit showed the other bunker methods had the same class of mismatch —
all()andhistorical()even returnedundefinedat runtime because they read.prices/.dataoff envelopes that never existed. All bunker response types are now modeled from the controller source:all()→{ ports: Record<portCode, { port, prices[] }>, metadata }compare()→{ comparison: Record<portCode, { port, prices[] }>, spreads, metadata }spreads()→{ from_port, to_port, fuel_grade, spreads, metadata }historical()→{ port, historical_data[], period, metadata }export()→BunkerExportRow[]README bunker examples fixed too (
SINnotSGSIN— the route constraint is[A-Z]{3}, andcompare()takes a port-code array).v1.0.0 (#26)
package.json+SDK_VERSION→ 1.0.0## [1.0.0] - 2026-07-03with the type fix under Breaking and a first-stable-release noteNEW in v0.xmarkers removedTest evidence
npm test→ 429 passed | 1 skipped (430), 28 files, 0 failuresnpm run build(tsc ESM + CJS) → clean;npx tsc --noEmit→ cleannpx eslint src/→ 0 errors, 10 pre-existing warnings (main has 12 — this PR removes two)Release procedure (after merge — Karl cuts this)
Publishing is driven by
.github/workflows/publish.yml, which triggers on a published GitHub Release and publishes to npm via OIDC trusted publishing (no token needed; provenance automatic). After merging:git tag v1.0.0 && git push origin v1.0.0(or create the tag in the UI)v1.0.0(paste the CHANGELOG entry) and publish ittsc --noEmit, tests, build, thennpm publish --provenance --access publicnpm view oilpriceapi version→1.0.0🤖 Generated with Claude Code