Skip to content

Releases: macbre/nodemw

v0.21.0

27 Feb 12:05
f217bef
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.20.0...v0.21.0

Use "postman-request" instead of deprecated request

20 Sep 12:30
9634177
Compare
Choose a tag to compare
  • wikidata-test: less strict assertion by @macbre in #410
  • CI - updated the list of Node.js versions to test against by @macbre in #411
  • Install prettier by @macbre in #448
  • CI - run using Node.js 20.x by @macbre in #449
  • request: use "postman-request" instead by @macbre in #452
  • Use the current Node.js when publishing to npm by @macbre in #468
  • CI: do not hardcode Node.js version - use the "latest" and "lts/*" by @macbre in #469
  • Require Node.js 18+ by @macbre in #473

What's Changed

  • build(deps-dev): bump typescript from 4.9.4 to 4.9.5 by @dependabot in #400

  • build(deps-dev): bump check-dts from 0.6.7 to 0.7.0 by @dependabot in #401

  • build(deps-dev): bump jest from 29.4.1 to 29.4.2 by @dependabot in #402

  • build(deps-dev): bump jest from 29.4.2 to 29.4.3 by @dependabot in #404

  • build(deps): bump coverallsapp/github-action from 1.1.3 to 1.2.0 by @dependabot in #406

  • build(deps): bump coverallsapp/github-action from 1.2.0 to 1.2.2 by @dependabot in #407

  • build(deps): bump coverallsapp/github-action from 1.2.2 to 1.2.4 by @dependabot in #409

  • build(deps-dev): bump jest from 29.4.3 to 29.5.0 by @dependabot in #413

  • build(deps-dev): bump eslint-config-prettier from 8.6.0 to 8.7.0 by @dependabot in #412

  • build(deps-dev): bump yaml-eslint-parser from 1.1.0 to 1.2.0 by @dependabot in #415

  • build(deps-dev): bump check-dts from 0.7.0 to 0.7.1 by @dependabot in #416

  • BotOptions: add options for logIn by @macbre in #417

  • build(deps-dev): bump typescript from 4.9.5 to 5.0.2 by @dependabot in #418

  • build(deps-dev): bump eslint-config-prettier from 8.7.0 to 8.8.0 by @dependabot in #420

  • build(deps): bump coverallsapp/github-action from 1.2.4 to 2.0.0 by @dependabot in #419

  • build(deps-dev): bump typescript from 5.0.2 to 5.0.3 by @dependabot in #421

  • build(deps-dev): bump typescript from 5.0.3 to 5.0.4 by @dependabot in #422

  • build(deps): bump coverallsapp/github-action from 2.0.0 to 2.1.0 by @dependabot in #423

  • build(deps): bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in #424

  • build(deps): bump coverallsapp/github-action from 2.1.0 to 2.1.1 by @dependabot in #425

  • build(deps): bump coverallsapp/github-action from 2.1.1 to 2.1.2 by @dependabot in #426

  • build(deps): bump yaml from 2.1.1 to 2.2.2 by @dependabot in #427

  • build(deps-dev): bump check-dts from 0.7.1 to 0.7.2 by @dependabot in #428

  • build(deps-dev): bump eslint-config-wikimedia from 0.24.0 to 0.25.0 by @dependabot in #429

  • build(deps-dev): bump yaml-eslint-parser from 1.2.0 to 1.2.1 by @dependabot in #430

  • build(deps-dev): bump yaml-eslint-parser from 1.2.1 to 1.2.2 by @dependabot in #431

  • build(deps): bump dependabot/fetch-metadata from 1.4.0 to 1.5.0 by @dependabot in #433

  • build(deps): bump dependabot/fetch-metadata from 1.5.0 to 1.5.1 by @dependabot in #434

  • build(deps-dev): bump eslint-config-wikimedia from 0.25.0 to 0.25.1 by @dependabot in #435

  • build(deps): bump winston from 3.8.2 to 3.9.0 by @dependabot in #436

  • build(deps-dev): bump typescript from 5.0.4 to 5.1.3 by @dependabot in #437

  • build(deps): bump coverallsapp/github-action from 2.1.2 to 2.2.0 by @dependabot in #438

  • build(deps-dev): bump typescript from 5.1.3 to 5.1.5 by @dependabot in #439

  • build(deps): bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in #440

  • build(deps-dev): bump typescript from 5.1.5 to 5.1.6 by @dependabot in #441

  • build(deps-dev): bump @jest/globals from 29.5.0 to 29.6.0 by @dependabot in #442

  • build(deps-dev): bump jest from 29.5.0 to 29.6.0 by @dependabot in #443

  • build(deps): bump coverallsapp/github-action from 2.2.0 to 2.2.1 by @dependabot in #447

  • build(deps-dev): bump jest from 29.6.0 to 29.6.1 by @dependabot in #444

  • build(deps): bump winston from 3.9.0 to 3.10.0 by @dependabot in #446

  • We're supporting Node.js 16+ by @macbre in #450

  • build(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 by @dependabot in #451

  • build(deps-dev): bump eslint-config-prettier from 8.8.0 to 8.9.0 by @dependabot in #453

  • build(deps-dev): bump @jest/globals from 29.6.1 to 29.6.2 by @dependabot in #455

  • build(deps-dev): bump jest from 29.6.1 to 29.6.2 by @dependabot in #454

  • build(deps-dev): bump eslint-config-prettier from 8.9.0 to 8.10.0 by @dependabot in #456

  • build(deps-dev): bump prettier from 3.0.0 to 3.0.1 by @dependabot in #457

  • build(deps-dev): bump eslint-config-prettier from 8.10.0 to 9.0.0 by @dependabot in #458

  • build(deps-dev): bump prettier from 3.0.1 to 3.0.2 by @dependabot in #459

  • build(deps-dev): bump jest from 29.6.2 to 29.6.3 by @dependabot in #460

  • build(deps-dev): bump jest from 29.6.3 to 29.6.4 by @dependabot in #462

  • build(deps-dev): bump typescript from 5.1.6 to 5.2.2 by @dependabot in #463

  • build(deps-dev): bump prettier from 3.0.2 to 3.0.3 by @dependabot in #465

  • build(deps): bump actions/checkout from 3 to 4 by @dependabot in #466

  • build(deps): bump coverallsapp/github-action from 2.2.1 to 2.2.2 by @dependabot in #467

  • build(deps): bump coverallsapp/github-action from 2.2.2 to 2.2.3 by @dependabot in #470

  • build(deps-dev): bump jest from 29.6.4 to 29.7.0 by @dependabot in #471

Full Changelog: v0.19.0...v0.20.0

Initial helpers for WikiData

30 Jan 15:33
04ddf55
Compare
Choose a tag to compare

This release of nodemw brings a few helpers for interacting with Wikidata.

  • Add a support for WikiData by @macbre in #395
  • More test cases for wikidata + set a global jest timeout to 5 seconds by @macbre in #396

An example:

const wikidata = require("nodemw/lib/wikidata");
const client = new wikidata();

// Where is Saksun, Faroe Islands located?
const geo = await client.getEntityClaim("Q928875" /* Saksun */, "P625" /* place location */);

// will give you the geolocation of the place
expect(geo[0].mainsnak.datavalue.value).toMatchObject({
  latitude: 62.248888888889,
  longitude: -7.1758333333333,
});

// When was Albert Einstein born?
const res = await client.getArticleClaims("Albert Einstein");

const dateOfBirth = res.P569[0].mainsnak.datavalue.value;
expect(dateOfBirth.time).toMatch(/1879-03-14/);

const dateOfDeath = res.P570[0].mainsnak.datavalue.value;
expect(dateOfDeath.time).toMatch(/1955-04-18/);

// interwiki links for a given article
const links = await client.getArticleSitelinks("Albert Einstein");
console.log(links.enwiki); // {site: "enwiki", title: "Albert Einstein", badges: ["Q17437798"]}

What else has changed

  • build(deps-dev): bump @jest/globals from 29.4.0 to 29.4.1 by @dependabot in #397
  • build(deps-dev): bump jest from 29.4.0 to 29.4.1 by @dependabot in #398

Full Changelog: v0.18.1...v0.19.0

Dependencies updated

25 Jan 10:52
ae6da4e
Compare
Choose a tag to compare

This version of nodemw brings an initial version of typing (via *.d.ts) files.

What's Changed

  • Initial typing for Bot() constructor and a few methods by @macbre in #340
  • Tests migrated to jest by @macbre in #343
  • New method getArticleProperties() by @macbre in #345
  • Add more types: SearchResult and UserContribution by @macbre in #348
  • Introduce prettier for consistent code formatting by @macbre in #349
  • Use depcheck for checking dependencies by @macbre in #350

Dependencies bumped

  • build(deps): bump winston from 3.8.0 to 3.8.1 by @dependabot in #341
  • build(deps): bump dependabot/fetch-metadata from 1.3.1 to 1.3.2 by @dependabot in #342
  • build(deps): bump dependabot/fetch-metadata from 1.3.2 to 1.3.3 by @dependabot in #347
  • build(deps-dev): bump @jest/globals from 28.1.2 to 28.1.3 by @dependabot in #351
  • build(deps-dev): bump jest from 28.1.2 to 28.1.3 by @dependabot in #352
  • build(deps-dev): bump yaml-eslint-parser from 1.0.1 to 1.1.0 by @dependabot in #353
  • build(deps-dev): bump eslint-config-wikimedia from 0.22.1 to 0.23.0 by @dependabot in #354
  • build(deps-dev): bump typescript from 4.7.4 to 4.8.2 by @dependabot in #355
  • build(deps-dev): bump jest from 28.1.3 to 29.0.0 by @dependabot in #357
  • build(deps-dev): bump @jest/globals from 28.1.3 to 29.0.0 by @dependabot in #356
  • build(deps-dev): bump @jest/globals from 29.0.0 to 29.0.1 by @dependabot in #359
  • build(deps-dev): bump jest from 29.0.0 to 29.0.1 by @dependabot in #358
  • build(deps-dev): bump jest from 29.0.1 to 29.0.2 by @dependabot in #360
  • build(deps): bump actions/setup-node from 1 to 3 by @dependabot in #362
  • build(deps): bump winston from 3.8.1 to 3.8.2 by @dependabot in #363
  • build(deps-dev): bump typescript from 4.8.2 to 4.8.3 by @dependabot in #364
  • build(deps-dev): bump jest from 29.0.2 to 29.0.3 by @dependabot in #365
  • build(deps): bump underscore from 1.13.4 to 1.13.6 by @dependabot in #367
  • build(deps-dev): bump typescript from 4.8.3 to 4.8.4 by @dependabot in #368
  • build(deps-dev): bump jest from 29.0.3 to 29.1.1 by @dependabot in #369
  • build(deps-dev): bump @jest/globals from 29.1.1 to 29.1.2 by @dependabot in #371
  • build(deps-dev): bump jest from 29.1.1 to 29.1.2 by @dependabot in #372
  • build(deps): bump dependabot/fetch-metadata from 1.3.3 to 1.3.4 by @dependabot in #373
  • build(deps-dev): bump csv-string from 4.1.0 to 4.1.1 by @dependabot in #374
  • build(deps-dev): bump @jest/globals from 29.1.2 to 29.2.0 by @dependabot in #375
  • build(deps-dev): bump jest from 29.1.2 to 29.2.0 by @dependabot in #376
  • build(deps-dev): bump jest from 29.2.0 to 29.2.1 by @dependabot in #378
  • build(deps-dev): bump @jest/globals from 29.2.1 to 29.2.2 by @dependabot in #379
  • build(deps-dev): bump jest from 29.2.1 to 29.2.2 by @dependabot in #380
  • build(deps): bump dependabot/fetch-metadata from 1.3.4 to 1.3.5 by @dependabot in #381
  • build(deps-dev): bump @jest/globals from 29.2.2 to 29.3.0 by @dependabot in #382
  • build(deps-dev): bump jest from 29.2.2 to 29.3.0 by @dependabot in #383
  • build(deps-dev): bump @jest/globals from 29.3.0 to 29.3.1 by @dependabot in #384
  • build(deps-dev): bump jest from 29.3.0 to 29.3.1 by @dependabot in #385
  • build(deps): bump qs from 6.5.2 to 6.5.3 by @dependabot in #387
  • build(deps-dev): bump eslint-config-prettier from 8.5.0 to 8.6.0 by @dependabot in #389
  • build(deps): bump json5 from 2.2.1 to 2.2.3 by @dependabot in #390
  • build(deps-dev): bump eslint-config-wikimedia from 0.23.0 to 0.24.0 by @dependabot in #391
  • build(deps): bump dependabot/fetch-metadata from 1.3.5 to 1.3.6 by @dependabot in #392
  • build(deps-dev): bump jest from 29.3.1 to 29.4.0 by @dependabot in #393
  • build(deps-dev): bump typescript from 4.8.4 to 4.9.4 by @dependabot in #388

Full Changelog: v0.18.0...v0.18.1

Dependencies updated

29 Jun 12:46
de783f6
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.17.0...v0.18.0

Add Protect API

06 May 11:36
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.16.0...v0.17.0

Dependencies updated

29 Oct 08:21
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.15.0...v0.16.0

bot.getArticleInfo() introduced

24 Sep 09:21
434e6c4
Compare
Choose a tag to compare

This release features a new method bot.getArticleInfo() introduced by @Technical-13 (#309).

  • #309 enhancement - bot.getArticleInfo() (by @Technical-13)
  • #296 dependencies - build(deps-dev): bump eslint-config-wikimedia from 0.18.0 to 0.18.1 (by @dependabot[bot])
  • #297 dependencies - build(deps-dev): bump eslint-config-wikimedia from 0.18.1 to 0.18.2 (by @dependabot[bot])
  • #298 dependencies - build(deps-dev): bump eslint-config-wikimedia from 0.18.2 to 0.19.0 (by @dependabot[bot])
  • #299 dependencies - build(deps): bump underscore from 1.12.0 to 1.12.1 (by @dependabot[bot])
  • #300 dependencies - build(deps-dev): bump eslint-config-wikimedia from 0.19.0 to 0.20.0 (by @dependabot[bot])
  • #301 dependencies - build(deps): bump underscore from 1.12.1 to 1.13.0 (by @dependabot[bot])
  • #302 dependencies - build(deps): bump underscore from 1.13.0 to 1.13.1 (by @dependabot[bot])
  • #303 dependencies - build(deps): bump browserslist from 4.16.3 to 4.16.6 (by @dependabot[bot])
  • #304 pr - Test using Node.js 16.x
  • #305 internals - Make npm package smaller by skipping some files
  • #306 dependencies - build(deps): bump async from 3.2.0 to 3.2.1 (by @dependabot[bot])
  • #307 dependencies - build(deps): bump color-string from 1.5.3 to 1.6.0 (by @dependabot[bot])
  • #308 dependencies - build(deps): bump path-parse from 1.0.6 to 1.0.7 (by @dependabot[bot])

CSRF tokens handling improved + dependencies updated

22 Jan 15:21
Compare
Choose a tag to compare
  • #163 enhancement - Use arrow functions to preserve lexical 'this' instead of 'self' (by @Krinkle)
  • #164 bug - [Snyk] Fix for 1 vulnerabilities (by @snyk-bot)
  • #165 enhancement - Test using Node.js 14 too
  • #166 enhancement - Add Scribunto console/remoting examples (by @ghost)
  • #167 dependencies - Bump request from 2.88.0 to 2.88.2 (by @dependabot[bot])
  • #168 dependencies - Bump eslint-config-wikimedia from 0.15.1 to 0.16.1 (by @dependabot[bot])
  • #171 dependencies - Bump vows from 0.8.2 to 0.8.3 (by @dependabot[bot])
  • #173 dependencies - Bump underscore from 1.9.1 to 1.10.2 (by @dependabot[bot])
  • #174 dependencies - Bump eslint-config-wikimedia from 0.16.1 to 0.16.2 (by @dependabot[bot])
  • #176 dependencies - Bump async from 2.6.1 to 3.2.0 (by @dependabot[bot])
  • #177 dependencies - Bump csv-string from 3.1.5 to 4.0.1 (by @dependabot[bot])
  • #180 dependencies - Bump node-version-compare from 1.0.1 to 1.0.2 (by @dependabot[bot])
  • #181 dependencies - Bump diff from 3.5.0 to 4.0.2 (by @dependabot[bot])
  • #196 dependencies - Bump lodash from 4.17.15 to 4.17.19 (by @dependabot[bot])
  • #214 dependencies - Bump node-version-compare from 1.0.2 to 1.0.3 (by @dependabot[bot])
  • #218 bug - CSRF token should be sent as last parameter in request payload (by @jwbth)
  • #219 pr - Send CSRF token as last parameter in request payload (#218) (by @jwbth)
  • #221 dependencies - Bump eslint-config-wikimedia from 0.16.2 to 0.17.0 (by @dependabot[bot])
  • #223 pr - Add bot.getImagesFromArticleWithOptions.
  • #230 dependencies - build(deps): bump underscore from 1.10.2 to 1.11.0 (by @dependabot[bot])
  • #256 dependencies - build(deps): bump snyk from 1.413.2 to 1.416.0 (by @dependabot[bot])
  • #266 dependencies - build(deps): bump diff from 4.0.2 to 5.0.0 (by @dependabot[bot])
  • #274 dependencies - build(deps): bump underscore from 1.11.0 to 1.12.0 (by @dependabot[bot])
  • #285 dependencies - build(deps): bump ini from 1.3.5 to 1.3.8 (by @dependabot[bot])
  • #293 dependencies - build(deps-dev): bump eslint-config-wikimedia from 0.17.0 to 0.18.0 (by @dependabot[bot])
  • #295 pr - Get rid of snyk - dependabot takes care of dependencies upgrade + security advisory

v0.13.0

12 Apr 19:59
a607f83
Compare
Choose a tag to compare