@dunx/transform 3.1.3 → 3.2.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.
Files changed (2) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -36,8 +36,8 @@ await Bun.build({ entrypoints: ['src/main.ts'], plugins: [depsPlugin] });
36
36
 
37
37
  ## What it does
38
38
 
39
- It parses each file with `oxc-parser`, reads every class declaration's constructor
40
- parameter types, and appends one statement per class:
39
+ It parses each file with `oxc-parser` and reads every class declaration's
40
+ constructor parameter types. Then it appends one statement per class:
41
41
 
42
42
  ```ts
43
43
  Object.defineProperty(UsersService, Symbol.for('dunx.deps'), {
@@ -51,15 +51,15 @@ The record is a **thunk**, so it is evaluated when the container resolves the cl
51
51
  rather than when the module is defined. A dependency declared later in the file, or
52
52
  reached through a circular import, therefore needs no `forwardRef`.
53
53
 
54
- Only the appended statement is added - every other byte of the original source is
54
+ Only the appended statement is added. Every other byte of the original source is
55
55
  preserved, so comments, formatting, and the line numbers in stack traces are
56
56
  unchanged.
57
57
 
58
58
  ## Parameters it will not guess
59
59
 
60
60
  A parameter whose type names nothing that exists at runtime is recorded as
61
- `unresolved` together with its original source text, and the container throws at
62
- boot:
61
+ `unresolved`, together with its original source text. The container then throws
62
+ at boot:
63
63
 
64
64
  ```
65
65
  UsersService cannot be constructed: parameter 2 (private readonly cfg: AppConfig)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunx/transform",
3
- "version": "3.1.3",
3
+ "version": "3.2.0",
4
4
  "description": "Load-time transform that records constructor dependencies for the dunx container",
5
5
  "keywords": [
6
6
  "bun",