# Migration Guide: 11.22.0 → 11.22.1

## Overview

| Category | Details |
|----------|---------|
| **Breaking Changes** | None |
| **New Features** | `FRAMEWORK-API.md` — auto-generated compact API reference shipped with npm package |
| **Bugfixes** | Security override updates (minimatch, undici, srvx, path-to-regexp) |
| **Dependency Updates** | NestJS 11.1.18, mongoose 9.4.1 |
| **Migration Effort** | ~2 minutes (optional, backward compatible) |

---

## Quick Migration (No Breaking Changes)

```bash
# Update package
pnpm add @lenne.tech/nest-server@11.22.1

# Verify build
pnpm run build

# Run tests
pnpm test
```

No code changes required. All existing patterns continue to work.

---

## What's New in 11.22.1

### 1. FRAMEWORK-API.md — Auto-Generated API Reference

The npm package now ships a compact, machine-readable API reference (`FRAMEWORK-API.md`) that is
auto-generated from source code during `pnpm run build`. It contains:

- `CoreModule.forRoot()` overload signatures
- All configuration interfaces (`IServerOptions`, `IBetterAuth`, `IMultiTenancy`, etc.) with types and defaults
- `ServiceOptions` interface
- `CrudService` public method signatures
- Core module listing with documentation status

**For AI-assisted development:** Update your project's `CLAUDE.md` to reference this file:

```markdown
## Framework: @lenne.tech/nest-server
When working with framework features, read source and docs from:
node_modules/@lenne.tech/nest-server/CLAUDE.md
node_modules/@lenne.tech/nest-server/FRAMEWORK-API.md
node_modules/@lenne.tech/nest-server/src/core/modules/*/INTEGRATION-CHECKLIST.md
```

This enables AI tools to quickly understand the framework's complete API surface without
reading every source file individually.

### 2. Dependency Updates

| Package | From | To | Type |
|---------|------|----|------|
| `@nestjs/common` | 11.1.17 | 11.1.18 | patch |
| `@nestjs/core` | 11.1.17 | 11.1.18 | patch |
| `@nestjs/platform-express` | 11.1.17 | 11.1.18 | patch |
| `@nestjs/websockets` | 11.1.17 | 11.1.18 | patch |
| `@nestjs/testing` (dev) | 11.1.17 | 11.1.18 | patch |
| `mongoose` | 9.3.3 | 9.4.1 | minor |

### 3. Security Override Updates

Updated security overrides to latest patched versions:

| Override | From | To |
|----------|------|----|
| `minimatch` | 3.1.4 / 9.0.7 / 10.2.4 | 3.1.5 / 9.0.9 / 10.2.5 |
| `undici` | 7.24.3 | 7.24.7 |
| `srvx` | 0.11.13 | 0.11.15 |
| `path-to-regexp` | 8.4.1 | 8.4.2 |

---

## Compatibility Notes

| Pattern | Status |
|---------|--------|
| All existing `CoreModule.forRoot()` patterns | Works unchanged |
| `ICoreModuleOverrides` from 11.22.0 | Works unchanged |
| mongoose queries and schemas | Compatible (9.4.1 is backward compatible) |

---

## Troubleshooting

| Issue | Solution |
|-------|----------|
| `FRAMEWORK-API.md` not found in `node_modules` | Ensure `@lenne.tech/nest-server@11.22.1` is installed |
| Override conflicts after update | Run `pnpm install` to apply updated lockfile |

---

## References

- [FRAMEWORK-API.md](../FRAMEWORK-API.md) — The new API reference
- [Framework Compatibility Rules](../.claude/rules/framework-compatibility.md) — Maintenance obligations
- [nest-server-starter](https://github.com/lenneTech/nest-server-starter) (reference implementation)
