repository-provider 26.7.1 → 26.7.5

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": "repository-provider",
3
- "version": "26.7.1",
3
+ "version": "26.7.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,9 +36,9 @@
36
36
  "ava": "^4.0.1",
37
37
  "c8": "^7.11.0",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.12.2",
39
+ "repository-provider-test-support": "^1.12.5",
40
40
  "semantic-release": "^19.0.2",
41
- "typescript": "^4.6.0-dev.20220207"
41
+ "typescript": "^4.6.0-dev.20220209"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.18.3"
package/src/attribute.mjs CHANGED
@@ -49,7 +49,7 @@ export function definePropertiesFromOptions(
49
49
 
50
50
  if (value === undefined) {
51
51
  if (attribute.getDefault) {
52
- value = attribute.getDefault(attribute, object);
52
+ value = attribute.getDefault(attribute, object, properties);
53
53
  } else if (
54
54
  attribute.default !== undefined &&
55
55
  attribute.default !== getAttribute(object, name)
@@ -155,7 +155,7 @@ export function setAttribute(object, name, value) {
155
155
  export function getAttribute(object, name) {
156
156
  let value = object;
157
157
 
158
- if(value && value[name] !== undefined) {
158
+ if (value && value[name] !== undefined) {
159
159
  return value[name];
160
160
  }
161
161
 
@@ -50,7 +50,7 @@ export class MultiGroupProvider extends BaseProvider {
50
50
  if (rg !== undefined) {
51
51
  const r = await rg.repository(repository);
52
52
  if (r !== undefined) {
53
- return r.branch( r.defaultBranchName || branch);
53
+ return r.branch( branch || r.defaultBranchName);
54
54
  }
55
55
  }
56
56
  }
@@ -34,6 +34,14 @@ export class NamedObject extends BaseObject {
34
34
  return this.name;
35
35
  }
36
36
 
37
+ /**
38
+ * @return {string} name with owner name
39
+ */
40
+ get fullName()
41
+ {
42
+ return this.owner.name + "/" + this.name;
43
+ }
44
+
37
45
  toString() {
38
46
  return this.name;
39
47
  }
package/src/project.mjs CHANGED
@@ -8,4 +8,6 @@ export class Project extends NamedObject {
8
8
  super(name, options, {
9
9
  owner: { value: owner }
10
10
  });
11
+
12
+ owner._addProject(this);
11
13
  }}
@@ -49,14 +49,6 @@ export class RepositoryGroup extends RepositoryOwner(NamedObject) {
49
49
  });
50
50
  }
51
51
 
52
- /**
53
- * @return {string} name with owner name
54
- */
55
- get fullName()
56
- {
57
- return this.owner.name + "/" + this.name;
58
- }
59
-
60
52
  get owner()
61
53
  {
62
54
  return this.provider;