@dudousxd/nestjs-codegen 0.21.1 → 0.22.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @dudousxd/nestjs-codegen
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4af626a: Hand extensions the tsconfig-seeded Project instead of making each build its own
8
+
9
+ `ExtensionContext` gains `tsconfigProject()`: a lazily-created, memoized ts-morph
10
+ `Project` built from the consumer's tsconfig (`app.tsconfig`, else
11
+ `<cwd>/tsconfig.json`), so `paths` aliases resolve. `project()` is unchanged — it
12
+ stays the bare, paths-less scratch project — and the two are now documented against
13
+ each other.
14
+
15
+ An extension that needs to follow a `@/api/...` import from a controller to the
16
+ decorator target it reads had no way to get one, so it built its own from
17
+ `tsConfigFilePath`. That has a trap: parsing a tsconfig also resolves its FILE LIST,
18
+ and a tsconfig with no `include` walks the entire project root, so one unreadable
19
+ directory (a docker bind mount a container chowned to its own UID) throws
20
+ `EACCES ... scandir`. Every hand-rolled copy then fell back to a paths-less Project
21
+ in silence, and aliased targets resolved to nothing with no error anywhere — the
22
+ same bug, once per extension. The host now loads it correctly, once, and hands it
23
+ out; N extensions share one parse instead of one each.
24
+
25
+ Typed as optional (`tsconfigProject?()`) on purpose: an extension may run against an
26
+ older host that does not provide it, so the ecosystem pattern is
27
+ `ctx.tsconfigProject?.() ?? <own fallback>`.
28
+
3
29
  ## 0.21.1
4
30
 
5
31
  ### Patch Changes