repository-provider 27.0.2 → 27.0.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/README.md CHANGED
@@ -250,6 +250,7 @@ console.log(await readme.getString());
250
250
  * [fullName](#fullname-3)
251
251
  * [fullCondensedName](#fullcondensedname)
252
252
  * [identifier](#identifier-1)
253
+ * [toString](#tostring)
253
254
  * [issuesURL](#issuesurl)
254
255
  * [homePageURL](#homepageurl-1)
255
256
  * [isLocked](#islocked)
@@ -540,37 +541,37 @@ Forwarded to the owner.
540
541
 
541
542
  By default we use the owners implementation.
542
543
 
543
- Returns **Class** as defined in the owner
544
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
544
545
 
545
546
  ### pullRequestClass
546
547
 
547
548
  By default we use the owners implementation.
548
549
 
549
- Returns **Class** as defined in the owner
550
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
550
551
 
551
552
  ### branchClass
552
553
 
553
554
  By default we use the owners implementation.
554
555
 
555
- Returns **Class** as defined in the owner
556
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
556
557
 
557
558
  ### tagClass
558
559
 
559
560
  By default we use the owners implementation.
560
561
 
561
- Returns **Class** as defined in the owner
562
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
562
563
 
563
564
  ### entryClass
564
565
 
565
566
  By default we use the owners implementation.
566
567
 
567
- Returns **Class** as defined in the owner
568
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
568
569
 
569
570
  ### hookClass
570
571
 
571
572
  By default we use the owners implementation.
572
573
 
573
- Returns **Class** as defined in the owner
574
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
574
575
 
575
576
  ### attributes
576
577
 
@@ -832,31 +833,31 @@ return {object}
832
833
 
833
834
  ### repositoryGroupClass
834
835
 
835
- Returns **Class** repository group class used by the Provider
836
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** repository group class used by the Provider
836
837
 
837
838
  ### hookClass
838
839
 
839
- Returns **Class** hook class used by the Provider
840
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** hook class used by the Provider
840
841
 
841
842
  ### repositoryClass
842
843
 
843
- Returns **Class** repository class used by the Provider
844
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** repository class used by the Provider
844
845
 
845
846
  ### branchClass
846
847
 
847
- Returns **Class** branch class used by the Provider
848
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** branch class used by the Provider
848
849
 
849
850
  ### tagClass
850
851
 
851
- Returns **Class** branch class used by the Provider
852
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** branch class used by the Provider
852
853
 
853
854
  ### entryClass
854
855
 
855
- Returns **Class** entry class used by the Provider
856
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** entry class used by the Provider
856
857
 
857
858
  ### pullRequestClass
858
859
 
859
- Returns **Class** pull request class used by the Provider
860
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** pull request class used by the Provider
860
861
 
861
862
  ### instanceIdentifier
862
863
 
@@ -1416,7 +1417,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1416
1417
 
1417
1418
  ### ref
1418
1419
 
1419
- ref name.
1420
+ Full ref path.
1420
1421
 
1421
1422
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** git ref of the Ref
1422
1423
 
@@ -1470,7 +1471,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1470
1471
 
1471
1472
  * **See**: [Repository#owner](Repository#owner)
1472
1473
 
1473
- Branch owner.
1474
+ Ref owner.
1474
1475
  By default we provide the repository owner
1475
1476
 
1476
1477
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
@@ -1494,6 +1495,12 @@ Short human readable identifier with provider and branch.
1494
1495
 
1495
1496
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1496
1497
 
1498
+ ### toString
1499
+
1500
+ Same as identifier.
1501
+
1502
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1503
+
1497
1504
  ### issuesURL
1498
1505
 
1499
1506
  * **See**: [Repository#issuesURL](#repositoryissuesurl)
@@ -1618,7 +1625,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1618
1625
 
1619
1626
  ### slug
1620
1627
 
1621
- URL name of the repo.
1628
+ Name of the repo as used in the URL.
1622
1629
 
1623
1630
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1624
1631
 
@@ -1689,7 +1696,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1689
1696
 
1690
1697
  ### cloneURL
1691
1698
 
1692
- The url used fro cloning the repo.
1699
+ The url used for cloning the repo.
1693
1700
 
1694
1701
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1695
1702
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "27.0.2",
3
+ "version": "27.0.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,18 +27,18 @@
27
27
  "docs": "documentation readme --section=API ./src/**/*.mjs",
28
28
  "lint": "npm run lint:docs && npm run lint:tsc",
29
29
  "lint:docs": "documentation lint ./src/**/*.mjs",
30
- "lint:tsc": "tsc --allowJs --checkJs --noEmit -module nodenext -t es2022 ./src/*.mjs"
30
+ "lint:tsc": "tsc --allowJs --checkJs --noEmit -t es2022 ./src/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
33
  "matching-iterator": "^2.0.3"
34
34
  },
35
35
  "devDependencies": {
36
- "ava": "^4.0.1",
36
+ "ava": "^4.1.0",
37
37
  "c8": "^7.11.0",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.12.7",
39
+ "repository-provider-test-support": "^1.12.11",
40
40
  "semantic-release": "^19.0.2",
41
- "typescript": "^4.7.0-dev.20220223"
41
+ "typescript": "^4.6.3"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.18.3"
@@ -124,7 +124,7 @@ export class BaseObject {
124
124
 
125
125
  /**
126
126
  * By default we use the owners implementation.
127
- * @return {Class} as defined in the owner
127
+ * @return {Function} as defined in the owner
128
128
  */
129
129
  get repositoryClass() {
130
130
  return this.owner.repositoryClass;
@@ -132,7 +132,7 @@ export class BaseObject {
132
132
 
133
133
  /**
134
134
  * By default we use the owners implementation.
135
- * @return {Class} as defined in the owner
135
+ * @return {Function} as defined in the owner
136
136
  */
137
137
  get pullRequestClass() {
138
138
  return this.owner.pullRequestClass;
@@ -140,7 +140,7 @@ export class BaseObject {
140
140
 
141
141
  /**
142
142
  * By default we use the owners implementation.
143
- * @return {Class} as defined in the owner
143
+ * @return {Function} as defined in the owner
144
144
  */
145
145
  get branchClass() {
146
146
  return this.owner.branchClass;
@@ -148,7 +148,7 @@ export class BaseObject {
148
148
 
149
149
  /**
150
150
  * By default we use the owners implementation.
151
- * @return {Class} as defined in the owner
151
+ * @return {Function} as defined in the owner
152
152
  */
153
153
  get tagClass() {
154
154
  return this.owner.tagClass;
@@ -156,7 +156,7 @@ export class BaseObject {
156
156
 
157
157
  /**
158
158
  * By default we use the owners implementation.
159
- * @return {Class} as defined in the owner
159
+ * @return {Function} as defined in the owner
160
160
  */
161
161
  get entryClass() {
162
162
  return this.owner.entryClass;
@@ -164,7 +164,7 @@ export class BaseObject {
164
164
 
165
165
  /**
166
166
  * By default we use the owners implementation.
167
- * @return {Class} as defined in the owner
167
+ * @return {Function} as defined in the owner
168
168
  */
169
169
  get hookClass() {
170
170
  return this.owner.hookClass;
@@ -462,49 +462,49 @@ export class BaseProvider extends BaseObject {
462
462
  }
463
463
 
464
464
  /**
465
- * @return {Class} repository group class used by the Provider
465
+ * @return {Function} repository group class used by the Provider
466
466
  */
467
467
  get repositoryGroupClass() {
468
468
  return RepositoryGroup;
469
469
  }
470
470
 
471
471
  /**
472
- * @return {Class} hook class used by the Provider
472
+ * @return {Function} hook class used by the Provider
473
473
  */
474
474
  get hookClass() {
475
475
  return Hook;
476
476
  }
477
477
 
478
478
  /**
479
- * @return {Class} repository class used by the Provider
479
+ * @return {Function} repository class used by the Provider
480
480
  */
481
481
  get repositoryClass() {
482
482
  return Repository;
483
483
  }
484
484
 
485
485
  /**
486
- * @return {Class} branch class used by the Provider
486
+ * @return {Function} branch class used by the Provider
487
487
  */
488
488
  get branchClass() {
489
489
  return Branch;
490
490
  }
491
491
 
492
492
  /**
493
- * @return {Class} branch class used by the Provider
493
+ * @return {Function} branch class used by the Provider
494
494
  */
495
495
  get tagClass() {
496
496
  return Tag;
497
497
  }
498
498
 
499
499
  /**
500
- * @return {Class} entry class used by the Provider
500
+ * @return {Function} entry class used by the Provider
501
501
  */
502
502
  get entryClass() {
503
503
  return undefined;
504
504
  }
505
505
 
506
506
  /**
507
- * @return {Class} pull request class used by the Provider
507
+ * @return {Function} pull request class used by the Provider
508
508
  */
509
509
  get pullRequestClass() {
510
510
  return PullRequest;
package/src/ref.mjs CHANGED
@@ -43,7 +43,7 @@ export class Ref extends NamedObject {
43
43
  }
44
44
 
45
45
  /**
46
- * ref name.
46
+ * Full ref path.
47
47
  * @return {string} git ref of the Ref
48
48
  */
49
49
  get ref() {
@@ -97,7 +97,7 @@ export class Ref extends NamedObject {
97
97
  }
98
98
 
99
99
  /**
100
- * Branch owner.
100
+ * Ref owner.
101
101
  * By default we provide the repository owner
102
102
  * @see {@link Repository#owner}
103
103
  * @return {string}
@@ -137,6 +137,10 @@ export class Ref extends NamedObject {
137
137
  return `${this.provider.name}:${this.fullCondensedName}`;
138
138
  }
139
139
 
140
+ /**
141
+ * Same as identifier.
142
+ * @return {string}
143
+ */
140
144
  toString() {
141
145
  return this.identifier;
142
146
  }
@@ -84,7 +84,7 @@ export class Repository extends NamedObject {
84
84
  }
85
85
 
86
86
  /**
87
- * URL name of the repo.
87
+ * Name of the repo as used in the URL.
88
88
  * @return {string}
89
89
  */
90
90
  get slug() {
@@ -166,7 +166,7 @@ export class Repository extends NamedObject {
166
166
  }
167
167
 
168
168
  /**
169
- * The url used fro cloning the repo.
169
+ * The url used for cloning the repo.
170
170
  * @return {string}
171
171
  */
172
172
  get cloneURL() {
@@ -229,6 +229,15 @@ export class Repository extends NamedObject {
229
229
  return false;
230
230
  }
231
231
 
232
+ /**
233
+ * Delete the repository from the {@link Provider}.
234
+ * {@link Provider#deleteRepository}
235
+ * @return {Promise<any>}
236
+ */
237
+ async delete() {
238
+ return this.owner.deleteRepository(this.name);
239
+ }
240
+
232
241
  /**
233
242
  * Lookup the default branch.
234
243
  * @return {Promise<Branch>} branch named after defaultBranchName
@@ -340,15 +349,6 @@ export class Repository extends NamedObject {
340
349
  this._tags.set(tag.name, tag);
341
350
  }
342
351
 
343
- /**
344
- * Delete the repository from the {@link Provider}.
345
- * {@link Provider#deleteRepository}
346
- * @return {Promise<any>}
347
- */
348
- async delete() {
349
- return this.owner.deleteRepository(this.name);
350
- }
351
-
352
352
  /**
353
353
  * Create a pull request (or deliver an already present for thefiven name).
354
354
  * @param {string} name of the pr
@@ -487,9 +487,12 @@ export class Repository extends NamedObject {
487
487
  * @return {Promise<string>} sha of the ref
488
488
  */
489
489
  async refId(ref) {
490
- return undefined;
491
490
  }
492
491
 
492
+ /**
493
+ * full name.
494
+ * @returns {string}
495
+ */
493
496
  toString() {
494
497
  return this.fullName;
495
498
  }