@cobol-ts/yaml 0.0.14 → 0.0.17

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.
Files changed (2) hide show
  1. package/README.md +21 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,3 +1,23 @@
1
1
  # @cobol-ts/yaml
2
2
 
3
- Minimal YAML parsing capability. Callers supply a `YamlParser` and validate the returned `unknown` against their own schema.
3
+ Define a port for parsing YAML into an untrusted `unknown` value wrapped in `ErrorsOr`.
4
+
5
+ The caller validates its own configuration schema; the port has no dependency on js-yaml.
6
+
7
+ ## Contract
8
+
9
+ ```typescript
10
+ interface YamlParser {
11
+ parse(source: string): ErrorsOr<unknown>
12
+ }
13
+ ```
14
+
15
+ Callers must validate the parsed value against the owning document's schema. The adapter in [`@cobol-ts/yaml-jsyaml`](../yaml-jsyaml/README.md) provides a Node-compatible implementation without coupling catalogue parsing to that dependency.
16
+
17
+ ## Source and tests
18
+
19
+ **Public entry points:** [yaml.ts](./src/yaml.ts).
20
+
21
+ **Tests:** No package-local test suite; exercised through dependent module tests.
22
+
23
+ **Related:** [@cobol-ts/yaml-jsyaml](../yaml-jsyaml/README.md) · [@cobol-ts/validate](../validator/README.md).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cobol-ts/yaml",
3
3
  "description": "YAML parsing interface independent of any implementation",
4
- "version": "0.0.14",
4
+ "version": "0.0.17",
5
5
  "main": "dist/index",
6
6
  "types": "dist/index",
7
7
  "browserslist": {
@@ -17,7 +17,7 @@
17
17
  ]
18
18
  },
19
19
  "dependencies": {
20
- "@cobol-ts/errors": "0.0.14"
20
+ "@cobol-ts/errors": "0.0.17"
21
21
  },
22
22
  "devDependencies": {
23
23
  "typescript": "^5.2.2",