Skip to content

Overhaul 2 0 - #3

Merged
sergioalmela merged 2 commits into
mainfrom
overhaul-2-0
Jun 22, 2026
Merged

Overhaul 2 0#3
sergioalmela merged 2 commits into
mainfrom
overhaul-2-0

Conversation

@sergioalmela

Copy link
Copy Markdown
Owner

2.0.0

Breaking changes

  • search() now returns a clean, denormalised structure: { offers, lowestPrices }.
    Each offer already has its merchant, edition and region resolved to a
    readable name (instead of numeric ids), plus currentPrice, minDiscountPrice,
    couponCode and lastUpdate. lowestPrices.official and lowestPrices.keyshops
    expose the cheapest official-store and key-reseller price (either may be null). Closes Search is not working #2
    This replaces the previous { success, offers, merchants, editions, regions } shape.

Fixes

  • Fix search returning no results: migrated to the price_history_api endpoint,
    as the old admin-ajax offers endpoint had stopped returning data.
  • Cache the game catalog in the OS temp directory instead of inside the package,
    so it keeps working when installed as a read-only dependency.
  • Only cache successful catalog responses (previously an error payload could be
    written to disk and read back as valid for a day).

Improvements

  • Deduplicate concurrent catalog downloads onto a single in-flight request.
  • Reuse the fuzzy-search index across searches instead of rebuilding it every call.
  • Behavioural test suite covering the transform, store/name filtering, currency
    handling and the error/empty paths.
  • The build no longer emits test files into dist.

Tooling

  • Upgrade all dependencies to their latest versions (TypeScript 6.0, Jest 30,
    @types/node 26, …).
  • Modernise tsconfig for TypeScript 6.0: moduleResolution: nodenext and an
    explicit types field (TS 6.0 no longer auto-includes @types/*).
  • Replace ESLint + Prettier with Biome (npm run check).

sergioalmela and others added 2 commits June 20, 2026 11:10
- BREAKING: search() returns clean { offers, lowestPrices } with resolved
  merchant/edition/region names instead of the raw API shape
- Fix search by transforming the price_history_api response (build was broken)
- Migrate linting/formatting from ESLint+Prettier to Biome (npm run check)
- Cache catalog in os.tmpdir (not the package dir), only cache successful
  responses, dedupe concurrent downloads, memoize the fuzzy index
- Behavioural test suite; stop emitting tests into dist
- Update README output example, add CLAUDE.md and 2.0.0 CHANGELOG entry

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sergioalmela
sergioalmela merged commit 55143ef into main Jun 22, 2026
1 check passed
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.

Search is not working

1 participant