Only breaking changes, deprecations and the like are documented in this change log.
loginGetToken()
is now deprecated in favour oflogin()
which will now fetch tokens as well.- TypeScript source files are dropped from the npm package, per the standard practice followed in TypeScript libraries. This should not actually break anything.
BREAKING CHANGES:
- mwn#rawRequest now returns the
AxiosResponse
object directly, rather than thedata
part ofAxiosResponse
. - In cases of error, the shape of the error thrown by mwn#request is different.
- Earlier:
error.response
was the API response data along with response and request objects, the former making it a cyclic object. - Now:
error.response
is an object with fields {data, headers, status, statusText}
- Earlier:
BREAKING CHANGES:
- For imports in JavaScript, use
const {mwn} = require('mwn');
instead ofconst mwn = require('mwn');