wikiploy 1.4.1 → 1.5.1

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 CHANGED
@@ -37,9 +37,17 @@ You can also run (and debug) each test case directly from a test file. You might
37
37
 
38
38
  Step. 1. Check.
39
39
  ```bash
40
+ git pull
40
41
  npm up
41
42
  npm test
42
43
  ```
44
+ If updating Puppeteer, the also:
45
+ - Change `assets/test.js` and/or css.
46
+ - Run `src/ploy_test_full.js`.
47
+ If updating MWN, the also:
48
+ - Change `assets/test.js` and/or css.
49
+ - Run `src/ploy_test_lite.js`.
50
+
43
51
  Step. 2. Change version in the package.
44
52
 
45
53
  Step. 3. Final commands.
package/assets/test.css CHANGED
@@ -2,7 +2,7 @@
2
2
  .yadda.yadda.yadda {
3
3
  content: 'bla, bla, bla';
4
4
  }
5
- .something {
5
+ .tavern {
6
6
  display: block;
7
7
  }
8
- /* puppeteer 20.8.x xor mwn 1.11.x */
8
+ /* puppeteer 21.1.x xor mwn 1.11.x */
package/assets/test.js CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Wikiploy example.
3
+ *
4
+ * Deployed with love using Wikiploy: [[Wikipedia:Wikiploy]]
5
+ */
1
6
  // test.js
2
7
  console.log('test');
3
- // puppeteer 20.8.x xor mwn 1.11.x
8
+ /* puppeteer 21.1.x xor mwn 1.11.x */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikiploy",
3
- "version": "1.4.1",
3
+ "version": "1.5.1",
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": "20.8.x"
29
+ "puppeteer": "21.1.x"
30
30
  },
31
31
  "devDependencies": {
32
32
  "chai": "4.x",
package/src/WikiOps.js CHANGED
@@ -77,7 +77,7 @@ export default class WikiOps {
77
77
 
78
78
  /** Save. */
79
79
  async saveEdit(targetPage) {
80
- const timeout = 200;
80
+ const timeout = 500;
81
81
 
82
82
  await scrollIntoViewIfNeeded([
83
83
  '#wpSave'
@@ -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 `#Wikiploy ${summary}`;
33
+ return `${summary} • [[en:WP:Wikiploy|Wikiploy]]`;
34
34
  }
35
35
 
36
36
  /** @private Get site for a config. */
@@ -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 = '#Wikiploy';
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 = tag + ' ' + version;
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 = tag + ' ' + version;
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 = tag + ' ' + version;
39
+ let expected = version + ' ' + tag;
40
40
  const ployBot = new Wikiploy();
41
41
  ployBot.summary = () => version;
42
42
  const summary = prepareSummary(ployBot, {