@travetto/di 4.0.2 → 4.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/di",
3
- "version": "4.0.2",
3
+ "version": "4.0.4",
4
4
  "description": "Dependency registration/management and injection support.",
5
5
  "keywords": [
6
6
  "ast-transformations",
@@ -27,10 +27,10 @@
27
27
  "directory": "module/di"
28
28
  },
29
29
  "dependencies": {
30
- "@travetto/registry": "^4.0.2"
30
+ "@travetto/registry": "^4.0.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/transformer": "^4.0.1"
33
+ "@travetto/transformer": "^4.0.2"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/transformer": {
@@ -30,15 +30,19 @@ class $DynamicDependencyRegistry {
30
30
  if (!this.#proxies.get(classId)!.has(qualifier)) {
31
31
  proxy = new RetargettingProxy<T>(instance);
32
32
  this.#proxies.get(classId)!.set(qualifier, proxy);
33
- console.debug('Registering proxy', { id: target.Ⲑid, qualifier: qualifier.toString() });
33
+ if (this.#registry.trace) {
34
+ console.debug('Registering proxy', { id: target.Ⲑid, qualifier: qualifier.toString() });
35
+ }
34
36
  } else {
35
37
  // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
36
38
  proxy = this.#proxies.get(classId)!.get(qualifier) as RetargettingProxy<T>;
37
39
  proxy.setTarget(instance);
38
- console.debug('Updating target', {
39
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
40
- id: target.Ⲑid, qualifier: qualifier.toString(), instanceType: (instance as unknown as ClassInstance<T>).constructor.name as string
41
- });
40
+ if (this.#registry.trace) {
41
+ console.debug('Updating target', {
42
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
43
+ id: target.Ⲑid, qualifier: qualifier.toString(), instanceType: (instance as unknown as ClassInstance<T>).constructor.name as string
44
+ });
45
+ }
42
46
  }
43
47
 
44
48
  return proxy.get();