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

sourcepatches

This run took 73 seconds.

$ date
--- stdout ---
Mon Jul 22 05:27:10 UTC 2024

--- 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 ---
dc61b8efba5529a406b34b238199f1a9f51d2712 refs/heads/master

--- end ---
$ /usr/bin/npm audit --json
--- 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": "5.0.0",
        "isSemVerMajor": true
      }
    },
    "ms": {
      "name": "ms",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1094419,
          "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": "5.0.0",
        "isSemVerMajor": true
      }
    },
    "service-runner": {
      "name": "service-runner",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "limitation",
        "tar"
      ],
      "effects": [],
      "range": ">=3.0.0",
      "nodes": [
        "node_modules/service-runner"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "5.0.0",
        "isSemVerMajor": true
      }
    },
    "tar": {
      "name": "tar",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1097493,
          "name": "tar",
          "dependency": "tar",
          "title": "Denial of service while parsing a tar file due to lack of folders count validation",
          "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36",
          "severity": "moderate",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 6.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
          },
          "range": "<6.2.1"
        }
      ],
      "effects": [
        "service-runner"
      ],
      "range": "<6.2.1",
      "nodes": [
        "node_modules/tar"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "5.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": "5.0.0",
        "isSemVerMajor": true
      }
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 5,
      "high": 0,
      "critical": 0,
      "total": 5
    },
    "dependencies": {
      "prod": 278,
      "dev": 388,
      "optional": 73,
      "peer": 1,
      "peerOptional": 0,
      "total": 737
    }
  }
}

--- end ---
$ /usr/bin/npm audit --json
--- 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": "5.0.0",
        "isSemVerMajor": true
      }
    },
    "ms": {
      "name": "ms",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1094419,
          "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": "5.0.0",
        "isSemVerMajor": true
      }
    },
    "service-runner": {
      "name": "service-runner",
      "severity": "moderate",
      "isDirect": true,
      "via": [
        "limitation",
        "tar"
      ],
      "effects": [],
      "range": ">=3.0.0",
      "nodes": [
        "node_modules/service-runner"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "5.0.0",
        "isSemVerMajor": true
      }
    },
    "tar": {
      "name": "tar",
      "severity": "moderate",
      "isDirect": false,
      "via": [
        {
          "source": 1097493,
          "name": "tar",
          "dependency": "tar",
          "title": "Denial of service while parsing a tar file due to lack of folders count validation",
          "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36",
          "severity": "moderate",
          "cwe": [
            "CWE-400"
          ],
          "cvss": {
            "score": 6.5,
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
          },
          "range": "<6.2.1"
        }
      ],
      "effects": [
        "service-runner"
      ],
      "range": "<6.2.1",
      "nodes": [
        "node_modules/tar"
      ],
      "fixAvailable": {
        "name": "service-runner",
        "version": "5.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": "5.0.0",
        "isSemVerMajor": true
      }
    }
  },
  "metadata": {
    "vulnerabilities": {
      "info": 0,
      "low": 0,
      "moderate": 5,
      "high": 0,
      "critical": 0,
      "total": 5
    },
    "dependencies": {
      "prod": 278,
      "dev": 388,
      "optional": 73,
      "peer": 1,
      "peerOptional": 0,
      "total": 737
    }
  }
}

--- end ---
Attempting to npm audit fix
$ /usr/bin/npm audit fix --dry-run --only=dev --json
--- 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 EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'cxserver@1.2.1',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
--- stdout ---
{
  "added": 737,
  "removed": 0,
  "changed": 0,
  "audited": 738,
  "funding": 101,
  "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": "5.0.0",
          "isSemVerMajor": true
        }
      },
      "ms": {
        "name": "ms",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1094419,
            "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": "5.0.0",
          "isSemVerMajor": true
        }
      },
      "service-runner": {
        "name": "service-runner",
        "severity": "moderate",
        "isDirect": true,
        "via": [
          "limitation",
          "tar"
        ],
        "effects": [],
        "range": ">=3.0.0",
        "nodes": [
          "node_modules/service-runner"
        ],
        "fixAvailable": {
          "name": "service-runner",
          "version": "5.0.0",
          "isSemVerMajor": true
        }
      },
      "tar": {
        "name": "tar",
        "severity": "moderate",
        "isDirect": false,
        "via": [
          {
            "source": 1097493,
            "name": "tar",
            "dependency": "tar",
            "title": "Denial of service while parsing a tar file due to lack of folders count validation",
            "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36",
            "severity": "moderate",
            "cwe": [
              "CWE-400"
            ],
            "cvss": {
              "score": 6.5,
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
            },
            "range": "<6.2.1"
          }
        ],
        "effects": [
          "service-runner"
        ],
        "range": "<6.2.1",
        "nodes": [
          "node_modules/tar"
        ],
        "fixAvailable": {
          "name": "service-runner",
          "version": "5.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": "5.0.0",
          "isSemVerMajor": true
        }
      }
    },
    "metadata": {
      "vulnerabilities": {
        "info": 0,
        "low": 0,
        "moderate": 5,
        "high": 0,
        "critical": 0,
        "total": 5
      },
      "dependencies": {
        "prod": 278,
        "dev": 388,
        "optional": 73,
        "peer": 1,
        "peerOptional": 0,
        "total": 737
      }
    }
  }
}

--- end ---
{"added": 737, "removed": 0, "changed": 0, "audited": 738, "funding": 101, "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": "5.0.0", "isSemVerMajor": true}}, "ms": {"name": "ms", "severity": "moderate", "isDirect": false, "via": [{"source": 1094419, "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": "5.0.0", "isSemVerMajor": true}}, "service-runner": {"name": "service-runner", "severity": "moderate", "isDirect": true, "via": ["limitation", "tar"], "effects": [], "range": ">=3.0.0", "nodes": ["node_modules/service-runner"], "fixAvailable": {"name": "service-runner", "version": "5.0.0", "isSemVerMajor": true}}, "tar": {"name": "tar", "severity": "moderate", "isDirect": false, "via": [{"source": 1097493, "name": "tar", "dependency": "tar", "title": "Denial of service while parsing a tar file due to lack of folders count validation", "url": "https://github.com/advisories/GHSA-f5x3-32g6-xq36", "severity": "moderate", "cwe": ["CWE-400"], "cvss": {"score": 6.5, "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"}, "range": "<6.2.1"}], "effects": ["service-runner"], "range": "<6.2.1", "nodes": ["node_modules/tar"], "fixAvailable": {"name": "service-runner", "version": "5.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": "5.0.0", "isSemVerMajor": true}}}, "metadata": {"vulnerabilities": {"info": 0, "low": 0, "moderate": 5, "high": 0, "critical": 0, "total": 5}, "dependencies": {"prod": 278, "dev": 388, "optional": 73, "peer": 1, "peerOptional": 0, "total": 737}}}}
$ /usr/bin/npm audit fix --only=dev
--- 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 EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'cxserver@1.2.1',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
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 rimraf@2.4.5: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated npmlog@6.0.2: This package is no longer supported.
npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained.
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm WARN deprecated gauge@4.0.4: This package is no longer supported.
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.
--- stdout ---

added 736 packages, and audited 737 packages in 9s

101 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@5.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.0.0
      Depends on vulnerable versions of limitation
      Depends on vulnerable versions of tar
      node_modules/service-runner

tar  <6.2.1
Severity: moderate
Denial of service while parsing a tar file due to lack of folders count validation - https://github.com/advisories/GHSA-f5x3-32g6-xq36
fix available via `npm audit fix --force`
Will install service-runner@5.0.0, which is a breaking change
node_modules/tar

5 moderate severity vulnerabilities

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

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

--- end ---
Verifying that tests still pass
$ /usr/bin/npm ci
--- stderr ---
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'cxserver@1.2.1',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.19.0', npm: '9.2.0' }
npm WARN EBADENGINE }
npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
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 rimraf@2.4.5: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated npmlog@6.0.2: This package is no longer supported.
npm WARN deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated kad-memstore@0.0.1: This package is no longer maintained.
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated are-we-there-yet@3.0.1: This package is no longer supported.
npm WARN deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported
npm WARN deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm WARN deprecated gauge@4.0.4: This package is no longer supported.
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.
--- stdout ---

added 736 packages, and audited 737 packages in 10s

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

5 moderate severity vulnerabilities

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

Run `npm audit` for details.

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

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


> cxserver@1.2.1 lint
> eslint .


/src/repo/app.js
   76:34  warning  Found non-literal argument to RegExp Constructor                           security/detect-non-literal-regexp
   86:31  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  176:20  warning  Found non-literal argument in require                                      security/detect-non-literal-require
  223:9   warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  224:10  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/bin/adapt.js
  14:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  21:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  30:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit

/src/repo/bin/linear-reduce.js
  14:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit

/src/repo/bin/linearize.js
  15:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit

/src/repo/bin/mt.js
  12:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  19:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  31:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  51:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  68:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit

/src/repo/bin/segment.js
  36:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit

/src/repo/bin/translate.js
  15:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  23:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  37:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit
  47:2  warning  Don't use process.exit(); throw an error instead  n/no-process-exit

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

/src/repo/lib/Config.js
  45:33  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  67:43  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  71:23  warning  Found non-literal argument in require                                      security/detect-non-literal-require
  95:34  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/lib/adaptation/TemplateParameterMapper.js
  112:5  warning  Mixed spaces and tabs                         no-mixed-spaces-and-tabs
  112:7  warning  Expected no linebreak before this expression  implicit-arrow-linebreak
  115:4  warning  Mixed spaces and tabs                         no-mixed-spaces-and-tabs

/src/repo/lib/lineardoc/MwContextualizer.js
  145:35  warning  Found non-literal argument to RegExp Constructor  security/detect-non-literal-regexp

/src/repo/lib/mt/Apertium.js
  39:27  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/mt/Elia.js
  96:27  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/mt/Google.js
  91:27  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/mt/LingoCloud.js
  77:27  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/mt/MinT.js
  56:27  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/mt/Yandex.js
  84:27  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/mw/MwApiRequest.js
   61:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  107:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  255:10  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  293:10  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/lib/swagger-ui.js
  28:9  warning  Found readFile from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/lib/translationunits/MWCategory.js
  17:41  warning  Unsafe Regular Expression  security/detect-unsafe-regex

/src/repo/lib/translationunits/MWFile.js
  46:51  warning  Unsafe Regular Expression  security/detect-unsafe-regex

/src/repo/lib/translationunits/MWImage.js
  125:68  warning  Unsafe Regular Expression  security/detect-unsafe-regex

/src/repo/scripts/SectionTitleAlignment/alignwithmt.js
  215:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/scripts/template-mapping.js
  110:7   warning  Found existsSync from package "fs" with non literal argument at index 0    security/detect-non-literal-fs-filename
  116:14  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/adaptation/SectionTest.js
  26:20  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/features/app/app.js
  16:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  25:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  37:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/test/features/app/spec.js
   23:21  warning  Found readFileSync from package "fs" with non literal argument at index 0                                                       security/detect-non-literal-fs-filename
  171:10  warning  Found non-literal argument to RegExp Constructor                                                                                security/detect-non-literal-regexp
  240:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  249:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  295:23  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/test/features/info/info.js
  23:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  39:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  44:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/test/features/v1/page.js
  20:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  37:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/test/features/v2/page.js
  20:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins
  41:26  warning  The 'fetch' is still an experimental feature and is not supported until Node.js 21.0.0. The configured version range is '>=20'  n/no-unsupported-features/node-builtins

/src/repo/test/lineardoc/LinearDoc.test.js
   22:22  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
   23:24  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
   24:26  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  132:27  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/mw/MWPageLoaderTest.js
  31:27  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  40:5   warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/segmentation/CXSegmenter.test.js
  24:19  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  30:3   warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/testutils.js
  24:5  warning  Found writeFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/translationunits/MWReference.test.js
  35:21  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename
  50:27  warning  Found readFileSync from package "fs" with non literal argument at index 0  security/detect-non-literal-fs-filename

/src/repo/test/utils/assert.js
   9:40  warning  Found non-literal argument to RegExp Constructor  security/detect-non-literal-regexp
  24:40  warning  Found non-literal argument to RegExp Constructor  security/detect-non-literal-regexp

✖ 75 problems (0 errors, 75 warnings)


> cxserver@1.2.1 unittest
> mocha



  Adaptation tests
    ✔ Link adaptation basic test (265ms)
    ✔ Link adaptation - Full paragraph and relative links (50ms)
    ✔ Image adaptation basic test (106ms)
    ✔ Image adaptation - Inline image with span tag
    ✔ Image adaptation - Inline image with span tag
    ✔ Image adaptation - Source and target language directions differs (94ms)
    ✔ Image adaptation - Image is not in commons
    ✔ Gallery adaptation
    ✔ 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 (96ms)
    ✔ 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 (368ms)

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

  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 (221ms)
      ✔ Fetch protected page with multi-word title (112ms)
      ✔ Fetch enwiki protected page with revision (146ms)
      ✔ Machine translate an HTML fragment using TestClient. (66ms)
      ✔ 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 (126ms)
      ✔ Translate enwiki protected page with multi-word title (51ms)
      ✔ Translate enwiki protected page with revision (60ms)
      ✔ Machine translate an HTML fragment using TestClient, adapt the links to target language wiki. (277ms)
      ✔ 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 (318ms)
      ✔ 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 (109ms)
      ✔ Suggest target section titles for given source sections (50ms)
      ✔ Suggest source sections to translate (229ms)
      ✔ 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 (547ms)
    ✔ should throw a 404 for a non-existent page

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

  LinearDoc
    ✔ should be possible to linearise all kind of HTML inputs
    ✔ 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 (157ms)
    ✔ 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 

  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 (47ms)

  Yandex machine translation
    ✔ Should fail because of wrong key 

  Config transform tests
    ✔ Simple cross product of languages
    ✔ Do not translate between two variants of English
    ✔ Exclude "notAsTarget" languages
    ✔ Handle pairs in the configuration

  MWPageLoader tests
    ✔ Test: Add data-section-number attribute to every CX section (41ms)

  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
    ✔ should not have any errors when: Handle abbreviations such as Brown v. Board of education - T338689

  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 (147ms)
    ✔ 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 (189ms)
    ✔ 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 (105ms)

  Template adaptation
    ✔ Template with no equivalents (67ms)
    ✔ Babel template (83ms)
    ✔ Cite web template (143ms)
    ✔ Multi-part template for columns (76ms)
    ✔ Template with equivalents, but target template data missing, no params mapped (72ms)
    ✔ Equivalent template exist, templatedata exists only for source language. Use that as hint for extracting params from template source code in target language (75ms)
    ✔ Template with equivalents, but not able to map mandatory params (86ms)
    ✔ Images that are generated by templates

stopping test server

  183 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/tmpnn_6hvlf
--- 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.