@nathapp/nestjs-auth 4.1.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.md +19 -1
  3. package/package.json +2 -1
package/CLAUDE.md CHANGED
@@ -13,7 +13,7 @@ DO NOT EDIT MANUALLY — run `nax generate` to regenerate.
13
13
 
14
14
  **Language:** TypeScript
15
15
 
16
- **Key dependencies:** @nathapp/typescript-config, typescript
16
+ **Key dependencies:** @nestjs/common, @nestjs/config, @nestjs/core, @nathapp/typescript-config, typescript
17
17
 
18
18
  ---
19
19
  # @nathapp/nestjs-auth
package/README.md CHANGED
@@ -5,9 +5,27 @@ JWT authentication + CASL authorization library for NestJS.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @nathapp/nestjs-auth @nestjs/passport
8
+ npm install @nathapp/nestjs-auth @nestjs/passport@^11
9
9
  ```
10
10
 
11
+ The command above targets NestJS 11 CommonJS applications, including Jest
12
+ consumers. Pin Passport explicitly: `@nestjs/passport@12` is ESM-only and its
13
+ NestJS peer range also accepts NestJS 11, so an unversioned install can select
14
+ it and fail in a CommonJS Jest suite with `Must use import to load ES Module`.
15
+ Adding `--experimental-vm-modules` alone does not fix that combination.
16
+
17
+ | Consumer | Passport dependency |
18
+ | --- | --- |
19
+ | NestJS 10 CommonJS | `@nestjs/passport@^10` or `@nestjs/passport@^11` |
20
+ | NestJS 11 CommonJS / Jest | `@nestjs/passport@^11` |
21
+ | NestJS 12 | `@nestjs/passport@^12`, with an ESM-capable runtime and test setup |
22
+
23
+ The Passport 12 peer remains supported. This repository tests the NestJS 12
24
+ line on Node 24 (>=24.9), Jest 30, and `--experimental-vm-modules`; the NestJS 11
25
+ baseline explicitly pins Passport 11. Both CI lines load the built CommonJS
26
+ package and authenticate/reject tokens through real Passport using
27
+ `npm run test:consumer --workspace @nathapp/nestjs-auth` after building.
28
+
11
29
  > **Note for Fastify users:** There is slightly different request/response handling for Fastify. Interceptors and middleware check `req.raw` for Fastify vs Express compatibility.
12
30
 
13
31
  ## JWKS (Remote Identity Provider)
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@nathapp/nestjs-auth",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "nestjs-auth",
5
5
  "scripts": {
6
6
  "clean": "rimraf dist/ .turbo/",
7
7
  "build": "rimraf dist && tsc -p tsconfig.json",
8
8
  "precommit": "lint-staged",
9
9
  "test": "jest --config ./test/jest-test.json",
10
+ "test:consumer": "jest --config ./test/jest-consumer.json --runInBand --forceExit",
10
11
  "test:cov": "jest --config ./test/jest-test.json --coverage",
11
12
  "test:watch": "jest --config ./test/jest-test.json --watch",
12
13
  "lint": "eslint -c .eslintrc.js \"lib/**/*.ts\" \"test/**/*.ts\"",