repository-provider 26.4.1 → 26.4.2
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 +4 -11
- package/package.json +3 -3
- package/src/base-object.mjs +6 -1
- package/src/branch.mjs +1 -1
- package/src/multi-group-provider.mjs +7 -1
- package/src/named-object.mjs +1 -1
- package/src/ref.mjs +0 -2
- package/src/util.mjs +1 -1
package/README.md
CHANGED
|
@@ -166,7 +166,6 @@ console.log(await readme.getString());
|
|
|
166
166
|
* [Parameters](#parameters-35)
|
|
167
167
|
* [removeEntries](#removeentries)
|
|
168
168
|
* [Parameters](#parameters-36)
|
|
169
|
-
* [entryClass](#entryclass-2)
|
|
170
169
|
* [createPullRequest](#createpullrequest)
|
|
171
170
|
* [Parameters](#parameters-37)
|
|
172
171
|
* [createBranch](#createbranch)
|
|
@@ -484,8 +483,8 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
484
483
|
|
|
485
484
|
### Parameters
|
|
486
485
|
|
|
487
|
-
* `options` **
|
|
488
|
-
* `additionalProperties` **
|
|
486
|
+
* `options` **any**
|
|
487
|
+
* `additionalProperties` **any**
|
|
489
488
|
|
|
490
489
|
### update
|
|
491
490
|
|
|
@@ -1014,12 +1013,6 @@ Remove entries form the branch.
|
|
|
1014
1013
|
|
|
1015
1014
|
* `entries` **AsyncIterator<[ContentEntry](#contententry)>**
|
|
1016
1015
|
|
|
1017
|
-
### entryClass
|
|
1018
|
-
|
|
1019
|
-
By default we use the providers implementation.
|
|
1020
|
-
|
|
1021
|
-
Returns **Class** as defined in the repository
|
|
1022
|
-
|
|
1023
1016
|
### createPullRequest
|
|
1024
1017
|
|
|
1025
1018
|
Create a pull request.
|
|
@@ -1187,7 +1180,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
1187
1180
|
|
|
1188
1181
|
### displayName
|
|
1189
1182
|
|
|
1190
|
-
|
|
1183
|
+
Beautified name use for human displaying only.
|
|
1191
1184
|
|
|
1192
1185
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** human readable name
|
|
1193
1186
|
|
|
@@ -2043,7 +2036,7 @@ Loops over names and executes stripBaseName.
|
|
|
2043
2036
|
* `repositoryBases` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** all possible bases
|
|
2044
2037
|
* `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
|
|
2045
2038
|
|
|
2046
|
-
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
2039
|
+
Returns **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** names without base
|
|
2047
2040
|
|
|
2048
2041
|
## generateBranchName
|
|
2049
2042
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "26.4.
|
|
3
|
+
"version": "26.4.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lint:tsc": "tsc --allowJs --checkJs --noEmit -module nodenext -t es2022 ./src/*.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"matching-iterator": "^2.0.
|
|
33
|
+
"matching-iterator": "^2.0.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ava": "^4.0.1",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
39
|
"repository-provider-test-support": "^1.9.9",
|
|
40
40
|
"semantic-release": "^19.0.2",
|
|
41
|
-
"typescript": "^4.6.0-dev.
|
|
41
|
+
"typescript": "^4.6.0-dev.20220126"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=14.18.3"
|
package/src/base-object.mjs
CHANGED
|
@@ -63,6 +63,11 @@ export class BaseObject {
|
|
|
63
63
|
return {};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Creates an instance of BaseObject.
|
|
68
|
+
* @param {*} options
|
|
69
|
+
* @param {*} additionalProperties
|
|
70
|
+
*/
|
|
66
71
|
constructor(options, additionalProperties) {
|
|
67
72
|
definePropertiesFromOptions(
|
|
68
73
|
this,
|
|
@@ -161,7 +166,7 @@ export class BaseObject {
|
|
|
161
166
|
* By default we use the owners implementation.
|
|
162
167
|
* @return {Class} as defined in the owner
|
|
163
168
|
*/
|
|
164
|
-
|
|
169
|
+
get hookClass() {
|
|
165
170
|
return this.owner.hookClass;
|
|
166
171
|
}
|
|
167
172
|
}
|
package/src/branch.mjs
CHANGED
|
@@ -49,7 +49,7 @@ export class Branch extends Ref {
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Are we the default branch.
|
|
52
|
-
* @return {boolean} true if name
|
|
52
|
+
* @return {boolean} true if name matches the repository default branch
|
|
53
53
|
*/
|
|
54
54
|
get isDefault() {
|
|
55
55
|
return this.name === this.repository.defaultBranchName;
|
|
@@ -2,6 +2,7 @@ import { matcher } from "matching-iterator";
|
|
|
2
2
|
import { BaseProvider } from "./base-provider.mjs";
|
|
3
3
|
import { stripBaseNames } from "./util.mjs";
|
|
4
4
|
import { Repository } from "./repository.mjs";
|
|
5
|
+
import { Branch } from "./branch.mjs";
|
|
5
6
|
import { RepositoryGroup } from "./repository-group.mjs";
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -34,6 +35,11 @@ export class MultiGroupProvider extends BaseProvider {
|
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Lookup a branch.
|
|
40
|
+
* @param {string} name of the branch
|
|
41
|
+
* @return {Promise<Branch>}
|
|
42
|
+
*/
|
|
37
43
|
async branch(name) {
|
|
38
44
|
const { base, group, repository, branch } = this.parseName(name);
|
|
39
45
|
|
|
@@ -78,7 +84,7 @@ export class MultiGroupProvider extends BaseProvider {
|
|
|
78
84
|
|
|
79
85
|
yield* matcher(
|
|
80
86
|
this._repositoryGroups.values(),
|
|
81
|
-
stripBaseNames(patterns,this.provider.repositoryBases),
|
|
87
|
+
stripBaseNames(patterns, this.provider.repositoryBases),
|
|
82
88
|
{
|
|
83
89
|
caseSensitive: this.areGroupNamesCaseSensitive,
|
|
84
90
|
name: "name"
|
package/src/named-object.mjs
CHANGED
package/src/ref.mjs
CHANGED
package/src/util.mjs
CHANGED
|
@@ -42,7 +42,7 @@ export function stripBaseName(name, repositoryBases, whenFound) {
|
|
|
42
42
|
* @param {*} repositoryBases
|
|
43
43
|
* @param {string[]} repositoryBases all possible bases
|
|
44
44
|
* @param {Function} [whenFound] to be called with the found base name
|
|
45
|
-
* @return {string[]} names without base
|
|
45
|
+
* @return {string[]|undefined} names without base
|
|
46
46
|
*/
|
|
47
47
|
export function stripBaseNames(names, repositoryBases, whenFound) {
|
|
48
48
|
return names === undefined
|