New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wikibase-sdk

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wikibase-sdk - npm Package Compare versions

Comparing version 8.0.2 to 8.0.3

9

lib/helpers/sitelinks.js

@@ -56,2 +56,4 @@ const { fixedEncodeURIComponent, replaceSpaceByUnderscores, isPlainObject } = require('../utils/utils')

} else {
// Support multi-parts language codes, such as be_x_old
lang = lang.replace(/-/g, '_')
key = `${lang}${project}`.replace('wikipedia', 'wiki')

@@ -65,3 +67,3 @@ }

const [ lang, projectSuffix, rest ] = key.split('wik')
let [ lang, projectSuffix, rest ] = key.split('wik')

@@ -72,5 +74,8 @@ // Detecting cases like 'frwikiwiki' that would return [ 'fr', 'i', 'i' ]

if (languages.indexOf(lang) === -1) {
throw new Error(`sitelink lang not found: ${lang}`)
throw new Error(`sitelink lang not found: ${lang}. Updating wikibase-sdk to a more recent version might fix the issue.`)
}
// Support keys such as be_x_oldwiki, which refers to be-x-old.wikipedia.org
lang = lang.replace(/_/g, '-')
const project = projectsBySuffix[projectSuffix]

@@ -77,0 +82,0 @@ if (!project) throw new Error(`sitelink project not found: ${project}`)

{
"name": "wikibase-sdk",
"version": "8.0.2",
"version": "8.0.3",
"description": "utils functions to query a Wikibase instance and simplify its results",

@@ -5,0 +5,0 @@ "main": "lib/wikibase-sdk.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc