Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Update Wikibase-sdk #32

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into update-wikibase-sdk-to-v9
mshd committed Apr 14, 2023
commit d348f271bfbffb9c1ce9a6006f10cd8a8d2ab4b4
3 changes: 2 additions & 1 deletion packages/entitree-helper/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as wikibase_sdk from 'wikibase-sdk';
import { EntityId, WmLanguageCode, Wbk, PropertyId, Props } from 'wikibase-sdk';
import { Wbk as Wbk$1 } from 'wikibase-sdk/dist/wikibase-sdk';
import { SearchResult } from 'wikibase-sdk/src/types/search';
import * as axios from 'axios';

@@ -174,7 +175,7 @@ declare function getWikibaseSparql(query: string, wbk?: Wbk): Promise<Record<str
declare function getWikidataSparql(query: string): Promise<any>;

type DataSource = "wikidata" | "factgrid" | "geni";
declare const wdk: Wbk;
declare const wdk: Wbk$1;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder the dist folder needs to be deleted from repo

declare function getWikibaseSourceIds(entityId: string, propId: PropertyId, wbk?: Wbk): Promise<string[]>;

5 changes: 2 additions & 3 deletions packages/entitree-helper/dist/index.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dist folder shouldn't be checked in 😅

Original file line number Diff line number Diff line change
@@ -10673,7 +10673,7 @@ async function getWikipediaDescription(wikipediaSlug, langCode = "en") {
var import_axios2 = __toESM(require("axios"));

// src/wikidata/getWikibaseInstance.ts
var import_wikibase_sdk = require("wikibase-sdk");
var import_wikibase_sdk = require("wikibase-sdk/dist/wikibase-sdk");
var wikibaseInstances = {
wikidata: (0, import_wikibase_sdk.WBK)({
instance: "https://www.wikidata.org",
@@ -10710,12 +10710,11 @@ async function getEntityIdFromSlug(slug, langCode) {

// src/wikidata/getWikibaseEntities.ts
var import_axios3 = __toESM(require("axios"));
var import_wikidata = __toESM(require("wikibase-sdk/dist/wellknown/wikidata.org"));
async function getWikibaseEntities({
ids,
languages = ["en"],
props = ["labels", "descriptions", "claims", "sitelinks/urls"],
wbk = import_wikidata.default
wbk = wdk
}) {
if (ids.length === 0) {
return {};
59 changes: 31 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

You are viewing a condensed version of this merge commit. You can view the full changes here.