repository-provider 32.6.2 → 32.6.4
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 +6 -7
- package/src/attribute.mjs +23 -13
- package/src/repository.mjs +0 -4
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.6.
|
|
3
|
+
"version": "32.6.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"sideEffects": false,
|
|
8
7
|
"exports": {
|
|
9
8
|
".": "./src/index.mjs"
|
|
10
9
|
},
|
|
@@ -34,13 +33,13 @@
|
|
|
34
33
|
"matching-iterator": "^2.0.11"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"ava": "^5.1.
|
|
38
|
-
"browser-ava": "^1.3.
|
|
36
|
+
"ava": "^5.1.1",
|
|
37
|
+
"browser-ava": "^1.3.20",
|
|
39
38
|
"c8": "^7.12.0",
|
|
40
39
|
"documentation": "^14.0.1",
|
|
41
|
-
"repository-provider-test-support": "^2.2.
|
|
42
|
-
"semantic-release": "^20.0
|
|
43
|
-
"typescript": "^4.9.
|
|
40
|
+
"repository-provider-test-support": "^2.2.36",
|
|
41
|
+
"semantic-release": "^20.1.0",
|
|
42
|
+
"typescript": "^4.9.5"
|
|
44
43
|
},
|
|
45
44
|
"engines": {
|
|
46
45
|
"node": ">=16.19.0"
|
package/src/attribute.mjs
CHANGED
|
@@ -137,16 +137,22 @@ export function defaultValues(attributes, object) {
|
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* Split property path into tokens
|
|
140
|
-
* @param {string} string
|
|
140
|
+
* @param {string} string
|
|
141
141
|
* @return {Iterator<string>}
|
|
142
142
|
*/
|
|
143
143
|
function* tokens(string) {
|
|
144
144
|
let identifier = "";
|
|
145
145
|
|
|
146
|
+
|
|
146
147
|
for (const c of string) {
|
|
147
148
|
switch (c) {
|
|
148
149
|
case "\t":
|
|
149
|
-
case " ":
|
|
150
|
+
case " ":
|
|
151
|
+
break;
|
|
152
|
+
|
|
153
|
+
case ">":
|
|
154
|
+
case "<":
|
|
155
|
+
|
|
150
156
|
case ".":
|
|
151
157
|
case "[":
|
|
152
158
|
case "]":
|
|
@@ -179,20 +185,22 @@ export function setAttribute(object, name, value) {
|
|
|
179
185
|
|
|
180
186
|
for (const token of tokens(name)) {
|
|
181
187
|
switch (token) {
|
|
188
|
+
case ">":
|
|
189
|
+
case "<":
|
|
182
190
|
case ".":
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
case "[":
|
|
192
|
+
case "]":
|
|
193
|
+
break;
|
|
194
|
+
|
|
195
|
+
default:
|
|
196
|
+
if (object[token] === undefined || typeof object[token] !== "object") {
|
|
197
|
+
object[token] = {};
|
|
198
|
+
}
|
|
191
199
|
|
|
192
|
-
|
|
193
|
-
|
|
200
|
+
lastObject = object;
|
|
201
|
+
lastKey = token;
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
object = object[token];
|
|
196
204
|
}
|
|
197
205
|
}
|
|
198
206
|
|
|
@@ -213,6 +221,8 @@ export function getAttribute(object, name) {
|
|
|
213
221
|
|
|
214
222
|
for (const token of tokens(name)) {
|
|
215
223
|
switch (token) {
|
|
224
|
+
case ">":
|
|
225
|
+
case "<":
|
|
216
226
|
case ".":
|
|
217
227
|
case "[":
|
|
218
228
|
case "]":
|
package/src/repository.mjs
CHANGED
|
@@ -6,8 +6,6 @@ import { Branch } from "./branch.mjs";
|
|
|
6
6
|
import { PullRequest } from "./pull-request.mjs";
|
|
7
7
|
import {
|
|
8
8
|
url_attribute,
|
|
9
|
-
size_attribute,
|
|
10
|
-
language_attribute,
|
|
11
9
|
boolean_attribute,
|
|
12
10
|
boolean_read_only_attribute
|
|
13
11
|
} from "./attributes.mjs";
|
|
@@ -49,8 +47,6 @@ export class Repository extends OwnedObject {
|
|
|
49
47
|
return {
|
|
50
48
|
...super.attributes,
|
|
51
49
|
url: url_attribute,
|
|
52
|
-
size: size_attribute,
|
|
53
|
-
language: language_attribute,
|
|
54
50
|
|
|
55
51
|
/**
|
|
56
52
|
* The name of the default branch
|