wikiploy 2.1.0 → 2.1.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 +40 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,6 +14,46 @@ See also:
|
|
|
14
14
|
|
|
15
15
|
## New capabilities
|
|
16
16
|
|
|
17
|
+
### setupSummary (v2.1)
|
|
18
|
+
|
|
19
|
+
A helper function that can replace your usages of `userPrompt`. It prompts a user running wikiploy for a summary of changes.
|
|
20
|
+
It can optionally add a version number to the full summary of your edits (deploy-edits).
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
The `setupSummary` function requires a `Wikiploy` bot object and optionally takes a gadget version and a standard summary text.
|
|
25
|
+
|
|
26
|
+
- `ployBot`: A `Wikiploy` bot object. This is required to setup the `summary()` function.
|
|
27
|
+
- `version` (optional): The version of your gadget. Defaults to an empty string if not provided.
|
|
28
|
+
- `standardSummary` (optional): A string that provides a standard summary (aside from the version). Defaults to "changes from Github".
|
|
29
|
+
|
|
30
|
+
If your answer to the prompt would be: "fixed bug #123", you would get a full summary: "v5.6.0: fixed bug #123" (v${version}: ${summary}).
|
|
31
|
+
For no answer you would get: "v5.6.0: changes from Github".
|
|
32
|
+
|
|
33
|
+
#### Usage
|
|
34
|
+
|
|
35
|
+
Basic usage:
|
|
36
|
+
```js
|
|
37
|
+
// custom summary from a prompt
|
|
38
|
+
await setupSummary(ployBot);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Version from package:
|
|
42
|
+
```js
|
|
43
|
+
(async () => {
|
|
44
|
+
// custom summary from a prompt
|
|
45
|
+
let version = await readVersion('package.json');
|
|
46
|
+
await setupSummary(ployBot, version);
|
|
47
|
+
|
|
48
|
+
// [...]
|
|
49
|
+
|
|
50
|
+
await ployBot.deploy(configs);
|
|
51
|
+
})().catch(err => {
|
|
52
|
+
console.error(err);
|
|
53
|
+
process.exit(1);
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
17
57
|
### Lightweight Dependencies (v2.0)
|
|
18
58
|
|
|
19
59
|
We had a good run, but it's time to bid farewell to [Puppeteer](https://pptr.dev/) and free the puppets ;). Obviously, this might be a breaking change if you really need to use it. However, the Wikiploy API doesn't really change...
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiploy",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "User scripts and gadgets deployment for MediaWiki (Wikipedia).",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"bump-version": "0.5.0",
|
|
33
|
-
"chai": "
|
|
33
|
+
"chai": "5.x",
|
|
34
34
|
"eslint": "8.x",
|
|
35
35
|
"mocha": "10.x"
|
|
36
36
|
}
|