@o3co/ts.hocon 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +4 -2
- package/README.md +4 -2
- package/dist/index.cjs +307 -73
- package/dist/index.js +307 -73
- package/dist/zod.cjs +307 -73
- package/dist/zod.js +307 -73
- package/package.json +1 -1
package/README.ja.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@o3co/ts.hocon)
|
|
4
4
|
[](https://github.com/o3co/ts.hocon/actions/workflows/test.yml)
|
|
5
|
-
[](https://codecov.io/gh/o3co/ts.hocon)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
[Lightbend HOCON](https://github.com/lightbend/config/blob/main/HOCON.md) 仕様の TypeScript パーサー。現在の準拠率は [仕様準拠](#仕様準拠) を参照。
|
|
@@ -54,7 +54,9 @@ cfg.has('server.host') // true
|
|
|
54
54
|
| Trailing commas | N/A | No | N/A | Yes |
|
|
55
55
|
| Unquoted strings | Yes | No | Yes | Yes |
|
|
56
56
|
|
|
57
|
-
HOCON
|
|
57
|
+
HOCON は単なるシリアライズ形式ではなく、**プログラムに注入するための設定言語** です。JSON / YAML / TOML はデータ構造の表現に徹しており、ファイルの重ね合わせ・環境変数・参照解決はアプリ側(Pydantic、Serde、Zod 等)の責務になります。HOCON はそれらを仕様そのものに内包しているため、プログラムが設定を受け取る時点で、フォールバックは合成済み・`${VAR}` 参照は解決済みの「1 枚の設定」になっています。「このレイヤーに値があるか?」に由来する条件分岐は、コードではなくフォーマット境界で消えます。
|
|
58
|
+
|
|
59
|
+
加えて HOCON は YAML の可読性と JSON の構造性を兼ね備えるため、フラットなキーバリュー設定を超えるユースケースには強い選択肢になります。
|
|
58
60
|
|
|
59
61
|
## 特徴
|
|
60
62
|
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@o3co/ts.hocon)
|
|
4
4
|
[](https://github.com/o3co/ts.hocon/actions/workflows/test.yml)
|
|
5
|
-
[](https://codecov.io/gh/o3co/ts.hocon)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
8
|
A [Lightbend HOCON](https://github.com/lightbend/config/blob/main/HOCON.md) parser for TypeScript. See [Spec Compliance](#spec-compliance) for the current conformance rate.
|
|
@@ -58,7 +58,9 @@ cfg.has('server.host') // true
|
|
|
58
58
|
| Trailing commas | N/A | No | N/A | Yes |
|
|
59
59
|
| Unquoted strings | Yes | No | Yes | Yes |
|
|
60
60
|
|
|
61
|
-
HOCON
|
|
61
|
+
HOCON isn't just a serialization format — it's a **config-injection language**. JSON, YAML, and TOML describe data structures and leave file layering, environment variables, and reference resolution to your code (Pydantic, Serde, Zod, etc.). HOCON bakes those into the spec itself: by the time your program reads the config, fallback files are merged and `${VAR}` references resolved into a single composed object. Conditional branching from "is this value present in this layer?" disappears at the format boundary.
|
|
62
|
+
|
|
63
|
+
On top of that, HOCON combines the readability of YAML with the structure of JSON — making it a strong fit for anything beyond flat key-value config.
|
|
62
64
|
|
|
63
65
|
## Features
|
|
64
66
|
|