pacc 8.0.1 → 8.0.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/types.mjs +7 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pacc",
3
- "version": "8.0.1",
3
+ "version": "8.0.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -46,7 +46,7 @@
46
46
  "typescript": "^5.9.3"
47
47
  },
48
48
  "engines": {
49
- "node": ">=24.12.0"
49
+ "node": ">=24.13.0"
50
50
  },
51
51
  "repository": {
52
52
  "type": "git",
package/src/types.mjs CHANGED
@@ -17,7 +17,7 @@ export const types = {
17
17
  name: "string",
18
18
  primitive: true,
19
19
  toInternal: (value, attribute) => {
20
- if (value !== undefined) {
20
+ if (typeof value === "string") {
21
21
  if (attribute.collection) {
22
22
  return value.split(attribute.separator);
23
23
  }
@@ -26,8 +26,8 @@ export const types = {
26
26
  },
27
27
  toExternal: (value, attribute) => {
28
28
  if (value !== undefined) {
29
- if (attribute.collection) {
30
- return (Array.isArray(value) ? value : [...value]).join(attribute.separator);
29
+ if (attribute.collection && typeof value !== "string") {
30
+ return [...value].join(attribute.separator);
31
31
  }
32
32
  }
33
33
  return value;
@@ -45,8 +45,8 @@ export const types = {
45
45
  value === undefined
46
46
  ? attribute.default
47
47
  : !value || value === "0" || value === "false" || value === "no"
48
- ? false
49
- : true
48
+ ? false
49
+ : true
50
50
  },
51
51
  yesno: {
52
52
  name: "yesno",
@@ -55,8 +55,8 @@ export const types = {
55
55
  value === undefined
56
56
  ? attribute.default
57
57
  : !value || value === "0" || value === "false" || value === "no"
58
- ? false
59
- : true,
58
+ ? false
59
+ : true,
60
60
  toExternal: value =>
61
61
  value === undefined ? undefined : value ? "yes" : "no"
62
62
  },