@nestjs/core 11.2.2 → 11.2.4

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.
@@ -267,12 +267,23 @@ class Injector {
267
267
  * that eventual lazily created instance will be merged with the prototype
268
268
  * instantiated beforehand.
269
269
  */
270
- instanceHost.donePromise &&
270
+ if (instanceHost.donePromise) {
271
271
  void instanceHost.donePromise
272
272
  .then(() => this.loadProvider(instanceWrapper, moduleRef, resolutionContext))
273
273
  .catch(err => {
274
274
  instanceWrapper.settlementSignal?.error(err);
275
275
  });
276
+ }
277
+ else {
278
+ /**
279
+ * No load has ever been scheduled for this context (e.g., request-scoped
280
+ * providers are no longer instantiated during static bootstrap, so a fresh
281
+ * durable/request sub-tree host has no inherited `donePromise`).
282
+ * Load it now; if a circular dependency is truly in-flight, the nested
283
+ * lookup will find this host pending and defer through its `donePromise`.
284
+ */
285
+ await this.loadProvider(instanceWrapper, instanceWrapper.host ?? moduleRef, resolutionContext);
286
+ }
276
287
  }
277
288
  if (instanceWrapper.async) {
278
289
  const host = instanceWrapper.getInstanceByContextId(this.getContextId(resolutionContext.contextId, instanceWrapper), inquirerId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/core",
3
- "version": "11.2.2",
3
+ "version": "11.2.4",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@core)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "uid": "2.0.2"
29
29
  },
30
30
  "devDependencies": {
31
- "@nestjs/common": "11.2.2"
31
+ "@nestjs/common": "11.2.4"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@nestjs/common": "^11.0.0",
@@ -49,5 +49,5 @@
49
49
  "optional": true
50
50
  }
51
51
  },
52
- "gitHead": "7e65752ba4e396adbe8387b21eeaeeea27f467b1"
52
+ "gitHead": "d5046225d86131285fb2f44c4c06860316a99474"
53
53
  }