Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,26 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).

---

## [Unreleased]
## [2.2.1] — 2026-05-03

Maintenance release. No consumer source changes. Resolves the v2.2.0 release-notes "known issue" on the `c.basic-crud` compound-primary-key route test, plus a round of test-suite reliability hardening.

### Fixed

- `cursor.spec` cell 9 (`soft-delete still applies in cursor mode`) selected `targetId` as the last id of the first cursor page. The `/users-cursor` controller is configured with `limit: 5`, so under `?sort=id,ASC` the first page returned ids `[1..5]` and `targetId` landed on user 5. User 5 is part of the shared seed (`companyId=1, profileId=5`) and is the row exercised by `c.basic-crud`'s compound-key route test `GET /users4/1/5`. The `/users-cursor` controller has no `softDelete` config so the `DELETE` was a hard delete via TypeORM remove, dropping the row from the shared `users` table. Whether the bug surfaced depended on jest's file-execution order — locally jest tended to run `c.basic-crud` first (largest file in sequencer cache) and the bug stayed hidden, but `release.yml`'s MySQL runner sequenced `cursor.spec` before `c.basic-crud` and the compound-key test then saw user 5 gone (`status: 404`). The cell now POSTs a throwaway user, captures the returned id, and DELETEs that id; the seed range is no longer touched and execution order no longer matters. Test-fixture-only — no consumer code is affected.

### Changed

- `test:typeorm:mysql` script now passes `--runInBand` to jest (`packages/typeorm/jest.config.js` is unaffected). Single-worker execution avoids parallel-worker contention against the shared MySQL container that v2.2.0 hit.
- The supertest `done(callback)` pattern is migrated to direct `await` across `packages/typeorm/test/b.query-params.spec.ts`, `packages/typeorm/test/c.basic-crud.spec.ts`, and the three `real-db-smoke.spec.ts` files (drizzle, mikro-orm, prisma). `supertest >= 7` returns a thenable from `request(server).get(...)`, so the manual callback bridge is no longer needed; failures now surface as Promise rejections with a clean stack instead of hanging to jest's 30s timeout. Behaviour unchanged.

### Removed

- The orphan `mrepo.json` file at the repo root is removed. The `@zmotivat0r/mrepo` orchestrator was already replaced with native `lerna` + `tsc -b` in v2.2.0; the config file was left behind and is no longer read by any tooling.

---

## [2.2.0] — 2026-05-03

### Added

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<h1 align="center">
<img src="img/logo.svg" alt="nestjs-crud" height="56" />
<picture>
<source media="(prefers-color-scheme: dark)" srcset="img/logo-dark.svg">
<img src="img/logo-light.svg" alt="nestjs-crud" height="56" />
</picture>
</h1>

<p align="center">
Expand Down
11 changes: 11 additions & 0 deletions img/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions img/logo-icon-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions img/logo-icon.svg → img/logo-icon-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions img/logo.svg → img/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 3 additions & 20 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,83 +2,65 @@
"$schema": "https://unpkg.com/knip@5/schema.json",
"workspaces": {
"packages/util": {
"entry": ["src/index.ts"],
"project": ["src/**/*.ts"]
},
"packages/request": {
"entry": ["src/index.ts"],
"project": ["src/**/*.ts"]
},
"packages/core": {
"entry": [
"src/index.ts",
"test/**/*.spec.ts",
"test/parity/**/*.ts",
"test/__stubs__/**/*.ts",
"test/__fixture__/**/*.ts",
"test/__shared-fixture__/**/*.ts"
],
"project": ["src/**/*.ts", "test/**/*.ts"],
"ignore": ["src/crud/swagger.helper.ts"],
"ignoreDependencies": ["express"]
},
"packages/typeorm": {
"entry": [
"src/index.ts",
"src/query/index.ts",
"jest.config.js",
"test/**/*.spec.ts",
"test/__fixture__/**/*.ts"
],
"project": ["src/**/*.ts", "test/**/*.ts"]
},
"packages/drizzle": {
"entry": [
"src/index.ts",
"src/query/index.ts",
"jest.config.js",
"test/**/*.spec.ts",
"test/__fixture__/**/*.ts"
],
"project": ["src/**/*.ts", "test/**/*.ts"]
},
"packages/mikro-orm": {
"entry": [
"src/index.ts",
"src/query/index.ts",
"jest.config.js",
"test/**/*.spec.ts",
"test/__fixture__/**/*.ts"
],
"project": ["src/**/*.ts", "test/**/*.ts"]
},
"packages/prisma": {
"entry": [
"src/index.ts",
"src/query/index.ts",
"jest.config.js",
"test/**/*.spec.ts",
"test/__fixture__/**/*.ts"
],
"project": ["src/**/*.ts", "test/**/*.ts"]
},
".": {
"entry": [
"jest.config.js",
"jest.config.no-swagger.js",
"examples/**/*.ts"
],
"entry": ["examples/**/*.ts"],
"project": ["*.js", "examples/**/*.ts"],
"ignoreDependencies": [
"@mikro-orm/knex",
"pluralize",
"swagger-ui-express",
"@typescript-eslint/eslint-plugin",
"@typescript-eslint/parser",
"conventional-changelog-cli",
"eslint-config-airbnb-base",
"eslint-plugin-import",
"lerna",
"nodemon",
"cz-conventional-changelog",
"@nestjs-crud/core",
Expand All @@ -93,7 +75,8 @@
},
"rules": {
"duplicates": "off",
"enumMembers": "off"
"enumMembers": "off",
"optionalPeerDependencies": "off"
},
"ignoreExportsUsedInFile": true,
"ignoreBinaries": []
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages/*"
],
"npmClient": "yarn",
"version": "2.2.0",
"version": "2.2.1",
"command": {
"version": {
"conventionalCommits": true,
Expand Down
42 changes: 0 additions & 42 deletions mrepo.json

This file was deleted.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestjs-crud",
"version": "2.2.0",
"version": "2.2.1",
"description": "Nest CRUD for RESTful APIs",
"license": "MIT",
"packageManager": "yarn@4.12.0",
Expand All @@ -15,7 +15,7 @@
"test": "yarn test:typeorm:postgres && yarn test:drizzle:postgres && yarn test:mikro-orm:postgres && yarn test:prisma:postgres && jest --config jest.config.js",
"test:coverage": "yarn test:all --coverage",
"test:typeorm:postgres": "yarn db:prepare:typeorm:postgres && npx jest --config packages/typeorm/jest.config.js",
"test:typeorm:mysql": "yarn db:prepare:typeorm:mysql && TYPEORM_CONNECTION=mysql npx jest --config packages/typeorm/jest.config.js",
"test:typeorm:mysql": "yarn db:prepare:typeorm:mysql && TYPEORM_CONNECTION=mysql npx jest --config packages/typeorm/jest.config.js --runInBand",
"test:drizzle:postgres": "yarn db:prepare:drizzle:postgres && DRIZZLE_DIALECT=postgres npx jest --config packages/drizzle/jest.config.js",
"test:drizzle:mysql": "yarn db:prepare:drizzle:mysql && DRIZZLE_DIALECT=mysql npx jest --config packages/drizzle/jest.config.js",
"test:parity": "npx jest --config jest.config.js packages/core/test/parity",
Expand Down Expand Up @@ -150,6 +150,8 @@
"@hono/node-server": "^1.19.13",
"axios@npm:^1.12.0": "^1.15.2",
"follow-redirects": "^1.16.0",
"brace-expansion@npm:^1.1.7": "^1.1.13"
"brace-expansion@npm:^1.1.7": "^1.1.13",
"tmp@npm:^0.0.33": "^0.2.4",
"@conventional-changelog/git-client@npm:^1.0.0": "^2.0.0"
}
}
7 changes: 6 additions & 1 deletion packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [Unreleased]
## [2.2.1] — 2026-05-03

Version-only republish — no package-specific source changes. Bumped in lockstep with the rest of the monorepo. See the [root CHANGELOG.md](../../CHANGELOG.md#221--2026-05-03) for full release details.


## [2.2.0] — 2026-05-03

### Added

Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nestjs-crud/core",
"description": "NestJs CRUD for RESTful APIs",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -50,8 +50,8 @@
"build": "npx tsc -b"
},
"dependencies": {
"@nestjs-crud/request": "^2.2.0",
"@nestjs-crud/util": "^2.2.0",
"@nestjs-crud/request": "^2.2.1",
"@nestjs-crud/util": "^2.2.1",
"deepmerge": "^4.3.1",
"pluralize": "^8.0.0"
},
Expand Down
7 changes: 6 additions & 1 deletion packages/drizzle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [Unreleased]
## [2.2.1] — 2026-05-03

Version-only republish — no package-specific source changes. Bumped in lockstep with the rest of the monorepo. See the [root CHANGELOG.md](../../CHANGELOG.md#221--2026-05-03) for full release details.


## [2.2.0] — 2026-05-03

### Added

Expand Down
2 changes: 1 addition & 1 deletion packages/drizzle/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nestjs-crud/drizzle",
"description": "NestJs CRUD for RESTful APIs - Drizzle ORM",
"version": "2.2.0",
"version": "2.2.1",
"license": "MIT",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
Loading
Loading