@travetto/registry 2.1.0 → 2.1.3

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@travetto/registry",
3
3
  "displayName": "Registry",
4
- "version": "2.1.0",
4
+ "version": "2.1.3",
5
5
  "description": "Patterns and utilities for handling registration of metadata and functionality for run-time use",
6
6
  "keywords": [
7
7
  "ast-transformations",
@@ -28,8 +28,8 @@
28
28
  "directory": "module/registry"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/compiler": "^2.1.0",
32
- "@travetto/transformer": "^2.1.0"
31
+ "@travetto/compiler": "^2.1.2",
32
+ "@travetto/transformer": "^2.1.2"
33
33
  },
34
34
  "docDependencies": {
35
35
  "@travetto/di": true
@@ -37,7 +37,7 @@ export abstract class MetadataRegistry<C extends { class: Class }, M = unknown,
37
37
  abstract onInstallFinalize<T>(cls: Class<T>): C;
38
38
 
39
39
  /**
40
- * Code to call when uninstallation is finalized
40
+ * Code to call when uninstall is finalized
41
41
  */
42
42
  onUninstallFinalize<T>(cls: Class<T>) {
43
43
 
@@ -63,7 +63,7 @@ export abstract class MetadataRegistry<C extends { class: Class }, M = unknown,
63
63
  }
64
64
 
65
65
  /**
66
- * Retrive the class that is being removed
66
+ * Retrieve the class that is being removed
67
67
  */
68
68
  getExpired(cls: string | Class): C {
69
69
  return this.expired.get(id(cls))!;
@@ -139,17 +139,17 @@ export abstract class MetadataRegistry<C extends { class: Class }, M = unknown,
139
139
  /**
140
140
  * Register a pending class, with partial config to overlay
141
141
  */
142
- register(cls: Class, pconfig: Partial<C> = {}) {
142
+ register(cls: Class, pConfig: Partial<C> = {}) {
143
143
  const conf = this.getOrCreatePending(cls);
144
- Util.deepAssign(conf, pconfig);
144
+ Util.deepAssign(conf, pConfig);
145
145
  }
146
146
 
147
147
  /**
148
148
  * Register a pending field, with partial config to overlay
149
149
  */
150
- registerField(cls: Class, field: F, pconfig: Partial<M>) {
150
+ registerField(cls: Class, field: F, pConfig: Partial<M>) {
151
151
  const conf = this.getOrCreatePendingField(cls, field);
152
- Util.deepAssign(conf, pconfig);
152
+ Util.deepAssign(conf, pConfig);
153
153
  }
154
154
 
155
155
  /**
@@ -37,6 +37,7 @@ export class MethodSource implements ChangeSource<[Class, Function]> {
37
37
  if (!prev[k]) {
38
38
  this.emit({ type: 'added', curr: [e.curr!, e.curr!.prototype[k]] });
39
39
  } else if (next[k].hash !== prev[k].hash) {
40
+ // FIXME: Why is e.prev undefined sometimes?
40
41
  this.emit({ type: 'changed', curr: [e.curr!, e.curr!.prototype[k]], prev: [e.prev!, e.prev!.prototype[k]] });
41
42
  } else {
42
43
  // Method Unchanged