pmcf 6.32.0 → 6.32.1

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/package.json +1 -1
  2. package/src/base.mjs +20 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.32.0",
3
+ "version": "6.32.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -110,7 +110,10 @@ export class Base {
110
110
 
111
111
  for (const [path, attribute] of extendingAttributeIterator(
112
112
  this.constructor,
113
- attribute => attribute.collection && !attribute.type.primitive
113
+ attribute =>
114
+ attribute.collection &&
115
+ !attribute.type.primitive &&
116
+ !attribute.deferredExpression
114
117
  )) {
115
118
  const collection = this[attribute.name];
116
119
  if (typeof collection?.get === "function") {
@@ -127,24 +130,21 @@ export class Base {
127
130
  collection.set(extending.name, extending.forOwner(this));
128
131
  }
129
132
  }
130
- }
131
- /*
132
- else {
133
- if (collection instanceof Set) {
134
- for (const all of this.unionFromDirections(["extends"], attribute.name)) {
135
- if (all instanceof Set) {
136
- const d = collection.difference(all);
137
-
138
- // if (d.size) {
139
- console.log("ME", this.fullName, attribute.name, d);
140
- // }
141
- }
142
- else {
143
- // console.error("NO SET",this.fullName, attribute.name, typeof all, all.constructor.name);
133
+ } /*else {
134
+ if (Array.isArray(collection)) {
135
+ // TODO
136
+ } else {
137
+ //console.log("EXTENDS", this.fullName, attribute.name);
138
+
139
+ for (const extending of this.unionFromDirections(
140
+ ["extends"],
141
+ attribute.name
142
+ )) {
143
+ if (!collection.has(extending)) {
144
+ //console.log("ADD", this.fullName, extending.fullName);
145
+ collection.add(extending);
144
146
  }
145
147
  }
146
- } else {
147
- //console.log("NO MAP OR SET", this.fullName, name);
148
148
  }
149
149
  }*/
150
150
  }
@@ -195,6 +195,9 @@ export class Base {
195
195
  for (const node of this.walkDirections(directions)) {
196
196
  const value = node[property];
197
197
  if (value !== undefined) {
198
+ if (!(value instanceof Set)) {
199
+ console.log("NO SET", value, node.fullName, property);
200
+ }
198
201
  collected = collected.union(value);
199
202
  }
200
203
  }