repository-provider 32.7.20 → 32.7.22
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 +4 -4
- package/src/commit.mjs +3 -0
- package/src/owned-object.mjs +2 -0
- package/src/repository.mjs +7 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.7.
|
|
3
|
+
"version": "32.7.22",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ava": "^5.3.0",
|
|
37
|
-
"browser-ava": "^1.3.
|
|
37
|
+
"browser-ava": "^1.3.47",
|
|
38
38
|
"c8": "^7.14.0",
|
|
39
39
|
"documentation": "^14.0.2",
|
|
40
|
-
"repository-provider-test-support": "^2.3.
|
|
41
|
-
"semantic-release": "^21.0.
|
|
40
|
+
"repository-provider-test-support": "^2.3.7",
|
|
41
|
+
"semantic-release": "^21.0.5",
|
|
42
42
|
"typescript": "^5.1.3"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
package/src/commit.mjs
CHANGED
package/src/owned-object.mjs
CHANGED
package/src/repository.mjs
CHANGED
|
@@ -63,7 +63,10 @@ export class Repository extends OwnedObject {
|
|
|
63
63
|
* The name of the default branch
|
|
64
64
|
* @return {string}
|
|
65
65
|
*/
|
|
66
|
-
defaultBranchName: {
|
|
66
|
+
defaultBranchName: {
|
|
67
|
+
...default_attribute,
|
|
68
|
+
default: Repository.defaultBranchName
|
|
69
|
+
},
|
|
67
70
|
|
|
68
71
|
cloneURL: url_attribute,
|
|
69
72
|
|
|
@@ -99,8 +102,7 @@ export class Repository extends OwnedObject {
|
|
|
99
102
|
return `${this.provider.url}${this.slug}`;
|
|
100
103
|
}
|
|
101
104
|
|
|
102
|
-
get defaultBranchName()
|
|
103
|
-
{
|
|
105
|
+
get defaultBranchName() {
|
|
104
106
|
return Repository.defaultBranchName;
|
|
105
107
|
}
|
|
106
108
|
|
|
@@ -218,7 +220,7 @@ export class Repository extends OwnedObject {
|
|
|
218
220
|
*/
|
|
219
221
|
async branch(name) {
|
|
220
222
|
if (name === this.defaultBranchName) {
|
|
221
|
-
return this
|
|
223
|
+
return this.addBranch(name);
|
|
222
224
|
}
|
|
223
225
|
|
|
224
226
|
await this.initializeBranches();
|
|
@@ -265,10 +267,7 @@ export class Repository extends OwnedObject {
|
|
|
265
267
|
addBranch(name, options) {
|
|
266
268
|
const branch = this.#branches.get(name);
|
|
267
269
|
if (branch) {
|
|
268
|
-
|
|
269
|
-
branch.updateAttributes(options);
|
|
270
|
-
}
|
|
271
|
-
|
|
270
|
+
branch.updateAttributes(options);
|
|
272
271
|
return branch;
|
|
273
272
|
}
|
|
274
273
|
|