repository-provider 35.0.1 → 35.0.3
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 +3 -3
- package/src/base-object.mjs +6 -30
- package/src/named-object.mjs +24 -0
- package/src/owned-object.mjs +1 -1
- package/src/pull-request.mjs +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "35.0.
|
|
3
|
+
"version": "35.0.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
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 -t esnext -m esnext --moduleResolution nodenext ./src
|
|
30
|
+
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --module nodenext --moduleResolution nodenext ./src**/*.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"matching-iterator": "^2.0.12",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"ava": "^6.1.1",
|
|
38
|
-
"browser-ava": "^2.1.
|
|
38
|
+
"browser-ava": "^2.1.10",
|
|
39
39
|
"c8": "^9.1.0",
|
|
40
40
|
"documentation": "^14.0.3",
|
|
41
41
|
"repository-provider-test-support": "^3.0.2",
|
package/src/base-object.mjs
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
} from "./attribute-extras.mjs";
|
|
5
5
|
import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of BaseObject.
|
|
9
|
+
* @param {Object} options
|
|
10
|
+
* @param {Object} [additionalProperties]
|
|
11
|
+
*/
|
|
12
|
+
export class BaseObject {
|
|
13
13
|
/**
|
|
14
14
|
* @return {string} type we represent
|
|
15
15
|
*/
|
|
@@ -86,14 +86,6 @@ import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
|
86
86
|
return this.identifier;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* Beautified name use for human displaying only.
|
|
91
|
-
* @return {string} human readable name
|
|
92
|
-
*/
|
|
93
|
-
get displayName() {
|
|
94
|
-
return this.name;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
89
|
/**
|
|
98
90
|
* Complete name in the hierachy.
|
|
99
91
|
* @return {string}
|
|
@@ -106,22 +98,6 @@ import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
|
106
98
|
return this.fullName;
|
|
107
99
|
}
|
|
108
100
|
|
|
109
|
-
/**
|
|
110
|
-
* Complete name in the hierachy.
|
|
111
|
-
* @return {string}
|
|
112
|
-
*/
|
|
113
|
-
get fullCondensedName() {
|
|
114
|
-
return this.fullName;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Name with default parts removed
|
|
119
|
-
* @return {string}
|
|
120
|
-
*/
|
|
121
|
-
get condensedName() {
|
|
122
|
-
return this.name;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
101
|
/**
|
|
126
102
|
* By default cannot be written to.
|
|
127
103
|
* @return {boolean} false
|
package/src/named-object.mjs
CHANGED
|
@@ -40,6 +40,30 @@ export class NamedObject extends BaseObject {
|
|
|
40
40
|
this.#name = name;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Beautified name use for human displaying only.
|
|
45
|
+
* @return {string} human readable name
|
|
46
|
+
*/
|
|
47
|
+
get displayName() {
|
|
48
|
+
return this.name;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Name with default parts removed
|
|
53
|
+
* @return {string}
|
|
54
|
+
*/
|
|
55
|
+
get condensedName() {
|
|
56
|
+
return this.name;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Complete name in the hierachy.
|
|
61
|
+
* @return {string}
|
|
62
|
+
*/
|
|
63
|
+
get fullCondensedName() {
|
|
64
|
+
return this.fullName;
|
|
65
|
+
}
|
|
66
|
+
|
|
43
67
|
/**
|
|
44
68
|
* Check for equality.
|
|
45
69
|
* @param {NamedObject} other
|
package/src/owned-object.mjs
CHANGED
|
@@ -179,7 +179,7 @@ export class OwnedObject extends NamedObject {
|
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
181
|
* By default we use the owners implementation.
|
|
182
|
-
* @return {
|
|
182
|
+
* @return {typeof Repository} as defined in the owner
|
|
183
183
|
*/
|
|
184
184
|
get repositoryClass() {
|
|
185
185
|
return this.owner.repositoryClass;
|
package/src/pull-request.mjs
CHANGED
|
@@ -58,12 +58,14 @@ export class PullRequest extends OwnedObject {
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* possible states
|
|
61
|
+
* @enum {string}
|
|
61
62
|
*/
|
|
62
63
|
static states = new Set(["OPEN", "MERGED", "CLOSED"]);
|
|
63
64
|
|
|
64
65
|
/**
|
|
65
66
|
* All valid merge methods
|
|
66
67
|
* @return {Set<string>} valid merge methods.
|
|
68
|
+
* @enum {string}
|
|
67
69
|
*/
|
|
68
70
|
static validMergeMethods = new Set(/*["MERGE", "SQUASH", "REBASE"]*/);
|
|
69
71
|
|
|
@@ -136,7 +138,6 @@ export class PullRequest extends OwnedObject {
|
|
|
136
138
|
let state = "OPEN";
|
|
137
139
|
|
|
138
140
|
super(owner, name, options, {
|
|
139
|
-
source: { value: source },
|
|
140
141
|
state: {
|
|
141
142
|
set(value) {
|
|
142
143
|
value = value.toUpperCase();
|
|
@@ -159,6 +160,8 @@ export class PullRequest extends OwnedObject {
|
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
});
|
|
163
|
+
|
|
164
|
+
this.source = source;
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
get destination() {
|