@effected/yaml 0.14.0 → 0.15.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/Yaml.js +2 -2
- package/YamlDocument.js +1 -1
- package/package.json +2 -2
- package/tsdoc-metadata.json +1 -1
package/Yaml.js
CHANGED
|
@@ -592,7 +592,7 @@ var Yaml = class Yaml {
|
|
|
592
592
|
* paths; for the default-options case use {@link Yaml.YamlFromString}.
|
|
593
593
|
*/
|
|
594
594
|
static fromString(options) {
|
|
595
|
-
return Schema.String.pipe(Schema.decodeTo(Schema.Unknown, SchemaTransformation.
|
|
595
|
+
return Schema.String.pipe(Schema.decodeTo(Schema.Unknown, SchemaTransformation.transformEffect({
|
|
596
596
|
decode: (input) => Yaml.parse(input, options).pipe(Effect.mapError((error) => new SchemaIssue.InvalidValue({ message: error.message }, input))),
|
|
597
597
|
encode: (value) => stringifyOrFail(value).pipe(Effect.mapError((error) => new SchemaIssue.InvalidValue({ message: error.message }, value)))
|
|
598
598
|
})));
|
|
@@ -612,7 +612,7 @@ var Yaml = class Yaml {
|
|
|
612
612
|
* {@link Yaml.fromString}).
|
|
613
613
|
*/
|
|
614
614
|
static allFromString(options) {
|
|
615
|
-
return Schema.String.pipe(Schema.decodeTo(Schema.Array(Schema.Unknown), SchemaTransformation.
|
|
615
|
+
return Schema.String.pipe(Schema.decodeTo(Schema.Array(Schema.Unknown), SchemaTransformation.transformEffect({
|
|
616
616
|
decode: (input) => Yaml.parseAll(input, options).pipe(Effect.mapError((error) => new SchemaIssue.InvalidValue({ message: error.message }, input))),
|
|
617
617
|
encode: (values) => Effect.gen(function* () {
|
|
618
618
|
if (values.length === 0) return "";
|
package/YamlDocument.js
CHANGED
|
@@ -86,7 +86,7 @@ var YamlDocument = class YamlDocument extends Schema.Class("YamlDocument")({
|
|
|
86
86
|
* paths.
|
|
87
87
|
*/
|
|
88
88
|
static schema(options) {
|
|
89
|
-
return Schema.String.pipe(Schema.decodeTo(Schema.instanceOf(YamlDocument), SchemaTransformation.
|
|
89
|
+
return Schema.String.pipe(Schema.decodeTo(Schema.instanceOf(YamlDocument), SchemaTransformation.transformEffect({
|
|
90
90
|
decode: (input) => YamlDocument.parse(input, options).pipe(Effect.mapError((error) => new SchemaIssue.InvalidValue({ message: error.message }, input))),
|
|
91
91
|
encode: (doc) => doc.stringify().pipe(Effect.mapError((error) => new SchemaIssue.InvalidValue({ message: error.message }, doc)))
|
|
92
92
|
})));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/yaml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Zero-dependency YAML parsing, editing, formatting and linting as Effect schemas.",
|
|
6
6
|
"keywords": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"./package.json": "./package.json"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"effect": "4.0.0-rc.
|
|
44
|
+
"effect": "4.0.0-rc.115"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=24.11.0"
|