lucaswerkmeister / m3api

minimal modern MediaWiki API client

Home Page:https://www.npmjs.com/package/m3api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Drop Node 12 support

lucaswerkmeister opened this issue · comments

m3api currently supports Node 12, even though it’s no longer supported by Node.js, because it’s the latest Node version in a stable Debian release. However, the upcoming Debian Bookworm (currently testing) already packages Node 18, so once that’s released (probably in Summer 2023), the next major m3api release (probably m3api v2) can drop Node 12 support. This should let us simplify the code in the following ways:

  • drop add-performance-global.js
  • drop the extra test job in the Test workflow in GitHub Actions
    • can’t happen unless we bump all the way to Node 18 (see aa6ccdb)
  • update http-cookie-agent and mocha to the latest versions
  • drop the --harmony-top-level-await option from test:readme
  • import fs/promises instead of fs in the integration tests
  • m3api-oauth2: always require crypto

Given that it’s now January and I still haven’t released m3api v1, it’s possible that v1 will only be released after Debian Bookworm. If that’s the case, I’ll probably drop Node 12 support in m3api v1 already (this would also strengthen the point that m3api is “modern”), and people who really need Node 12 support can use the last 0.x version instead. (No promises either way, though.)

Done in #28. (m3api-query and m3api-oauth2 commits will follow in a moment.)