@effected/yaml 0.22.0 → 0.24.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.
Files changed (43) hide show
  1. package/Yaml.js +23 -30
  2. package/YamlDiagnostic.js +1 -2
  3. package/YamlDocument.js +125 -51
  4. package/YamlEdit.js +1 -2
  5. package/YamlFormat.js +115 -57
  6. package/YamlLint.js +1 -2
  7. package/YamlLintRule.js +1 -2
  8. package/YamlNode.js +1 -2
  9. package/YamlToken.js +1 -2
  10. package/YamlVisitor.js +1 -2
  11. package/index.d.ts +158 -32
  12. package/internal/composer/anchors.js +1 -2
  13. package/internal/composer/block.js +1 -2
  14. package/internal/composer/comments.js +1 -2
  15. package/internal/composer/document.js +1 -2
  16. package/internal/composer/flow.js +1 -2
  17. package/internal/composer/scalars.js +1 -2
  18. package/internal/composer/state.js +1 -2
  19. package/internal/composer/tags.js +1 -2
  20. package/internal/cst-parser.js +1 -2
  21. package/internal/diagnostics.js +1 -2
  22. package/internal/diff.js +1 -2
  23. package/internal/fold.js +1 -2
  24. package/internal/lexer.js +1 -2
  25. package/internal/requote.js +1 -2
  26. package/internal/rules/catalog.js +1 -2
  27. package/internal/rules/colon-spacing.js +1 -2
  28. package/internal/rules/comments-spacing.js +1 -2
  29. package/internal/rules/document-end.js +1 -2
  30. package/internal/rules/document-start.js +1 -2
  31. package/internal/rules/empty-lines.js +1 -2
  32. package/internal/rules/eof-newline.js +1 -2
  33. package/internal/rules/hyphen-spacing.js +1 -2
  34. package/internal/rules/indentation.js +1 -2
  35. package/internal/rules/key-duplicates.js +1 -2
  36. package/internal/rules/line-length.js +1 -2
  37. package/internal/rules/parse-validity.js +1 -2
  38. package/internal/rules/quoted-strings.js +1 -2
  39. package/internal/rules/trailing-spaces.js +1 -2
  40. package/internal/rules/truthy.js +1 -2
  41. package/internal/rules/util.js +1 -2
  42. package/internal/stringifier.js +1 -2
  43. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { YamlEdit } from "../../YamlEdit.js";
2
2
  import { StyleVote, YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/internal/rules/document-start.ts
5
+ // src/internal/rules/document-start.ts
6
6
  /** Options for `document-start`: require (`true`, default) or forbid the marker. */
7
7
  const documentStartOptions = Schema.Struct({
8
8
  severity: Schema.optionalKey(YamlLintSeverity),
@@ -86,5 +86,4 @@ const documentStart = {
86
86
  }
87
87
  };
88
88
 
89
- //#endregion
90
89
  export { documentStart, documentStartOptions };
@@ -3,7 +3,7 @@ import { StyleFloor, YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLint
3
3
  import { insideScalarSpan, nonNegativeIntegerOption } from "./util.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/internal/rules/empty-lines.ts
6
+ // src/internal/rules/empty-lines.ts
7
7
  /**
8
8
  * Options for `empty-lines`: `max` consecutive blank lines in the body
9
9
  * (default 2), `maxStart` at the document start and `maxEnd` at the end
@@ -86,5 +86,4 @@ const emptyLines = {
86
86
  }
87
87
  };
88
88
 
89
- //#endregion
90
89
  export { emptyLines, emptyLinesOptions };
@@ -2,7 +2,7 @@ import { YamlEdit } from "../../YamlEdit.js";
2
2
  import { YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/internal/rules/eof-newline.ts
5
+ // src/internal/rules/eof-newline.ts
6
6
  /** Options for `eof-newline` (severity only — nothing to tune). */
7
7
  const eofNewlineOptions = Schema.Struct({ severity: Schema.optionalKey(YamlLintSeverity) });
8
8
  /** A missing final newline, with an inserting fix. */
@@ -29,5 +29,4 @@ const eofNewline = {
29
29
  }
30
30
  };
31
31
 
32
- //#endregion
33
32
  export { eofNewline, eofNewlineOptions };
@@ -3,7 +3,7 @@ import { YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
3
3
  import { positiveIntegerOption } from "./util.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/internal/rules/hyphen-spacing.ts
6
+ // src/internal/rules/hyphen-spacing.ts
7
7
  /**
8
8
  * Options for `hyphen-spacing`: `maxSpacesAfter` (default 1) after the `-`.
9
9
  * At least one separation space must follow the indicator — `0` would make
@@ -48,5 +48,4 @@ const hyphenSpacing = {
48
48
  }
49
49
  };
50
50
 
51
- //#endregion
52
51
  export { hyphenSpacing, hyphenSpacingOptions };
@@ -2,7 +2,7 @@ import { StyleVote, YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintR
2
2
  import { coveringToken, isScalarContinuationLine, nonNegativeIntegerOption } from "./util.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/internal/rules/indentation.ts
5
+ // src/internal/rules/indentation.ts
6
6
  /**
7
7
  * Options for `indentation`: `spaces` per level (number or "consistent",
8
8
  * default "consistent") and `indentSequences` (boolean or "consistent",
@@ -152,5 +152,4 @@ const indentation = {
152
152
  }
153
153
  };
154
154
 
155
- //#endregion
156
155
  export { indentation, indentationOptions };
@@ -4,7 +4,7 @@ import { YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
4
4
  import { positionAt } from "./util.js";
5
5
  import { Schema } from "effect";
6
6
 
7
- //#region src/internal/rules/key-duplicates.ts
7
+ // src/internal/rules/key-duplicates.ts
8
8
  /** Options for `key-duplicates` (severity only — duplicates are duplicates). */
9
9
  const keyDuplicatesOptions = Schema.Struct({ severity: Schema.optionalKey(YamlLintSeverity) });
10
10
  const walk = (node, text, out, ctx) => {
@@ -45,5 +45,4 @@ const keyDuplicates = {
45
45
  }
46
46
  };
47
47
 
48
- //#endregion
49
48
  export { keyDuplicates, keyDuplicatesOptions };
@@ -2,7 +2,7 @@ import { StyleFloor, YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLint
2
2
  import { nonNegativeIntegerOption } from "./util.js";
3
3
  import { Schema } from "effect";
4
4
 
5
- //#region src/internal/rules/line-length.ts
5
+ // src/internal/rules/line-length.ts
6
6
  /**
7
7
  * Options for `line-length`. `max` defaults to 120 — the kit-native line
8
8
  * width (the yamllint id is recognizable; the option surface and defaults
@@ -40,5 +40,4 @@ const lineLength = {
40
40
  }
41
41
  };
42
42
 
43
- //#endregion
44
43
  export { lineLength, lineLengthOptions };
@@ -1,7 +1,7 @@
1
1
  import { YamlLintDiagnostic } from "../../YamlLintRule.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/internal/rules/parse-validity.ts
4
+ // src/internal/rules/parse-validity.ts
5
5
  /**
6
6
  * parse-validity accepts no options; the config layer additionally rejects
7
7
  * any attempt to set a severity or `"off"` on this rule.
@@ -29,5 +29,4 @@ const parseValidity = {
29
29
  }))]
30
30
  };
31
31
 
32
- //#endregion
33
32
  export { parseValidity, parseValidityOptions };
@@ -4,7 +4,7 @@ import { StyleVote, YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintR
4
4
  import { positionAt, walkScalars } from "./util.js";
5
5
  import { Schema } from "effect";
6
6
 
7
- //#region src/internal/rules/quoted-strings.ts
7
+ // src/internal/rules/quoted-strings.ts
8
8
  /**
9
9
  * Options for `quoted-strings`: the preferred `quoteType` (default
10
10
  * `"double"`) and whether plain string scalars are `required` to be quoted
@@ -95,5 +95,4 @@ const quotedStrings = {
95
95
  }
96
96
  };
97
97
 
98
- //#endregion
99
98
  export { quotedStrings, quotedStringsOptions };
@@ -3,7 +3,7 @@ import { YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
3
3
  import { insideScalarSpan } from "./util.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/internal/rules/trailing-spaces.ts
6
+ // src/internal/rules/trailing-spaces.ts
7
7
  /** Options for `trailing-spaces` (severity only — nothing to tune). */
8
8
  const trailingSpacesOptions = Schema.Struct({ severity: Schema.optionalKey(YamlLintSeverity) });
9
9
  /** Trailing spaces or tabs at the end of a line, with a deleting fix. */
@@ -35,5 +35,4 @@ const trailingSpaces = {
35
35
  }
36
36
  };
37
37
 
38
- //#endregion
39
38
  export { trailingSpaces, trailingSpacesOptions };
@@ -3,7 +3,7 @@ import { YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
3
3
  import { positionAt, walkScalars } from "./util.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/internal/rules/truthy.ts
6
+ // src/internal/rules/truthy.ts
7
7
  /**
8
8
  * Options for `truthy`: the `allowed` boolean spellings (default
9
9
  * `["true", "false"]`) and whether mapping keys are checked (`checkKeys`,
@@ -80,5 +80,4 @@ const truthy = {
80
80
  }
81
81
  };
82
82
 
83
- //#endregion
84
83
  export { truthy, truthyOptions };
@@ -1,7 +1,7 @@
1
1
  import { YamlMap, YamlScalar, YamlSeq } from "../../YamlNode.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/internal/rules/util.ts
4
+ // src/internal/rules/util.ts
5
5
  /**
6
6
  * A non-negative integer — the shape every numeric rule option takes.
7
7
  * Rejects NaN, negatives and fractions with a message naming the constraint;
@@ -88,5 +88,4 @@ function positionAt(lines, offset) {
88
88
  };
89
89
  }
90
90
 
91
- //#endregion
92
91
  export { coveringToken, insideScalarSpan, isScalarContinuationLine, nonNegativeIntegerOption, positionAt, positiveIntegerOption, walkScalars };
@@ -1,7 +1,7 @@
1
1
  import { YamlAlias, YamlMap, YamlPair, YamlScalar, YamlSeq } from "../YamlNode.js";
2
2
  import { foldRenderedScalar, hasInteriorTrailingWhitespace, hasNewlineSpacesTab, isControlChar, renderBlockFolded, renderBlockLiteral, renderSingleQuotedMultiline } from "./fold.js";
3
3
 
4
- //#region src/internal/stringifier.ts
4
+ // src/internal/stringifier.ts
5
5
  /**
6
6
  * Thrown by the stringifier on its failure paths (circular references). The
7
7
  * facade catches this and materializes the public stringify error.
@@ -1184,5 +1184,4 @@ function stringifyDocument(doc, options) {
1184
1184
  return docComment ? `${docComment}\n${plain}` : plain;
1185
1185
  }
1186
1186
 
1187
- //#endregion
1188
1187
  export { StringifyDepthExceeded, StringifyFailure, renderDoubleQuoted, renderSingleQuoted, stringifyDocument, stringifyValue, stripNodeComments };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/yaml",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
4
  "private": false,
5
5
  "description": "Zero-dependency YAML parsing, editing, formatting and linting as Effect schemas.",
6
6
  "keywords": [