Language data is embedded in code: not tree-shakeable, no way to supply pinned data

オープン
#158 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

Start with find-language/language-data/languageData.json and the LanguageSearcher and createTag exports in @ethnolib/find-language. Check how the data is bundled and how the parity test compares chooser codes with keyboard-studio’s pinned snapshot. Done means hosts can provide or omit a data snapshot, while minimal imports no longer bundle the full table.

索引モデルが issue の本文から書いたものです。

説明

In @ethnolib/find-language 0.4.4 the language data is embedded in the module, so importing only LanguageSearcher or createTag still bundles about 770 KB compressed (esbuild, minified). There is no way to tree-shake the data out, and no way for a host to supply its own pinned data snapshot.

Context: keyboard-studio pins its own langtags snapshot for its criteria and tag logic, while EthnoLib carries its own committed copy (find-language/language-data/languageData.json, last updated 2026-07-29, "langtags.json API 1.4"). The two snapshots can drift; we work around it with a parity test over every chooser code.

Please consider separating the data from the code (a data import the host can replace or omit), so a host can supply pinned data and a minimal import does not pay for the whole table.

主要言語
TypeScript
スター
9
フォーク
8
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sillsdev/EthnoLib のほかの issue

sillsdev/EthnoLib の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。