versions follow SemVer
- Add support for Extended Date/Time Format, thank to @larjohn's PR
claim.move
: added capacity to update the moved claim mainsnak value
BREAKING CHANGE: This minimal NodeJS version is now >= v18.0.0
(to be able to use the standard fetch
function)
- Add
config.credentials.browserSession
flag, to letfetch
use credentials available in the browser as session cookies.
BREAKING CHANGE: wikibase-edit
now uses the ES module syntax. This also requires to bump the minimal NodeJS version to >= v14.0.0
.
- Add support for
entity.statements
as an alias forentity.claims
, to support Wikibase-ish instances such as https://commons.wikimedia.org. See https://phabricator.wikimedia.org/T149410 for more on this oddity.
- Add
badge.add
function - Add
badge.remove
function
- Add
sitelink.set
function entity.edit
: allow to set sitelinks badges
BREAKING CHANGE: updated NodeJS minimal version >= v10.0.0
- Added support for the
localMedia
datatype (defined by Extension:Wikibase_Local_Media)
- Added a
wgScriptPath
parameter to the general config
maxlag
parameter: allow to disable for interactive tasks.
- Quantity snaks: add support for
lowerBound
andupperBound
- Allow to pass a
baserevid
entity.edit
: allow to add aliases without removing the existing ones
entity.edit
: allow to remove labels, descriptions, or aliases in a given language by passing null
claim.move
: added capacity to move claims between properties of different datatypesclaim.qualifier
: added capacity to move qualifiers between properties of different datatypes
- Added support for custom calendars
claim.update
: added possibility to set the claim rankclaim.create
: added possibility to set the claim rank, add qualifiers and referencesentity.edit
: allow to remove a sitelink by passing null
reference.set
:- Added a snaks object interface to be able to set a whole reference record at once. The previous property/value interface is now deprecated.
- Added the possibility to update an existing reference by specifying its current
hash
- Added
qualifier.move
claim.move
: added property claims mode
- Added
claim.move
- Added tags support
- Added anonymous mode support
- Added
getAuthData
function
Breaking Changes: started using async/await internally, so wikibase-edit
now requires NodeJS >= v7.6.0
. If you are locked on an older version of NodeJS, you are thus advised to stay on wikibase-edit@3
- Added
entity.merge
function - Added
maxlag
parameter support
- Added
entity.delete
function
Breaking Changes:
- Renamed the module
wikidata-edit
->wikibase-edit
- Functions now expect a unique parameter object:
- ex:
claim.add(id, language, value)
should now be writtenclaim.add({ id, language, value })
- ex:
- Aligning functions names to their associated Wikibase API actions, consequently breaking several functions:
claim.add
=>claim.create
qualifier.add
=>qualifier.set
reference.add
=>reference.set
- config:
instance
is now a required parameter (not defaulting to wikidata.org anymore)- credentials (username/password or oauth) are now expected to be found in a
credentials
object (see config documentation)
- removed per-function initialization: it was meant to allow passing a different config object at every call (typically for different oauth sets of keys), which is now made possible by passing a config object after the function parameters
- removed function
claim.exists
- removed
claim.add
claim existance check (no moreallowDuplicates
flag)
Deprecated:
wikibaseInstance
config parameter: renamedinstance
for consistency with other WikibaseJS modules
Added features:
entity.create
now support creating properties!- properties datatypes list is now generated by requesting the Wikibase instance specified in config: no more hard coded properties, no more coupling to wikidata.org!
entity.edit
: allow to remove labels, descriptions, aliases, claims, or sitelinks
entity.edit
|entity.create
: add support for special snaktypesentity.edit
|entity.create
: add support for special ranks
claim.add
: added anallowDuplicates
flag to force add when a claim with the same value already exists
claim.update
can now also accepts a claim GUID, instead of an entity id, a property, and a value
- Added support for
globecoordinate
claims toclaim.update
- Added support for
somevalue
andnovalue
claims and qualifiers
- Added support for globe-coordinate, thank to Davide Allavena's PR
- Added edit summaries
- Added support for more time precisions, thank to Riccardo Magliocchetti's PR
- BREAKING CHANGE:
reference.add
now expects an explicit reference property - BREAKING CHANGE:
claim.add
now can't be passed a reference: the reference needs to be added separately - BREAKING CHANGE: quantity claims with a unit can't be passed as an array of the shape
[ amount, unit ]
anymore, and should instead be passed as an object{ amount, unit }
- BREAKING CHANGE: monolingual text can't be passed as an array of the shape
[ text, language ]
anymore, and should instead be passed as an object{ text, language }
- Added
reference.remove
alias.add
: time claims now accept month and day precisions- Added
qualifier.add
- Added
qualifier.update
- Added
qualifier.remove
entity.edit
|entity.create
: added support for qualifiers and references
- Added bot edits support
- Added
alias.add
- Added
alias.remove
- Added
alias.set
- Added
claim.update
- Added
OAuth support
- Added
description.set
- Added
claim.remove
- Added
entity.create
- Added
entity.edit
- Added
label.set
- Added
reference.add
- Added
claim.add
- Added
claim.exist