Repository navigation
Releases
Releases · workshops-de/bookmonkey-api
5.0.1
Changed
- Dependency updates (no API changes):
@nestjs/common,@nestjs/coreand
@nestjs/platform-express12.2.0,express5.3.0,multer2.4.0,
body-parser2.4.0,morgan1.12.1,compression1.8.2,zod4.6.6,
fast-uri3.1.9 plus dev-tooling bumps (vite8.3.5,source-map-js,
brace-expansion).
5.0.0
Breaking
POST /register(/signup,/users) returns409 Conflictinstead of
400for an email that is already registered. The body is unchanged
(bare JSON string"Email already exists"). Clients checking for400on
this case need to check for409. Other register validation errors
(missing fields, invalid email, short password) stay400.POST /booksrejects a duplicate ISBN with409 Conflictand the bare
JSON string"Book with ISBN <isbn> already exists"; no second book is
stored. In 4.x such a request returned201and silently stored a duplicate,
so clients that create the same ISBN twice now get an error. This restores
the 3.x behavior: since 4.0 theidis a UUID instead of the ISBN, so the
implicit duplicate-id check of json-server (which surfaced as a500in 3.x)
was gone.
4.2.0
Breaking
- Package is now pure ESM (
"type": "module"inpackage.json). Internal
imports use.js-suffixed paths andtsconfig.jsontargetsES2023with
nodenextmodule resolution. Anythingrequire()-ingbookmonkey-apior its
internals from CommonJS needs to switch toimport. createdAt/updatedAtare now required, server-managed fields on every
book. They're set onPOSTand refreshed onPUT/PATCH; any
createdAt/updatedAtsent by the client is ignored. Every book response
now carries two additional fields that weren't there before.book.priceis of type number
Added
GET /books/:isbn/exists– lightweight existence check, responds with
{ isbn, exists }. Registered ahead ofGET /books/:isbnsoexistsisn't
swallowed as an ISBN.predecessorIsbn/successorIsbnon the book schema: the ISBN of the
previous / next volume in the same series, ornullfor standalone titles and
at the ends of a series. Follow them withGET /books/:isbn. The fields are
accepted onPOST/PUT/PATCHand appear in the OpenAPI schema.?_devError=trueon every/booksendpoint (GET /books,
GET /books/:isbn,GET /books/:isbn/exists,POST,PUT,PATCH,
DELETE) forces a400response, for practicing client-side error handling
in workshops.
Infrastructure
- Test suite migrated from Jest to Vitest (
vitest.config.ts/
vitest.config.e2e.ts), replacingjest.config.js/test/jest-e2e.json.
npm test/npm run test:e2enow run under Vitest; addedtest:watchand
test:covscripts. - Linting switched from ESLint to oxlint (
oxlint.json);eslint.config.mjs
and its dependencies are gone.
Changed
- Seed data replaced. The 250 technical books are gone; the shipped seed now
holds 50 well-known fiction and non-fiction titles – Harry Potter, The Lord
of the Rings, The Hunger Games, The Wheel of Time, A Song of Ice and Fire,
Mistborn, His Dark Materials and more, plus standalones such as The Willpower
Instinct and How to Win Friends and Influence People. All cover images under
covers/<isbn>.pngwere swapped accordingly. Seed prices are nowcurrency: "EUR".
Fixed
POST /dev/reset's Swagger summary is now in English (previously it was
German-only).
3.3.0
Feature: Add publishedAt & coAuthors to book entity by @GregOnNet
Chore: Update dependencies & fix vulnerabilities by @GregOnNet
Test: Add few integration tests by @GregOnNet