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

Replace fork of lunr-languages with upstream package #1168

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@codemirror/view": "^6.3.0",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@microbit/lunr-languages": "^1.9.0-microbit.1",
"@microbit/microbit-fs": "^0.9.2",
"@sanity/block-content-to-react": "^3.0.0",
"@sanity/image-url": "^1.0.1",
Expand All @@ -41,6 +40,7 @@
"lodash.debounce": "^4.0.8",
"lodash.sortby": "^4.7.0",
"lunr": "^2.3.9",
"lunr-languages": "^1.14.0",
"lzma": "^2.3.2",
"marked": "^4.0.15",
"mobile-drag-drop": "^2.3.0-rc.2",
Expand Down
8 changes: 4 additions & 4 deletions src/documentation/search/lunr-languages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
*
* SPDX-License-Identifier: MIT
*/
declare module "@microbit/lunr-languages/lunr.stemmer.support";
declare module "@microbit/lunr-languages/tinyseg";
declare module "@microbit/lunr-languages/lunr.multi";
declare module "lunr-languages/lunr.stemmer.support";
declare module "lunr-languages/tinyseg";
declare module "lunr-languages/lunr.multi";

declare module "@microbit/lunr-languages/lunr.*" {
declare module "lunr-languages/lunr.*" {
import lunr from "lunr";
function register(l: typeof lunr): void;
export = register;
Expand Down
2 changes: 1 addition & 1 deletion src/documentation/search/search.worker.de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* SPDX-License-Identifier: MIT
*/
import { SearchWorker } from "./search.worker";
import languageSupport from "@microbit/lunr-languages/lunr.de";
import languageSupport from "lunr-languages/lunr.de";

new SearchWorker(self as DedicatedWorkerGlobalScope, "de", languageSupport);
2 changes: 1 addition & 1 deletion src/documentation/search/search.worker.es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: MIT
*/
import { SearchWorker } from "./search.worker";
import languageSupport from "@microbit/lunr-languages/lunr.es";
import languageSupport from "lunr-languages/lunr.es";

// Note the language code is different to the app
new SearchWorker(self as DedicatedWorkerGlobalScope, "es", languageSupport);
2 changes: 1 addition & 1 deletion src/documentation/search/search.worker.fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* SPDX-License-Identifier: MIT
*/
import { SearchWorker } from "./search.worker";
import languageSupport from "@microbit/lunr-languages/lunr.fr";
import languageSupport from "lunr-languages/lunr.fr";

new SearchWorker(self as DedicatedWorkerGlobalScope, "fr", languageSupport);
2 changes: 1 addition & 1 deletion src/documentation/search/search.worker.ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* SPDX-License-Identifier: MIT
*/
import { SearchWorker } from "./search.worker";
import languageSupport from "@microbit/lunr-languages/lunr.ja";
import languageSupport from "lunr-languages/lunr.ja";

new SearchWorker(self as DedicatedWorkerGlobalScope, "ja", languageSupport);
2 changes: 1 addition & 1 deletion src/documentation/search/search.worker.ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* SPDX-License-Identifier: MIT
*/
import { SearchWorker } from "./search.worker";
import languageSupport from "@microbit/lunr-languages/lunr.ko";
import languageSupport from "lunr-languages/lunr.ko";

new SearchWorker(self as DedicatedWorkerGlobalScope, "ko", languageSupport);
2 changes: 1 addition & 1 deletion src/documentation/search/search.worker.nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* SPDX-License-Identifier: MIT
*/
import { SearchWorker } from "./search.worker";
import languageSupport from "@microbit/lunr-languages/lunr.nl";
import languageSupport from "lunr-languages/lunr.nl";

new SearchWorker(self as DedicatedWorkerGlobalScope, "nl", languageSupport);
4 changes: 2 additions & 2 deletions src/documentation/search/search.worker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import lunr from "lunr";
import { ApiDocsResponse } from "../../language-server/apidocs";
import { Toolkit } from "../reference/model";
import { IndexMessage } from "./common";
import lunrJa from "@microbit/lunr-languages/lunr.ja";
import lunrJa from "lunr-languages/lunr.ja";
import {
buildIndex,
buildSearchIndex,
SearchableContent,
SearchWorker,
} from "./search.worker";
import { vi } from "vitest";
import frLanguageSupport from "@microbit/lunr-languages/lunr.fr";
import frLanguageSupport from "lunr-languages/lunr.fr";

const searchableReferenceContent: SearchableContent[] = [
{
Expand Down
6 changes: 3 additions & 3 deletions src/documentation/search/search.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*
* SPDX-License-Identifier: MIT
*/
import multi from "@microbit/lunr-languages/lunr.multi";
import stemmerSupport from "@microbit/lunr-languages/lunr.stemmer.support";
import tinyseg from "@microbit/lunr-languages/tinyseg";
import multi from "lunr-languages/lunr.multi";
import stemmerSupport from "lunr-languages/lunr.stemmer.support";
import tinyseg from "lunr-languages/tinyseg";
import lunr from "lunr";
import { splitDocString } from "../../editor/codemirror/language-server/docstrings";
import type {
Expand Down
Loading