changed: allow deck refs to external words

This commit is contained in:
gitea-actions[bot]
2026-05-10 11:56:14 +09:00
parent 3b9e3a2d36
commit 8869ebdca1
2 changed files with 3 additions and 3 deletions
+3 -1
View File
@@ -48,7 +48,9 @@ python3 scripts/build_packages.py --update-generated-at
- Stable word keys use `{registryId}:word:{slug-or-id}`. - Stable word keys use `{registryId}:word:{slug-or-id}`.
- `versionCode` changes when package content changes. - `versionCode` changes when package content changes.
- `contentHash` is computed from a word record excluding `contentHash`. - `contentHash` is computed from a word record excluding `contentHash`.
- `refs.json` owns deck membership and display order. - `refs.json` owns deck membership and display order. A ref may point to a word
supplied by the same package or to an already installed dependency such as an
official deck word.
- The same package shape is used for official, registry custom, imported, and - The same package shape is used for official, registry custom, imported, and
local-exported decks. local-exported decks.
-2
View File
@@ -205,8 +205,6 @@ def validate_source(
if stable_word_key in ref_keys: if stable_word_key in ref_keys:
errors.append(f"{context}/refs.json duplicates {stable_word_key}") errors.append(f"{context}/refs.json duplicates {stable_word_key}")
ref_keys.add(stable_word_key) ref_keys.add(stable_word_key)
if stable_word_key not in word_keys:
errors.append(f"{context}/refs.json[{index}] references missing package word {stable_word_key}")
display_order = ref.get("displayOrder") display_order = ref.get("displayOrder")
if not isinstance(display_order, int): if not isinstance(display_order, int):
errors.append(f"{context}/refs.json[{index}] displayOrder must be an integer") errors.append(f"{context}/refs.json[{index}] displayOrder must be an integer")