Repository navigation
Add inline config object support to Node API - #1412
Merged
Merged
Conversation
BYVoid
force-pushed
the
add-node-inline-config-api
branch
from
July 8, 2026 22:16
178bddf to
f8bffba
Compare
BYVoid
marked this pull request as ready for review
July 8, 2026 22:17
Collaborator
|
需要注意一下 tofu_risk 語義一致性的問題: src/Config.cpp 的 ParseDict 中 JSON Schema 目前禁止 includeTofuRiskDictionaries: OpenCC/data/config/opencc_config.schema.json Lines 77 to 88 in 00b3ba1 (這裡 inline_dict 是 additionalProperties: false 且只允許 type/entries;may_output_tofu 只在 file_dict/group_dict 上合法。) |
Allow the JavaScript API to build converters from OpenCC config objects while preserving existing string config behavior. Document the new entry point and cover bundled assets, custom config directories, and tofu-risk filtering in Node tests.
BYVoid
force-pushed
the
add-node-inline-config-api
branch
from
July 8, 2026 22:29
f8bffba to
2b035e6
Compare
Owner
Author
|
好的,改了。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenCC.fromConfig(config, options?)and TypeScript declarations forOpenCCConfigandoptions.configDirectory.Tests
node --test --test-reporter=spec --test-name-pattern="inline configuration|fromConfig|bundled assets" node/test.jsnpm test