wikiploy 1.4.1 → 1.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/DEV.md +7 -0
- package/assets/test.css +2 -2
- package/assets/test.js +6 -1
- package/package.json +2 -2
- package/src/WikiployBase .js +1 -1
- package/test/Wikiploy.test.js +4 -4
package/DEV.md
CHANGED
|
@@ -40,6 +40,13 @@ Step. 1. Check.
|
|
|
40
40
|
npm up
|
|
41
41
|
npm test
|
|
42
42
|
```
|
|
43
|
+
If updating Puppeteer, the also:
|
|
44
|
+
- Change `assets/test.js` and/or css.
|
|
45
|
+
- Run `src/ploy_test_full.js`.
|
|
46
|
+
If updating MWN, the also:
|
|
47
|
+
- Change `assets/test.js` and/or css.
|
|
48
|
+
- Run `src/ploy_test_lite.js`.
|
|
49
|
+
|
|
43
50
|
Step. 2. Change version in the package.
|
|
44
51
|
|
|
45
52
|
Step. 3. Final commands.
|
package/assets/test.css
CHANGED
package/assets/test.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wikiploy",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "User scripts and gadgets deployment for MediaWiki (Wikipedia).",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"homepage": "https://github.com/Eccenux/Wikiploy#readme",
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"mwn": "1.11.x",
|
|
29
|
-
"puppeteer": "
|
|
29
|
+
"puppeteer": "21.0.x"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"chai": "4.x",
|
package/src/WikiployBase .js
CHANGED
|
@@ -30,7 +30,7 @@ export default class WikiployBase {
|
|
|
30
30
|
*/
|
|
31
31
|
prepareSummary(config) {
|
|
32
32
|
let summary = typeof config.summary === 'function' ? config.summary() : this.summary(config);
|
|
33
|
-
return
|
|
33
|
+
return `${summary} • [[en:WP:Wikiploy|Wikiploy]]`;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/** @private Get site for a config. */
|
package/test/Wikiploy.test.js
CHANGED
|
@@ -6,7 +6,7 @@ import DeployConfig from '../src/DeployConfig.js';
|
|
|
6
6
|
describe('Wikiploy', function () {
|
|
7
7
|
|
|
8
8
|
describe('summary', function () {
|
|
9
|
-
let tag = '
|
|
9
|
+
let tag = '• [[en:WP:Wikiploy|Wikiploy]]';
|
|
10
10
|
function prepareSummary(ployBot, configDef) {
|
|
11
11
|
const config = new DeployConfig(configDef);
|
|
12
12
|
console.log({config, summary:config.summary?config.summary():'NN'});
|
|
@@ -16,7 +16,7 @@ describe('Wikiploy', function () {
|
|
|
16
16
|
|
|
17
17
|
it('should use config string', function () {
|
|
18
18
|
let version = 'v1.1';
|
|
19
|
-
let expected =
|
|
19
|
+
let expected = version + ' ' + tag;
|
|
20
20
|
const ployBot = new Wikiploy();
|
|
21
21
|
const summary = prepareSummary(ployBot, {
|
|
22
22
|
src: 'test.js',
|
|
@@ -26,7 +26,7 @@ describe('Wikiploy', function () {
|
|
|
26
26
|
});
|
|
27
27
|
it('should use config function', function () {
|
|
28
28
|
let version = 'v1.2';
|
|
29
|
-
let expected =
|
|
29
|
+
let expected = version + ' ' + tag;
|
|
30
30
|
const ployBot = new Wikiploy();
|
|
31
31
|
const summary = prepareSummary(ployBot, {
|
|
32
32
|
src: 'test.js',
|
|
@@ -36,7 +36,7 @@ describe('Wikiploy', function () {
|
|
|
36
36
|
});
|
|
37
37
|
it('should use global function', function () {
|
|
38
38
|
let version = 'v1.3';
|
|
39
|
-
let expected =
|
|
39
|
+
let expected = version + ' ' + tag;
|
|
40
40
|
const ployBot = new Wikiploy();
|
|
41
41
|
ployBot.summary = () => version;
|
|
42
42
|
const summary = prepareSummary(ployBot, {
|