mediawiki/services/cxserver: main (log #959439)

sourcepatches

This run took 72 seconds.

$ date
--- stdout ---
Sat Mar 18 21:58:47 UTC 2023

--- end ---
$ git clone file:///srv/git/mediawiki-services-cxserver.git repo --depth=1 -b master
--- stderr ---
Cloning into 'repo'...
--- stdout ---

--- end ---
$ git config user.name libraryupgrader
--- stdout ---

--- end ---
$ git config user.email tools.libraryupgrader@tools.wmflabs.org
--- stdout ---

--- end ---
$ git submodule update --init
--- stdout ---

--- end ---
$ grr init
--- stdout ---
Installed commit-msg hook.

--- end ---
$ git show-ref refs/heads/master
--- stdout ---
7011c9700261b29222f060ec482a234b8eaecd6b refs/heads/master

--- end ---
$ /usr/bin/npm audit --json --legacy-peer-deps
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "limitation": {
      "name": "limitation",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "wikimedia-kad-fork"
      ],
      "effects": [
        "service-runner"
      ],
      "range": ">=0.2.3",
      "nodes": [
        "node_modules/limitation"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    },
    "ms": {
      "name": "ms",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1088818,
          "name": "ms",
          "dependency": "ms",
          "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability",
          "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f",
          "severity": "moderate",
          "cwe": [
            "CWE-1333"
          ],
          "cvss": {
            "score": 5.3,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
          },
          "range": "<2.0.0"
        }
      ],
      "effects": [
        "wikimedia-kad-fork"
      ],
      "range": "<2.0.0",
      "nodes": [
        "node_modules/wikimedia-kad-fork/node_modules/ms"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    },
    "preq": {
      "name": "preq",
      "severity": "high",
      "isDirect": true,
      "via": [
        "request",
        "requestretry"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/preq"
      ],
      "fixAvailable": false
    },
    "request": {
      "name": "request",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1091410,
          "name": "request",
          "dependency": "request",
          "title": "Server-Side Request Forgery in Request",
          "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
          "severity": "moderate",
          "cwe": [
            "CWE-918"
          ],
          "cvss": {
            "score": 0,
            "vectorString": null
          },
          "range": "<=2.88.2"
        }
      ],
      "effects": [
        "preq"
      ],
      "range": "*",
      "nodes": [
        "node_modules/request"
      ],
      "fixAvailable": false
    },
    "requestretry": {
      "name": "requestretry",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1090420,
          "name": "requestretry",
          "dependency": "requestretry",
          "title": "Cookie exposure in requestretry",
          "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45",
          "severity": "high",
          "cwe": [
            "CWE-200"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
          },
          "range": "<7.0.0"
        }
      ],
      "effects": [
        "preq"
      ],
      "range": "<7.0.0",
      "nodes": [
        "node_modules/requestretry"
      ],
      "fixAvailable": false
    },
    "service-runner": {
      "name": "service-runner",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "limitation"
      ],
      "effects": [],
      "range": ">=3.1.0",
      "nodes": [
        "node_modules/service-runner"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    },
    "wikimedia-kad-fork": {
      "name": "wikimedia-kad-fork",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "ms"
      ],
      "effects": [
        "limitation"
      ],
      "range": "*",
      "nodes": [
        "node_modules/wikimedia-kad-fork"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 5,
      "high": 2,
      "critical": 0,
      "total": 7
    },
    "dependencies": {
      "prod": 319,
      "dev": 322,
      "optional": 60,
      "peer": 0,
      "peerOptional": 0,
      "total": 699
    }
  }
}

--- end ---
$ /usr/bin/npm audit --json --legacy-peer-deps
--- stdout ---
{
  "auditReportVersion": 2,
  "vulnerabilities": {
    "limitation": {
      "name": "limitation",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "wikimedia-kad-fork"
      ],
      "effects": [
        "service-runner"
      ],
      "range": ">=0.2.3",
      "nodes": [
        "node_modules/limitation"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    },
    "ms": {
      "name": "ms",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1088818,
          "name": "ms",
          "dependency": "ms",
          "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability",
          "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f",
          "severity": "moderate",
          "cwe": [
            "CWE-1333"
          ],
          "cvss": {
            "score": 5.3,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
          },
          "range": "<2.0.0"
        }
      ],
      "effects": [
        "wikimedia-kad-fork"
      ],
      "range": "<2.0.0",
      "nodes": [
        "node_modules/wikimedia-kad-fork/node_modules/ms"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    },
    "preq": {
      "name": "preq",
      "severity": "high",
      "isDirect": true,
      "via": [
        "request",
        "requestretry"
      ],
      "effects": [],
      "range": "*",
      "nodes": [
        "node_modules/preq"
      ],
      "fixAvailable": false
    },
    "request": {
      "name": "request",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1091410,
          "name": "request",
          "dependency": "request",
          "title": "Server-Side Request Forgery in Request",
          "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
          "severity": "moderate",
          "cwe": [
            "CWE-918"
          ],
          "cvss": {
            "score": 0,
            "vectorString": null
          },
          "range": "<=2.88.2"
        }
      ],
      "effects": [
        "preq"
      ],
      "range": "*",
      "nodes": [
        "node_modules/request"
      ],
      "fixAvailable": false
    },
    "requestretry": {
      "name": "requestretry",
      "severity": "high",
      "isDirect": false,
      "via": [
        {
          "source": 1090420,
          "name": "requestretry",
          "dependency": "requestretry",
          "title": "Cookie exposure in requestretry",
          "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45",
          "severity": "high",
          "cwe": [
            "CWE-200"
          ],
          "cvss": {
            "score": 7.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
          },
          "range": "<7.0.0"
        }
      ],
      "effects": [
        "preq"
      ],
      "range": "<7.0.0",
      "nodes": [
        "node_modules/requestretry"
      ],
      "fixAvailable": false
    },
    "service-runner": {
      "name": "service-runner",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "limitation"
      ],
      "effects": [],
      "range": ">=3.1.0",
      "nodes": [
        "node_modules/service-runner"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    },
    "wikimedia-kad-fork": {
      "name": "wikimedia-kad-fork",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        "ms"
      ],
      "effects": [
        "limitation"
      ],
      "range": "*",
      "nodes": [
        "node_modules/wikimedia-kad-fork"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "3.0.0",
        "isSemVerMajor": true
      }
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 5,
      "high": 2,
      "critical": 0,
      "total": 7
    },
    "dependencies": {
      "prod": 319,
      "dev": 322,
      "optional": 60,
      "peer": 0,
      "peerOptional": 0,
      "total": 699
    }
  }
}

--- end ---
Attempting to npm audit fix
$ /usr/bin/npm audit fix --dry-run --only=dev --json --legacy-peer-deps
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
--- stdout ---
{
  "added": 699,
  "removed": 0,
  "changed": 0,
  "audited": 700,
  "funding": 71,
  "audit": {
    "auditReportVersion": 2,
    "vulnerabilities": {
      "limitation": {
        "name": "limitation",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          "wikimedia-kad-fork"
        ],
        "effects": [
          "service-runner"
        ],
        "range": ">=0.2.3",
        "nodes": [
          "node_modules/limitation"
        ],
        "fixAvailable": {
          "name": "service-runner",
          "version": "3.0.0",
          "isSemVerMajor": true
        }
      },
      "ms": {
        "name": "ms",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1088818,
            "name": "ms",
            "dependency": "ms",
            "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability",
            "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f",
            "severity": "moderate",
            "cwe": [
              "CWE-1333"
            ],
            "cvss": {
              "score": 5.3,
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
            },
            "range": "<2.0.0"
          }
        ],
        "effects": [
          "wikimedia-kad-fork"
        ],
        "range": "<2.0.0",
        "nodes": [
          "node_modules/wikimedia-kad-fork/node_modules/ms"
        ],
        "fixAvailable": {
          "name": "service-runner",
          "version": "3.0.0",
          "isSemVerMajor": true
        }
      },
      "preq": {
        "name": "preq",
        "severity": "high",
        "isDirect": true,
        "via": [
          "request",
          "requestretry"
        ],
        "effects": [],
        "range": "*",
        "nodes": [
          "node_modules/preq"
        ],
        "fixAvailable": false
      },
      "request": {
        "name": "request",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1091410,
            "name": "request",
            "dependency": "request",
            "title": "Server-Side Request Forgery in Request",
            "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6",
            "severity": "moderate",
            "cwe": [
              "CWE-918"
            ],
            "cvss": {
              "score": 0,
              "vectorString": null
            },
            "range": "<=2.88.2"
          }
        ],
        "effects": [
          "preq"
        ],
        "range": "*",
        "nodes": [
          "node_modules/request"
        ],
        "fixAvailable": false
      },
      "requestretry": {
        "name": "requestretry",
        "severity": "high",
        "isDirect": false,
        "via": [
          {
            "source": 1090420,
            "name": "requestretry",
            "dependency": "requestretry",
            "title": "Cookie exposure in requestretry",
            "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45",
            "severity": "high",
            "cwe": [
              "CWE-200"
            ],
            "cvss": {
              "score": 7.5,
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
            },
            "range": "<7.0.0"
          }
        ],
        "effects": [
          "preq"
        ],
        "range": "<7.0.0",
        "nodes": [
          "node_modules/requestretry"
        ],
        "fixAvailable": false
      },
      "service-runner": {
        "name": "service-runner",
        "severity": "moderate",
        "isDirect": true,
        "via": [
          "limitation"
        ],
        "effects": [],
        "range": ">=3.1.0",
        "nodes": [
          "node_modules/service-runner"
        ],
        "fixAvailable": {
          "name": "service-runner",
          "version": "3.0.0",
          "isSemVerMajor": true
        }
      },
      "wikimedia-kad-fork": {
        "name": "wikimedia-kad-fork",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          "ms"
        ],
        "effects": [
          "limitation"
        ],
        "range": "*",
        "nodes": [
          "node_modules/wikimedia-kad-fork"
        ],
        "fixAvailable": {
          "name": "service-runner",
          "version": "3.0.0",
          "isSemVerMajor": true
        }
      }
    },
    "metadata": {
      "vulnerabilities": {
        "info": 0,
        "low": 0,
        "moderate": 5,
        "high": 2,
        "critical": 0,
        "total": 7
      },
      "dependencies": {
        "prod": 319,
        "dev": 322,
        "optional": 60,
        "peer": 0,
        "peerOptional": 0,
        "total": 699
      }
    }
  }
}

--- end ---
{"added": 699, "removed": 0, "changed": 0, "audited": 700, "funding": 71, "audit": {"auditReportVersion": 2, "vulnerabilities": {"limitation": {"name": "limitation", "severity": "moderate", "isDirect": false, "via": ["wikimedia-kad-fork"], "effects": ["service-runner"], "range": ">=0.2.3", "nodes": ["node_modules/limitation"], "fixAvailable": {"name": "service-runner", "version": "3.0.0", "isSemVerMajor": true}}, "ms": {"name": "ms", "severity": "moderate", "isDirect": false, "via": [{"source": 1088818, "name": "ms", "dependency": "ms", "title": "Vercel ms Inefficient Regular Expression Complexity vulnerability", "url": "https://github.com/advisories/GHSA-w9mr-4mfr-499f", "severity": "moderate", "cwe": ["CWE-1333"], "cvss": {"score": 5.3, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"}, "range": "<2.0.0"}], "effects": ["wikimedia-kad-fork"], "range": "<2.0.0", "nodes": ["node_modules/wikimedia-kad-fork/node_modules/ms"], "fixAvailable": {"name": "service-runner", "version": "3.0.0", "isSemVerMajor": true}}, "preq": {"name": "preq", "severity": "high", "isDirect": true, "via": ["request", "requestretry"], "effects": [], "range": "*", "nodes": ["node_modules/preq"], "fixAvailable": false}, "request": {"name": "request", "severity": "moderate", "isDirect": false, "via": [{"source": 1091410, "name": "request", "dependency": "request", "title": "Server-Side Request Forgery in Request", "url": "https://github.com/advisories/GHSA-p8p7-x288-28g6", "severity": "moderate", "cwe": ["CWE-918"], "cvss": {"score": 0, "vectorString": null}, "range": "<=2.88.2"}], "effects": ["preq"], "range": "*", "nodes": ["node_modules/request"], "fixAvailable": false}, "requestretry": {"name": "requestretry", "severity": "high", "isDirect": false, "via": [{"source": 1090420, "name": "requestretry", "dependency": "requestretry", "title": "Cookie exposure in requestretry", "url": "https://github.com/advisories/GHSA-hjp8-2cm3-cc45", "severity": "high", "cwe": ["CWE-200"], "cvss": {"score": 7.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"}, "range": "<7.0.0"}], "effects": ["preq"], "range": "<7.0.0", "nodes": ["node_modules/requestretry"], "fixAvailable": false}, "service-runner": {"name": "service-runner", "severity": "moderate", "isDirect": true, "via": ["limitation"], "effects": [], "range": ">=3.1.0", "nodes": ["node_modules/service-runner"], "fixAvailable": {"name": "service-runner", "version": "3.0.0", "isSemVerMajor": true}}, "wikimedia-kad-fork": {"name": "wikimedia-kad-fork", "severity": "moderate", "isDirect": false, "via": ["ms"], "effects": ["limitation"], "range": "*", "nodes": ["node_modules/wikimedia-kad-fork"], "fixAvailable": {"name": "service-runner", "version": "3.0.0", "isSemVerMajor": true}}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 5, "high": 2, "critical": 0, "total": 7}, "dependencies": {"prod": 319, "dev": 322, "optional": 60, "peer": 0, "peerOptional": 0, "total": 699}}}}
$ /usr/bin/npm audit fix --only=dev --legacy-peer-deps
--- stderr ---
npm WARN invalid config only="dev" set in command line options
npm WARN invalid config Must be one of: null, prod, production
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated kad-fs@0.0.4: This package is no longer maintained.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained.
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
--- stdout ---

added 698 packages, and audited 699 packages in 8s

71 packages are looking for funding
  run `npm fund` for details

# npm audit report

ms  <2.0.0
Severity: moderate
Vercel ms Inefficient Regular Expression Complexity vulnerability - https://github.com/advisories/GHSA-w9mr-4mfr-499f
fix available via `npm audit fix --force`
Will install service-runner@3.0.0, which is a breaking change
node_modules/wikimedia-kad-fork/node_modules/ms
  wikimedia-kad-fork  *
  Depends on vulnerable versions of ms
  node_modules/wikimedia-kad-fork
    limitation  >=0.2.3
    Depends on vulnerable versions of wikimedia-kad-fork
    node_modules/limitation
      service-runner  >=3.1.0
      Depends on vulnerable versions of limitation
      node_modules/service-runner

request  *
Severity: moderate
Server-Side Request Forgery in Request - https://github.com/advisories/GHSA-p8p7-x288-28g6
No fix available
node_modules/request
  preq  *
  Depends on vulnerable versions of request
  Depends on vulnerable versions of requestretry
  node_modules/preq

requestretry  <7.0.0
Severity: high
Cookie exposure in requestretry - https://github.com/advisories/GHSA-hjp8-2cm3-cc45
No fix available
node_modules/requestretry

7 vulnerabilities (5 moderate, 2 high)

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
Verifying that tests still pass
$ /usr/bin/npm ci --legacy-peer-deps
--- stderr ---
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated kad-fs@0.0.4: This package is no longer maintained.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained.
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
--- stdout ---

added 698 packages, and audited 699 packages in 8s

71 packages are looking for funding
  run `npm fund` for details

7 vulnerabilities (5 moderate, 2 high)

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

--- end ---
$ /usr/bin/npm test
--- stdout ---

> cxserver@1.2.0 test
> npm run lint && npm run unittest


> cxserver@1.2.0 lint
> eslint .


/src/repo/bin/adapt.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

/src/repo/bin/linear-reduce.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

/src/repo/bin/linearize.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

/src/repo/bin/mt.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

/src/repo/bin/segment.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

/src/repo/bin/translate.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

/src/repo/config.dev.yaml
  22:1  warning  Empty mapping values are forbidden  yml/no-empty-mapping-value

/src/repo/server.js
  1:1  warning  ES2023 Hashbang comments are forbidden  es-x/no-hashbang

✖ 8 problems (0 errors, 8 warnings)


> cxserver@1.2.0 unittest
> PREQ_CONNECT_TIMEOUT=15 mocha



  Adaptation tests
    ✔ Link adaptation basic test (214ms)
    ✔ Link adaptation - Full paragraph and relative links (40ms)
    ✔ Image adaptation basic test (92ms)
    ✔ Image adaptation - Inline image with span tag
    ✔ Image adaptation - Inline image with span tag
    ✔ Image adaptation - Source and target language directions differs (79ms)
    ✔ Image adaptation - Image is not in commons
    ✔ Gallery adaptation (1515ms)
    ✔ Reference adaptation test without a reference template
    ✔ Reference adaptation test where the content is reference and template at same time
    ✔ Reference adaptation test where source and target has no template data. Must use template mapping database (65ms)
    ✔ Style tags holding template definition should not be ignored and used for template adaptation
    ✔ Audio adaptation
    ✔ Audio adaptation when audio is not in Commons
    ✔ Video adaptation
    ✔ Inline Video adaptation

  Adaptation tests
    ✔ should adapt section when: section has lot of templates, but all are fragments of main template (285ms)

  Template parameter mapping test
    ✔ should not have any errors while mapping params

  JsonDict
    ✔ should return result when looking up for an existing word
    ✔ should return no result when looking up for an non existing word

  express app
starting test server
    ✔ should get robots.txt
    ✔ should set CORS headers
    ✔ should set CSP headers

  Swagger spec
    ✔ get the spec
    ✔ should expose valid OpenAPI spec
    ✔ spec validation
    routes
      ✔ robots.txt check
      ✔ root with no query params
      ✔ spec from root
      ✔ doc from root
      ✔ root with wrong query param
      ✔ Fetch enwiki protected page (171ms)
      ✔ Fetch enwiki protected page (89ms)
      ✔ Fetch dictionary meaning with a given provider
      ✔ Fetch dictionary meaning without specifying a provider
      ✔ Fetch dictionary meaning with a given provider
      ✔ Fetch dictionary meaning without specifying a provider
      ✔ Machine translate an HTML fragment using TestClient.
      ✔ Machine translate an HTML fragment using TestClient.
      ✔ Get the tools between two language pairs
      ✔ Get all the language pairs
      ✔ Get the MT tool between two language pairs
      ✔ Get the MT tool between two language pairs
      ✔ Translate enwiki protected page (50ms)
      ✔ Translate enwiki protected page (52ms)
      ✔ Machine translate an HTML fragment using TestClient, adapt the links to target language wiki. (252ms)
      ✔ Machine translate an HTML fragment using TestClient, adapt the links to target language wiki.
      ✔ Suggest a target title for the given source title and language pairs (276ms)
      ✔ Return an authentication error HTTP status code, when default MT requires authentication and the given JWT is invalid
      ✔ Suggest a source title to use for translation (99ms)
      ✔ Suggest target section titles for given source sections (45ms)
      ✔ Suggest source sections to translate (137ms)
      ✔ retrieve service info
      ✔ retrieve service name
      ✔ retrieve service version
      ✔ redirect to the home page

  service information
    ✔ should get the service name
    ✔ should get the service version
    ✔ should redirect to the service home page
    ✔ should get the service info

  v1 api - page gets
    ✔ should get the whole page body (490ms)
    ✔ should throw a 404 for a non-existent page

  v2 api - page gets
    ✔ should get the whole page body (244ms)
    ✔ should throw a 404 for a non-existent page (179ms)

  LinearDoc
    ✔ should be possible to linearise all kind of HTML inputs (64ms)
    ✔ should be possible to reconstruct the HTML from LinearDoc
    ✔ should be possible to reduce and expand a document
    ✔ test HTML compaction roundtrip with inline chunks
    ✔ test HTML expand with external attributes inserted
    ✔ test if the content is block level template (121ms)
    ✔ test HTML compaction roundtrip with inline style content
    ✔ test HTML compaction roundtrip with template with empty content
    ✔ test getRootItem for ignoring blockspaces
    ✔ test getRootItem for not ignoring non-whitespace content in textblock
    ✔ test getRootItem for ignoring whitespace content in textblock

  Apertium machine translation
    ✔ Test: All caps words
    ✔ Test: Title caps one-to-many
    ✔ Test: Reordering with nested tags
    ✔ Test: Many-to-one with nested tags
    ✔ Test: Reordering at either ends of a tag
    ✔ Test: Identical tags separated by whitespace
    ✔ Test: Non-identical links separated by whitespace
    ✔ Test: Find longest match among multiple matches
    ✔ Test: Do not translate content inside the style tags

  Elia machine translation
    ✔ Should fail because of wrong key 

  Flores machine translation
    ✔ Should fail because of wrong key 

  Google machine translation
    ✔ Should fail because of wrong key 

  LingoCloud machine translation
    ✔ Should fail because of wrong key 

  Machine translation with wrapped html result
    ✔ Should throw error

  Machine translation result with extra spaces
    ✔ Should be cleaned up

  Subsequence match finding
    ✔ Should return correct range mapping

  Template translation
    ✔ should not translate the fragement contents.

  Yandex machine translation with corrupted result
    ✔ Should sanitize the MT output

  Yandex machine translation
    ✔ Should fail because of wrong key 

  Youdao machine translation
    ✔ Should fail because of wrong key 

  MWPageLoader tests
    ✔ Test: Add data-section-number attribute to every CX section

  Section wrap tests
    ✔ should parse correctly when section has common pattern of elements
    ✔ should extract correct number of categories when section has common pattern of elements
    ✔ should parse correctly when section has categories to be extracted
    ✔ should extract correct number of categories when section has categories to be extracted
    ✔ should parse correctly when content has nested sections and tricky transclusion context
    ✔ should extract correct number of categories when content has nested sections and tricky transclusion context
    ✔ should parse correctly when content has blank template and then an unrelated table
    ✔ should extract correct number of categories when content has blank template and then an unrelated table
    ✔ should parse correctly when content is complete page content with html, head tags and body having two templates with fragments
    ✔ should extract correct number of categories when content is complete page content with html, head tags and body having two templates with fragments
    ✔ should parse correctly when Content has self closing meta tag
    ✔ should extract correct number of categories when Content has self closing meta tag
    ✔ should parse correctly when Content has template fragments and one fragment is a section candidate. Section has categories too
    ✔ should extract correct number of categories when Content has template fragments and one fragment is a section candidate. Section has categories too
    ✔ should parse correctly when Content has transclusion and one of its fragment get removed since it is ignorable.
    ✔ should extract correct number of categories when Content has transclusion and one of its fragment get removed since it is ignorable.
    ✔ should parse correctly when Content has transclusion and same element is removable templatestyle. So do not remove
    ✔ should extract correct number of categories when Content has transclusion and same element is removable templatestyle. So do not remove

  Title pair tests
    ✔ should adapt the title when: Corresponding title exist in target language
    ✔ should adapt the title when: Corresponding title exist in target language
    ✔ should adapt the title when: Corresponding title exist in target language and given title need normalization
    ✔ should adapt the title when: Corresponding title does not exist in target language and given title need normalization
    ✔ should adapt the title when: Corresponding title exist in target language and given title need normalization, has parenthesis
    ✔ should adapt the title when: Source title is percentage encoded, but should not throw error, should return corresponding title

  Title pair tests - batching
    ✔ should have the queue size 50

  Segmentation tests for am
    ✔ should not have any errors when: Amharic segmentation - basic test

  Segmentation tests for en
    ✔ should not have any errors when: Simple paragraph test
    ✔ should not have any errors when: Sentence ending with )
    ✔ should not have any errors when: Exclamation, punctuation test
    ✔ should not have any errors when: Multiple sentences
    ✔ should not have any errors when: Multiple sections - div, h1, paragraph
    ✔ should not have any errors when: Sentence starting with a link
    ✔ should not have any errors when: Sentence starting with a link and ending with a link
    ✔ should not have any errors when: Figure
    ✔ should not have any errors when: References can appear after period without space. Example: Hydrogen is a gas.[1] It is ...
    ✔ should not have any errors when: References can appear after period without space, repeated. Example: Hydrogen is a gas.[1][2][3] It is ...
    ✔ should not have any errors when: References can appear inside a sentence. Example: Hydrogen is a gas[1] and it is ...
    ✔ should not have any errors when: References can appear inside a sentence. Example:Hydrogen's atomic number is one. Hydrogen is a gas[1] and it is ..... Test the flags are reset properly
    ✔ should not have any errors when: References can appear repeated inside a sentence. Example: Hydrogen is a gas[1][2][3] and it is ...
    ✔ should not have any errors when: References can appear after period and space. Example: Hydrogen is a gas. [1] It is ...
    ✔ should not have any errors when: Paragraph from Debian article- repeating references
    ✔ should not have any errors when: References after closing bracket and period.
    ✔ should not have any errors when: Three sentences in a single text node
    ✔ should not have any errors when: Paragraph ending with reference and already having reference in between. The second reference should not be identified as repeating reference. If identified as repeating reference, 7 letters from last word will be missing.
    ✔ should not have any errors when: Sentences ending with abbreviations
    ✔ should not have any errors when: link element inside span element
    ✔ should not have any errors when: Do not break inside of links with abbreviations. Example: Carl E. Wieman. See https://phabricator.wikimedia.org/T99504
    ✔ should not have any errors when: A non-segmentable text chunk inside a textblock should not mark the whole text chunk non-segmentable
    ✔ should not have any errors when: Figure-inline segmentation. Do not violate the MediaWiki DOM spec https://www.mediawiki.org/wiki/Specs/HTML#Images
    ✔ should not have any errors when: Figure-inline inside a transclusions
    ✔ should not have any errors when: Video tag in figure tag
    ✔ should not have any errors when: Audio tag in figure tag
    ✔ should not have any errors when: Audio tag in figure-inline tag
    ✔ should not have any errors when: Video tag in figure-inline tag
    ✔ should not have any errors when: Do not segment content inside block templates
    ✔ should not have any errors when: about attribute alone does not initiate a transclusion context
    ✔ should not have any errors when: Do not consider style tag with transclusion as block tag
    ✔ should not have any errors when: Sections with singe paragraph and a transclusion based reference at th end - T283513

  Segmentation tests for de
    ✔ should not have any errors when: Avoid segmenting inside a transclusion textblock

  Segmentation tests for hi
    ✔ should not have any errors when: Hindi segmentation - basic test

  Segmentation tests for hy
    ✔ should not have any errors when: Armenian segmentation - basic test

  Segmentation tests for ja
    ✔ should not have any errors when: Japanese segmentation - basic test

  Segmentation tests for zh
    ✔ should not have any errors when: Chinese segmentation - basic test

  Segmentation tests for pa
    ✔ should not have any errors when: Punjabi segmentation - basic test

  SectionSuggester tests
    ✔ should find present and missing sections

  Link Adaptation tests
    ✔ Basic test (91ms)
    ✔ Space in the title
    ✔ Relative URL
    ✔ Title with parenthesis
    ✔ Target title does not exist
    ✔ Title with translation from Wikidata label
    ✔ ISBN Link adaptation

  Reference adaptation
    ✔ Adapting a reference with plain text content
    ✔ Adapting a reference with plain text content, sup tag
    ✔ Adapting a reference with html content, sup tag
    ✔ Not adapting a reference with no data-mw.body
    ✔ Partially adapting a reference with named reference
    ✔ Mark the reference adaptation failed when the content defined in template not adapted (178ms)
    ✔ Mark the reference adaptation failed when the content defined in template and it is unsupported by CXserver
    ✔ Partial reference adaptation, when mandatory params are not transferred successfully (73ms)

  Template adaptation
    ✔ Template with no equivalents (55ms)
    ✔ Babel template (66ms)
    ✔ Cite web template (127ms)
    ✔ Multi-part template for columns (59ms)
    ✔ Template with equivalents, but target template data missing, no params mapped (48ms)
    ✔ Equivalent template exist, templatedata exists only for source language. Use that as hint for extracting params from template source code in target language (57ms)
    ✔ Template with equivalents, but not able to map mandatory params (53ms)
    ✔ Images that are generated by templates

stopping test server

  184 passing (6s)


--- end ---
$ package-lock-lint package-lock.json
--- stdout ---
Checking package-lock.json

--- end ---
[DNM] there are no updates
$ git add .
--- stdout ---

--- end ---
$ git commit -F /tmp/tmpezs65onp
--- stdout ---
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

--- end ---
Source code is licensed under the AGPL.