pacc 4.37.5 → 4.37.7

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": "pacc",
3
- "version": "4.37.5",
3
+ "version": "4.37.7",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -39,14 +39,14 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "ava": "^6.4.1",
42
- "browser-ava": "^2.3.33",
42
+ "browser-ava": "^2.3.34",
43
43
  "c8": "^10.1.3",
44
44
  "documentation": "^14.0.3",
45
45
  "semantic-release": "^24.2.9",
46
46
  "typescript": "^5.9.2"
47
47
  },
48
48
  "engines": {
49
- "node": ">=22.19.5"
49
+ "node": ">=22.20.0"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
package/src/types.mjs CHANGED
@@ -27,7 +27,7 @@ export const types = {
27
27
  prepareValue: value => (typeof value === "string" ? parseInt(value) : value)
28
28
  },
29
29
  url: { name: "url", primitive: true },
30
- object: { name: "object", extends: "base" }
30
+ object: { name: "object" }
31
31
  };
32
32
 
33
33
  function error(message) {
@@ -41,13 +41,22 @@ export function addType(type) {
41
41
 
42
42
  types[type.name] = type;
43
43
 
44
+ if (!type.owners) {
45
+ type.owners = [];
46
+ }
47
+
48
+ if (typeof type.extends === "string") {
49
+ const ex = types[type.extends];
50
+ if (!ex) {
51
+ error(`${type.name}: missing type '${type.extends}'`);
52
+ }
53
+ type.extends = ex;
54
+ }
55
+
44
56
  for (const [path, attribute] of attributeIterator(type.attributes)) {
45
57
  if (typeof attribute.type === "string") {
46
58
  attribute.type = oneOfType(attribute.type);
47
59
  }
48
- if(attribute.isKey && !type.key) {
49
- type.key = path.join('.');
50
- }
51
60
  }
52
61
 
53
62
  return type;
package/types/types.d.mts CHANGED
@@ -31,6 +31,5 @@ export const types: {
31
31
  };
32
32
  object: {
33
33
  name: string;
34
- extends: string;
35
34
  };
36
35
  };