versions follow SemVer
- Add
config.dryflag, to disable actually editing the Wikibase instance. Can be useful for testing purposes.
- BREAKING CHANGE: converted code base to TypeScript, which required to change some file paths; breaking submodules imports (ex
import { resolveTitle } from 'wikibase-edit/lib/resolve_title.js'won't work anymore). - BREAKING CHANGE: Remove deprecated function aliases:
claim.add=>claim.createqualifier.add=>qualifier.setreference.add=>reference.set
- Exporting types
- 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)
v7.2.3 to recover the possibility to use a custom http request agent
- Add
config.credentials.browserSessionflag, to letfetchuse 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.statementsas 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.addfunction - Add
badge.removefunction
- Add
sitelink.setfunction entity.edit: allow to set sitelinks badges
BREAKING CHANGE: updated NodeJS minimal version >= v10.0.0
- Added support for the
localMediadatatype (defined by Extension:Wikibase_Local_Media)
- Added a
wgScriptPathparameter to the general config
maxlagparameter: allow to disable for interactive tasks.
- Quantity snaks: add support for
lowerBoundandupperBound
- 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
getAuthDatafunction
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.mergefunction - Added
maxlagparameter support
- Added
entity.deletefunction
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.createqualifier.add=>qualifier.setreference.add=>reference.set
- config:
instanceis now a required parameter (not defaulting to wikidata.org anymore)- credentials (username/password or oauth) are now expected to be found in a
credentialsobject (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.addclaim existance check (no moreallowDuplicatesflag)
Deprecated:
wikibaseInstanceconfig parameter: renamedinstancefor consistency with other WikibaseJS modules
Added features:
entity.createnow 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 anallowDuplicatesflag to force add when a claim with the same value already exists
claim.updatecan now also accepts a claim GUID, instead of an entity id, a property, and a value
- Added support for
globecoordinateclaims toclaim.update
- Added support for
somevalueandnovalueclaims 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.addnow expects an explicit reference property - BREAKING CHANGE:
claim.addnow 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