wikibase-cli 16.1.0 → 16.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,5 +12,5 @@ module.exports = {
12
12
  baserevid: [ '--baserevid <id>', 'set the baserevid' ],
13
13
  maxlag: [ '--maxlag <num>', 'set the maxlag value' ],
14
14
  rank: [ '--rank <rank>', 'set the claim rank' ],
15
- keepOldest: [ '--keep-oldest', 'Merge the newest entity in the oldest one. By default, the arguments order determins which entity is kept: the first entity is merged into the second entity' ],
15
+ keepOldest: [ '--keep-oldest', "Merge the newest entity in the oldest one. By default, the arguments' order determines which entity is kept: the first entity is merged into the second entity" ],
16
16
  }
@@ -24,7 +24,7 @@ module.exports = (sparql, format = 'json') => {
24
24
 
25
25
  const makeRequest = (url, format) => {
26
26
  const acceptHeader = formatAcceptHeader[format]
27
- if (!acceptHeader) throw new Error(`unknow format: ${format}`)
27
+ if (!acceptHeader) throw new Error(`unknown format: ${format}`)
28
28
  // Avoid making a POST request when not necessary as those aren't cached
29
29
  // see https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual#SPARQL_endpoint
30
30
  if (url.length < 5000) {
@@ -1,5 +1,6 @@
1
1
  // Accept anything looking like an id:
2
2
  // Q33977
3
+ // or q33977
3
4
  // or wd:Q33977
4
5
  // or 33977
5
6
  // or https://www.wikidata.org/entity/Q33977
@@ -13,6 +14,7 @@ const nestedEntityIdPattern = /L[1-9][0-9]*-(F|S)[1-9][0-9]*/
13
14
  const entitySchemaIdPattern = /(E)[1-9][0-9]*/
14
15
 
15
16
  module.exports = (options = {}) => input => {
17
+ input = input.toUpperCase()
16
18
  const { allowNestedIds = false, allowEntitiesSchemasIds = false } = options
17
19
 
18
20
  if (allowNestedIds) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wikibase-cli",
3
- "version": "16.1.0",
3
+ "version": "16.1.2",
4
4
  "description": "A command-line interface to Wikibase",
5
5
  "main": "index.js",
6
6
  "bin": {