volunteer-contributions-fetch 2.3.8 → 2.5.0
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/.github/workflows/test.yml +1 -1
- package/README.md +34 -16
- package/lib/contributions.js +23 -0
- package/lib/contributions.test.js +41 -0
- package/lib/discourse.js +21 -2
- package/lib/discourse.test.js +54 -0
- package/lib/fetch.js +31 -12
- package/lib/fetch.test.js +35 -2
- package/lib/validator.js +0 -4
- package/lib/validator.test.js +0 -4
- package/package.json +16 -15
package/README.md
CHANGED
|
@@ -50,7 +50,7 @@ First install the package from npm:
|
|
|
50
50
|
npm install volunteer-contribution-fetch
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
Then you can create a file in your project which runs the fetch operation and provides the
|
|
53
|
+
Then you can create a file in your project which runs the fetch operation and provides the necessary config:
|
|
54
54
|
|
|
55
55
|
```js
|
|
56
56
|
const { fetchAll } = require('volunteer-contributions-fetch');
|
|
@@ -60,6 +60,22 @@ const config = {}; // See below for documentation and a sample config
|
|
|
60
60
|
fetchAll(config);
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
### Usage without output file
|
|
64
|
+
|
|
65
|
+
This can also be used without having to rely on an `outputFile`. For this case the `fetchAll` function returns all contributions. Additionally you can also pass existing contributions to the function and these will be considered as well. The return value and the parameter of the function works the same as having an `outputFile`.
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
const { fetchAll } = require('volunteer-contributions-fetch');
|
|
69
|
+
|
|
70
|
+
const config = {}; // See below for documentation and a sample config
|
|
71
|
+
const existingContributions = [{ ... }];
|
|
72
|
+
|
|
73
|
+
const results = fetchAll(config, existingContributions);
|
|
74
|
+
// results is now all existing contributions plus any newly fetched contribution
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Note that passing existing contributions this way will be ignored if a `outputFile` is used.
|
|
78
|
+
|
|
63
79
|
## Configuration
|
|
64
80
|
|
|
65
81
|
You can configure the different providers with a config you pass into the `fetchAll` function call. These config parameters are outlined below. The config gets validated and you might get an error if you haven't specified all necessary properties.
|
|
@@ -76,14 +92,14 @@ This section documents all the possible configuration values. For examples see t
|
|
|
76
92
|
|
|
77
93
|
#### General
|
|
78
94
|
|
|
79
|
-
| Field | Data Type | Required | Default | Description
|
|
80
|
-
| ----------------- | --------- | -------- | ------- |
|
|
81
|
-
| `outputFile` | string |
|
|
82
|
-
| `bugzilla` | Object | No | - | Bugzilla configuration options (see below)
|
|
83
|
-
| `communityPortal` | Object | No | - | Community Portal configuration options (see below)
|
|
84
|
-
| `discourse` | Object | No | - | Discourse configuration options (see below)
|
|
85
|
-
| `github` | Object | No | - | GitHub configuration options (see below)
|
|
86
|
-
| `mediaWiki` | Object | No | - | MediaWiki configuration options (see below)
|
|
95
|
+
| Field | Data Type | Required | Default | Description |
|
|
96
|
+
| ----------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
97
|
+
| `outputFile` | string | No | - | Path to contributions output file. Contributions are read from this file and new contributions will be added here. |
|
|
98
|
+
| `bugzilla` | Object | No | - | Bugzilla configuration options (see below) |
|
|
99
|
+
| `communityPortal` | Object | No | - | Community Portal configuration options (see below) |
|
|
100
|
+
| `discourse` | Object | No | - | Discourse configuration options (see below) |
|
|
101
|
+
| `github` | Object | No | - | GitHub configuration options (see below) |
|
|
102
|
+
| `mediaWiki` | Object | No | - | MediaWiki configuration options (see below) |
|
|
87
103
|
|
|
88
104
|
#### Bugzilla
|
|
89
105
|
|
|
@@ -109,13 +125,14 @@ This section documents all the possible configuration values. For examples see t
|
|
|
109
125
|
|
|
110
126
|
#### Discourse
|
|
111
127
|
|
|
112
|
-
| Field
|
|
113
|
-
|
|
|
114
|
-
| `enabled`
|
|
115
|
-
| `baseUrl`
|
|
116
|
-
| `username`
|
|
117
|
-
| `topicType`
|
|
118
|
-
| `postType`
|
|
128
|
+
| Field | Data Type | Required | Default | Description |
|
|
129
|
+
| ----------------- | --------- | -------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
130
|
+
| `enabled` | boolean | Yes | - | Indicates whether this data source is enabled. Alternatively you can also leave off the `discourse` object entirely. |
|
|
131
|
+
| `baseUrl` | string | Yes | - | API base url without trailing slash |
|
|
132
|
+
| `username` | string | Yes | - | Username on Discourse |
|
|
133
|
+
| `topicType` | string | No | Created Discourse Topic | Label for entries related to having created a new topic. |
|
|
134
|
+
| `postType` | string | No | Posted on Discourse Topic | Label for entries related to having posted on an existing topic. |
|
|
135
|
+
| `keepDeletedPost` | boolean | No | false | If a post gets deleted and can't be queried anymore, setting this to `true` will not delete it from the previous contributions. |
|
|
119
136
|
|
|
120
137
|
#### GitHub
|
|
121
138
|
|
|
@@ -176,6 +193,7 @@ const config = {
|
|
|
176
193
|
username: 'mkohler',
|
|
177
194
|
topicType: 'Created Discourse Topic',
|
|
178
195
|
postType: 'Posted on Discourse Topic',
|
|
196
|
+
keepDeletedPost: true,
|
|
179
197
|
},
|
|
180
198
|
mediaWiki: {
|
|
181
199
|
enabled: true,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const ensureUniqueContributions = (allContributions) => {
|
|
2
|
+
const uniqueContributions = allContributions.reduce((acc, contribution) => {
|
|
3
|
+
const existingContribution = acc.find(
|
|
4
|
+
(uniqueContribution) =>
|
|
5
|
+
uniqueContribution.source === contribution.source &&
|
|
6
|
+
uniqueContribution.type === contribution.type &&
|
|
7
|
+
uniqueContribution.createdAt.getTime() ===
|
|
8
|
+
contribution.createdAt.getTime()
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
if (!existingContribution) {
|
|
12
|
+
acc.push(contribution);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return acc;
|
|
16
|
+
}, []);
|
|
17
|
+
|
|
18
|
+
return uniqueContributions;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
module.exports = {
|
|
22
|
+
ensureUniqueContributions,
|
|
23
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const test = require('ava');
|
|
2
|
+
const { ensureUniqueContributions } = require('./contributions');
|
|
3
|
+
|
|
4
|
+
const contributions = [
|
|
5
|
+
{
|
|
6
|
+
createdAt: new Date('2022-12-08T22:43:17.000Z'),
|
|
7
|
+
description: 'fix: remove unapproved sv-SE Gutenberg sentences',
|
|
8
|
+
link: 'https://github.com/common-voice/sentence-collector/pull/656',
|
|
9
|
+
type: 'Created PR',
|
|
10
|
+
source: 'github-pr-created',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
createdAt: new Date('2022-12-05T18:55:04.129Z'),
|
|
14
|
+
description:
|
|
15
|
+
'High amount of low quality submissions in Sentence Collector makes reviewing boring',
|
|
16
|
+
link: 'https://discourse.mozilla.org/t/high-amount-of-low-quality-submissions-in-sentence-collector-makes-reviewing-boring/108368/4',
|
|
17
|
+
type: 'Posted on Discourse Topic',
|
|
18
|
+
source: 'discourse-posts',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
createdAt: new Date('2022-12-05T18:55:04.129Z'),
|
|
22
|
+
description:
|
|
23
|
+
'High amount of low quality submissions in Sentence Collector makes reviewing boring',
|
|
24
|
+
link: 'https://discourse.mozilla.org/t/high-amount-of-low-quality-submissions-in-sentence-collector-makes-reviewing-boring/108368/4',
|
|
25
|
+
type: 'Posted on Discourse Topic',
|
|
26
|
+
source: 'discourse-posts',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const alreadyUniqueContributions = [contributions[0], contributions[1]];
|
|
31
|
+
|
|
32
|
+
test('should not remove anything if there was nothing to do', async (t) => {
|
|
33
|
+
const result = ensureUniqueContributions(alreadyUniqueContributions);
|
|
34
|
+
t.deepEqual(result, alreadyUniqueContributions);
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
test('should ensure uniqueness', async (t) => {
|
|
38
|
+
const result = ensureUniqueContributions(contributions);
|
|
39
|
+
t.deepEqual(result, alreadyUniqueContributions);
|
|
40
|
+
t.is(result.length, 2);
|
|
41
|
+
});
|
package/lib/discourse.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const debug = require('debug')('contributions:discourse');
|
|
2
2
|
const axios = require('axios');
|
|
3
|
+
const { ensureUniqueContributions } = require('./contributions');
|
|
3
4
|
|
|
4
5
|
const RESULTS_PER_PAGE = 30;
|
|
5
6
|
const TOPICS_CATEGORY = 'discourse-topics';
|
|
@@ -31,7 +32,7 @@ function validate(config) {
|
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
async function gather({ discourse }) {
|
|
35
|
+
async function gather({ discourse }, existingContributions = []) {
|
|
35
36
|
if (!discourse || (discourse && !discourse.enabled)) {
|
|
36
37
|
debug('Discourse source not enabled, skipping');
|
|
37
38
|
return [];
|
|
@@ -39,7 +40,25 @@ async function gather({ discourse }) {
|
|
|
39
40
|
|
|
40
41
|
const topics = await processTopics(discourse);
|
|
41
42
|
const posts = await processPosts(discourse);
|
|
42
|
-
|
|
43
|
+
|
|
44
|
+
let contributions = [...topics, ...posts];
|
|
45
|
+
if (discourse.keepDeletedPost) {
|
|
46
|
+
debug('Keeping deleted posts and filtering by uniqueness');
|
|
47
|
+
const existingDiscourseContributions = existingContributions.filter(
|
|
48
|
+
(contribution) =>
|
|
49
|
+
contribution.source === TOPICS_CATEGORY ||
|
|
50
|
+
contribution.source === POSTS_CATEGORY
|
|
51
|
+
);
|
|
52
|
+
const allContributions = [
|
|
53
|
+
...existingDiscourseContributions.map((contribution) => ({
|
|
54
|
+
...contribution,
|
|
55
|
+
createdAt: new Date(contribution.createdAt),
|
|
56
|
+
})),
|
|
57
|
+
...topics,
|
|
58
|
+
...posts,
|
|
59
|
+
];
|
|
60
|
+
contributions = ensureUniqueContributions(allContributions);
|
|
61
|
+
}
|
|
43
62
|
|
|
44
63
|
debug('Finished gathering contributions');
|
|
45
64
|
return contributions;
|
package/lib/discourse.test.js
CHANGED
|
@@ -28,6 +28,12 @@ const TOPICS_SMALL = {
|
|
|
28
28
|
},
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
+
const TOPICS_EMPTY = {
|
|
32
|
+
topic_list: {
|
|
33
|
+
topics: [],
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
31
37
|
const POSTS = {
|
|
32
38
|
user_actions: new Array(30).fill(0).map((_, index) => ({
|
|
33
39
|
created_at: new Date('2020-04-13'),
|
|
@@ -173,3 +179,51 @@ test.serial('should format with custom types', async (t) => {
|
|
|
173
179
|
source: 'discourse-posts',
|
|
174
180
|
});
|
|
175
181
|
});
|
|
182
|
+
|
|
183
|
+
test.serial('should keep deleted post', async (t) => {
|
|
184
|
+
const specificTypeConfig = {
|
|
185
|
+
discourse: {
|
|
186
|
+
...config.discourse,
|
|
187
|
+
topicType: 'Topic created!',
|
|
188
|
+
postType: 'Posted!',
|
|
189
|
+
keepDeletedPost: true,
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const existingContributions = [
|
|
194
|
+
{
|
|
195
|
+
createdAt: new Date('2020-04-13'),
|
|
196
|
+
description: 'Topic 0',
|
|
197
|
+
link: 'https://discourse.mozilla.org/t/slug-0/0',
|
|
198
|
+
type: 'Topic created!',
|
|
199
|
+
source: 'discourse-topics',
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
|
|
203
|
+
axios.get.onCall(0).resolves({ data: TOPICS_EMPTY });
|
|
204
|
+
axios.get.onCall(1).resolves({ data: POSTS_SMALL });
|
|
205
|
+
|
|
206
|
+
const contributions = await discourse.gather(
|
|
207
|
+
specificTypeConfig,
|
|
208
|
+
existingContributions
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
t.is(contributions.length, 2);
|
|
212
|
+
// Topic
|
|
213
|
+
// This topic was not returned from the response, but is an
|
|
214
|
+
// already existing contribution passed in.
|
|
215
|
+
t.deepEqual(contributions[0], {
|
|
216
|
+
createdAt: new Date('2020-04-13'),
|
|
217
|
+
description: 'Topic 0',
|
|
218
|
+
link: 'https://discourse.mozilla.org/t/slug-0/0',
|
|
219
|
+
type: specificTypeConfig.discourse.topicType,
|
|
220
|
+
source: 'discourse-topics',
|
|
221
|
+
});
|
|
222
|
+
t.deepEqual(contributions[1], {
|
|
223
|
+
createdAt: new Date('2020-04-13'),
|
|
224
|
+
description: 'Post 1',
|
|
225
|
+
link: 'https://discourse.mozilla.org/t/slug-1/1/1',
|
|
226
|
+
type: specificTypeConfig.discourse.postType,
|
|
227
|
+
source: 'discourse-posts',
|
|
228
|
+
});
|
|
229
|
+
});
|
package/lib/fetch.js
CHANGED
|
@@ -8,24 +8,38 @@ const github = require('./github');
|
|
|
8
8
|
const { validateConfig } = require('./validator');
|
|
9
9
|
const wiki = require('./wiki');
|
|
10
10
|
|
|
11
|
-
async function fetchAll(config) {
|
|
11
|
+
async function fetchAll(config, contributions = []) {
|
|
12
12
|
validateConfig(config);
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
let existingContributions = contributions;
|
|
15
|
+
if (config.outputFile) {
|
|
16
|
+
debug('checking output file...');
|
|
17
|
+
try {
|
|
18
|
+
await fs.stat(config.outputFile);
|
|
19
|
+
// Passing existing contributions through the parameter is overwritten
|
|
20
|
+
// if an outputFile exists.
|
|
21
|
+
existingContributions = JSON.parse(await fs.readFile(config.outputFile));
|
|
22
|
+
} catch (error) {
|
|
23
|
+
if (error.code === 'ENOENT') {
|
|
24
|
+
debug('output file does not exist, creating!');
|
|
25
|
+
await fs.writeFile(config.outputFile, JSON.stringify([]));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
|
|
30
|
+
debug('fetching...');
|
|
19
31
|
const bugzillaResult = await bugzilla.gather(config, existingContributions);
|
|
20
32
|
const githubResult = await github.gather(config, existingContributions);
|
|
21
33
|
const wikiResult = await wiki.gather(config);
|
|
22
34
|
const communityPortalResult = await communityPortal.gather(config);
|
|
23
|
-
const discourseResult = await discourse.gather(config);
|
|
35
|
+
const discourseResult = await discourse.gather(config, existingContributions);
|
|
24
36
|
|
|
25
37
|
// Some types are fetched on every update run, therefore we want to filter them out for now.
|
|
26
38
|
// Otherwise we might end up with duplicate entries we'd need to filter.
|
|
27
39
|
// We need to make sure we always will save the "reps" source entries, as we do not fetch those
|
|
28
40
|
// anymore.
|
|
41
|
+
// This also includes sources that handle their own "existing contributions" keeping
|
|
42
|
+
// even if only new contributions are fetched.
|
|
29
43
|
const ALWAYS_FULL_FETCH_SOURCE_ENTRIES = [
|
|
30
44
|
communityPortal.EVENTS_CATEGORY,
|
|
31
45
|
communityPortal.CAMPAIGNS_CATEGORY,
|
|
@@ -59,17 +73,22 @@ async function fetchAll(config) {
|
|
|
59
73
|
|
|
60
74
|
if (uniqueContributions.length === existingContributions.length) {
|
|
61
75
|
debug('NO_UPDATE_ABORTING');
|
|
62
|
-
return;
|
|
76
|
+
return uniqueContributions;
|
|
63
77
|
}
|
|
64
78
|
|
|
65
79
|
uniqueContributions.sort(
|
|
66
80
|
(a, b) => new Date(b.createdAt) - new Date(a.createdAt)
|
|
67
81
|
);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
82
|
+
|
|
83
|
+
if (config.outputFile) {
|
|
84
|
+
await fs.writeFile(
|
|
85
|
+
config.outputFile,
|
|
86
|
+
`${JSON.stringify(uniqueContributions, null, 2)}\n`
|
|
87
|
+
);
|
|
88
|
+
debug('FILE_WRITTEN');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return uniqueContributions;
|
|
73
92
|
}
|
|
74
93
|
|
|
75
94
|
module.exports = {
|
package/lib/fetch.test.js
CHANGED
|
@@ -21,6 +21,7 @@ test.beforeEach((t) => {
|
|
|
21
21
|
// eslint-disable-next-line no-param-reassign
|
|
22
22
|
t.context.sandbox.originalJSONParse = JSON.parse;
|
|
23
23
|
t.context.sandbox.stub(fs, 'readFile').resolves('');
|
|
24
|
+
t.context.sandbox.stub(fs, 'stat').resolves('');
|
|
24
25
|
t.context.sandbox.stub(fs, 'writeFile').resolves('');
|
|
25
26
|
t.context.sandbox.stub(JSON, 'parse').returns([]);
|
|
26
27
|
t.context.sandbox.stub(validator, 'validateConfig').returns([]);
|
|
@@ -34,9 +35,21 @@ test.afterEach.always((t) => {
|
|
|
34
35
|
t.context.sandbox.restore();
|
|
35
36
|
});
|
|
36
37
|
|
|
38
|
+
test.serial(
|
|
39
|
+
'should create a contributions file if file does not exist',
|
|
40
|
+
async (t) => {
|
|
41
|
+
const error = new Error('oh no, no config file!');
|
|
42
|
+
error.code = 'ENOENT';
|
|
43
|
+
fs.stat.throws(error);
|
|
44
|
+
await fetch.fetchAll(config);
|
|
45
|
+
t.is(fs.writeFile.callCount, 1);
|
|
46
|
+
t.is(fs.writeFile.getCall(0).args[0], config.outputFile);
|
|
47
|
+
t.is(fs.writeFile.getCall(0).args[1], '[]');
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
|
|
37
51
|
test.serial('should not write file if there was nothing to do', async (t) => {
|
|
38
|
-
|
|
39
|
-
t.is(result, undefined);
|
|
52
|
+
await fetch.fetchAll(config);
|
|
40
53
|
t.is(fs.writeFile.callCount, 0);
|
|
41
54
|
});
|
|
42
55
|
|
|
@@ -87,3 +100,23 @@ test.serial('should take all return values', async (t) => {
|
|
|
87
100
|
4
|
|
88
101
|
);
|
|
89
102
|
});
|
|
103
|
+
|
|
104
|
+
test.serial('should return contributions', async (t) => {
|
|
105
|
+
const contributions = [{ source: 'community-portal' }];
|
|
106
|
+
communityPortal.gather.returns(contributions);
|
|
107
|
+
|
|
108
|
+
const result = await fetch.fetchAll(config);
|
|
109
|
+
t.deepEqual(result, contributions);
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
test.serial('should consider passed contributions', async (t) => {
|
|
113
|
+
const contributions = [{ source: 'community-portal' }];
|
|
114
|
+
communityPortal.gather.returns(contributions);
|
|
115
|
+
const existingContributions = [
|
|
116
|
+
{ source: 'existing' },
|
|
117
|
+
{ source: 'existing' },
|
|
118
|
+
];
|
|
119
|
+
|
|
120
|
+
const result = await fetch.fetchAll({}, existingContributions);
|
|
121
|
+
t.deepEqual(result, [...existingContributions, ...contributions]);
|
|
122
|
+
});
|
package/lib/validator.js
CHANGED
|
@@ -15,10 +15,6 @@ function validateConfig(config) {
|
|
|
15
15
|
throw new Error('No config passed!');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
if (!config.outputFile) {
|
|
19
|
-
throw new Error('outputFile is required');
|
|
20
|
-
}
|
|
21
|
-
|
|
22
18
|
validateCommunityPortal(config.communityPortal);
|
|
23
19
|
validateDiscourse(config.discourse);
|
|
24
20
|
validateWiki(config.mediaWiki);
|
package/lib/validator.test.js
CHANGED
|
@@ -34,10 +34,6 @@ test.serial('should throw when missing config', (t) => {
|
|
|
34
34
|
t.throws(() => validator.validateConfig());
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
test.serial('should throw when outputFile is not defined', (t) => {
|
|
38
|
-
t.throws(() => validator.validateConfig({ somethingElse: true }));
|
|
39
|
-
});
|
|
40
|
-
|
|
41
37
|
test.serial('should throw when community portal validation fails', (t) => {
|
|
42
38
|
communityPortal.validate.rejects(new Error('oh no'));
|
|
43
39
|
t.throws(() => validator.validateConfig());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volunteer-contributions-fetch",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Library to fetch volunteer contributions from several sources such as GitHub",
|
|
5
5
|
"author": "Michael Kohler",
|
|
6
6
|
"license": "MIT",
|
|
@@ -10,25 +10,25 @@
|
|
|
10
10
|
},
|
|
11
11
|
"main": "index.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@octokit/rest": "^
|
|
14
|
-
"axios": "^1.
|
|
13
|
+
"@octokit/rest": "^20.0.1",
|
|
14
|
+
"axios": "^1.4.0",
|
|
15
15
|
"debug": "^4.3.4",
|
|
16
|
-
"jsdom": "^
|
|
17
|
-
"xml2js": "^0.
|
|
16
|
+
"jsdom": "^22.1.0",
|
|
17
|
+
"xml2js": "^0.6.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@commitlint/cli": "^17.
|
|
21
|
-
"@commitlint/config-angular": "^17.
|
|
22
|
-
"ava": "^5.
|
|
23
|
-
"eslint": "^8.
|
|
20
|
+
"@commitlint/cli": "^17.7.1",
|
|
21
|
+
"@commitlint/config-angular": "^17.7.0",
|
|
22
|
+
"ava": "^5.3.1",
|
|
23
|
+
"eslint": "^8.47.0",
|
|
24
24
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
25
|
-
"eslint-config-prettier": "^
|
|
26
|
-
"eslint-plugin-prettier": "^
|
|
25
|
+
"eslint-config-prettier": "^9.0.0",
|
|
26
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
27
27
|
"husky": "^8.0.3",
|
|
28
28
|
"nyc": "^15.1.0",
|
|
29
|
-
"prettier": "^
|
|
30
|
-
"semantic-release": "^21.0.
|
|
31
|
-
"sinon": "^15.0
|
|
29
|
+
"prettier": "^3.0.2",
|
|
30
|
+
"semantic-release": "^21.0.7",
|
|
31
|
+
"sinon": "^15.2.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prepare": "husky install",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"test": "nyc ava"
|
|
40
40
|
},
|
|
41
41
|
"prettier": {
|
|
42
|
-
"singleQuote": true
|
|
42
|
+
"singleQuote": true,
|
|
43
|
+
"trailingComma": "es5"
|
|
43
44
|
},
|
|
44
45
|
"release": {
|
|
45
46
|
"branches": [
|