pacc 4.37.4 → 4.37.6

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.4",
3
+ "version": "4.37.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "description": "property path utils",
17
17
  "keywords": [
18
- "xpath",
19
- "property path"
18
+ "property path",
19
+ "xpath"
20
20
  ],
21
21
  "contributors": [
22
22
  {
@@ -39,14 +39,14 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "ava": "^6.4.1",
42
- "browser-ava": "^2.3.32",
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",
@@ -59,9 +59,7 @@ export function* attributeIterator(definition, filter, path = []) {
59
59
  yield [path2, def];
60
60
  }
61
61
 
62
- if (def.attributes) {
63
- yield* attributeIterator(def.attributes, filter, path2);
64
- }
62
+ yield* attributeIterator(def.attributes, filter, path2);
65
63
  }
66
64
  }
67
65
  }
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,12 +41,16 @@ export function addType(type) {
41
41
 
42
42
  types[type.name] = type;
43
43
 
44
+ if (typeof type.extends === "string") {
45
+ type.extends = types[type.extends];
46
+ }
47
+
44
48
  for (const [path, attribute] of attributeIterator(type.attributes)) {
45
49
  if (typeof attribute.type === "string") {
46
50
  attribute.type = oneOfType(attribute.type);
47
51
  }
48
- if(attribute.isKey && !type.key) {
49
- type.key = path.join('.');
52
+ if (attribute.isKey && !type.key) {
53
+ type.key = path.join(".");
50
54
  }
51
55
  }
52
56
 
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
  };