@pugi/cli 1.0.0-alpha.175 → 1.0.0-alpha.177

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pugi/cli",
3
- "version": "1.0.0-alpha.175",
3
+ "version": "1.0.0-alpha.177",
4
4
  "description": "Pugi CLI - terminal-native software execution system",
5
5
  "license": "MIT",
6
6
  "homepage": "https://pugi.io",
@@ -40,11 +40,11 @@
40
40
  "LICENSE"
41
41
  ],
42
42
  "optionalDependencies": {
43
- "@pugi/cli-darwin-arm64": "1.0.0-alpha.175",
44
- "@pugi/cli-darwin-x64": "1.0.0-alpha.175",
45
- "@pugi/cli-linux-arm64": "1.0.0-alpha.175",
46
- "@pugi/cli-linux-x64": "1.0.0-alpha.175",
47
- "@pugi/cli-windows-arm64": "1.0.0-alpha.175",
48
- "@pugi/cli-windows-x64": "1.0.0-alpha.175"
43
+ "@pugi/cli-darwin-arm64": "1.0.0-alpha.177",
44
+ "@pugi/cli-darwin-x64": "1.0.0-alpha.177",
45
+ "@pugi/cli-linux-arm64": "1.0.0-alpha.177",
46
+ "@pugi/cli-linux-x64": "1.0.0-alpha.177",
47
+ "@pugi/cli-windows-arm64": "1.0.0-alpha.177",
48
+ "@pugi/cli-windows-x64": "1.0.0-alpha.177"
49
49
  }
50
50
  }
@@ -13,11 +13,12 @@ Generates idiomatic NestJS modules, controllers, services, DTOs.
13
13
 
14
14
  - Every dependency you import must be in package.json before you import it. A test file is code: importing `@nestjs/testing` without adding it fails the build for the whole project, not just the test.
15
15
  - Run the project's own build once before reporting done. `tsc` is the cheapest reviewer you have and it reads the tsconfig the customer will ship with, not the one you assumed.
16
+ - Any `@nestjs/*` package you add must carry the SAME major as the `@nestjs/common` already in package.json. Read it; never write a version from memory. A mismatched major makes `npm install` refuse the whole tree with ERESOLVE, and then nothing installs at all — which surfaces as a missing runtime module, not as a version problem.
16
17
 
17
18
 
18
19
  ## Known failure modes
19
20
 
20
- Read `quirks.md` in this directory BEFORE writing code in this domain. It records 2 failures that reached a customer build, each with the symptom, the cause, and the check that tells them apart.
21
+ Read `quirks.md` in this directory BEFORE writing code in this domain. It records 3 failures that reached a customer build, each with the symptom, the cause, and the check that tells them apart.
21
22
 
22
23
 
23
24
  ## Grounding
@@ -23,4 +23,14 @@ actually observe; the build succeeds in every one of these cases.
23
23
 
24
24
  **Check.** Before writing a `.test.ts`/`.spec.ts`, check that every module it imports appears in package.json. `@nestjs/testing` is NOT part of the default starter.
25
25
 
26
- **Fix.** Add the package to devDependencies and install it, or do not write the test. A test that cannot compile is worse than no test — it takes the build down with it.
26
+ **Fix.** Add the package to devDependencies and install it, or do not write the test. A test that cannot compile is worse than no test — it takes the build down with it. Pick the version by the rule in the next entry — a wrong one is worse than the missing package.
27
+
28
+ ## nest-package-version-must-match-the-installed-major
29
+
30
+ **Symptom.** `npm install` ends with `npm error code ERESOLVE` and a "could not resolve dependency" block naming a peer. node_modules is NOT created, so the next command fails on something unrelated-looking — typically `Cannot find module '@nestjs/core'`, which is NOT the problem.
31
+
32
+ **Cause.** A `@nestjs/*` package was added at a version from a different major than the Nest already in the project. Measured on a live customer preview 2026-09-10: `@nestjs/common@10.4.22` was installed and a generated `@nestjs/testing@4.6.6` demanded `@nestjs/common@"^4.*"`, so npm refused the WHOLE tree. `--omit=dev` does not save you — npm resolves everything before omitting, so one bad dev pin blocks the production install too.
33
+
34
+ **Check.** Before adding any `@nestjs/*` package, read the version of `@nestjs/common` (or `@nestjs/core`) already in package.json and use the SAME major. Never write a version from memory. When an install fails, read the INSTALL output — the crash you see is several steps downstream.
35
+
36
+ **Fix.** Match the major — with `@nestjs/common@^10`, write `"@nestjs/testing": "^10"`. If unsure, install without a version (`npm install -D @nestjs/testing`) and let npm pick a compatible one, then confirm the install exited 0.