repository-provider 32.6.3 → 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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/attribute.mjs +23 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "32.6.3",
3
+ "version": "32.6.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,12 +34,12 @@
34
34
  },
35
35
  "devDependencies": {
36
36
  "ava": "^5.1.1",
37
- "browser-ava": "^1.3.19",
37
+ "browser-ava": "^1.3.20",
38
38
  "c8": "^7.12.0",
39
39
  "documentation": "^14.0.1",
40
40
  "repository-provider-test-support": "^2.2.36",
41
- "semantic-release": "^20.0.3",
42
- "typescript": "^4.9.4"
41
+ "semantic-release": "^20.1.0",
42
+ "typescript": "^4.9.5"
43
43
  },
44
44
  "engines": {
45
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 " ": break;
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
- case "[":
184
- case "]":
185
- break;
186
-
187
- default:
188
- if (object[token] === undefined || typeof object[token] !== "object") {
189
- object[token] = {};
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
- lastObject = object;
193
- lastKey = token;
200
+ lastObject = object;
201
+ lastKey = token;
194
202
 
195
- object = object[token];
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 "]":