repository-provider 30.3.1 → 30.3.2
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 +2 -2
- package/src/attribute.mjs +13 -11
- package/src/pull-request.mjs +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "30.3.
|
|
3
|
+
"version": "30.3.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"ava": "^4.2.0",
|
|
37
37
|
"c8": "^7.11.3",
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
|
-
"repository-provider-test-support": "^2.1.
|
|
39
|
+
"repository-provider-test-support": "^2.1.23",
|
|
40
40
|
"semantic-release": "^19.0.2",
|
|
41
41
|
"typescript": "^4.7.2"
|
|
42
42
|
},
|
package/src/attribute.mjs
CHANGED
|
@@ -193,17 +193,19 @@ export function optionJSON(
|
|
|
193
193
|
initial = {},
|
|
194
194
|
attributes = object.constructor.attributes
|
|
195
195
|
) {
|
|
196
|
-
return attributes
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
196
|
+
return attributes
|
|
197
|
+
? Object.keys(attributes).reduce((a, c) => {
|
|
198
|
+
const value = object[c];
|
|
199
|
+
if (value !== undefined && !(value instanceof Function)) {
|
|
200
|
+
if (value instanceof Set) {
|
|
201
|
+
a[c] = [...value];
|
|
202
|
+
} else {
|
|
203
|
+
a[c] = value;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return a;
|
|
207
|
+
}, initial)
|
|
208
|
+
: initial;
|
|
207
209
|
}
|
|
208
210
|
|
|
209
211
|
/**
|