@effected/yaml 0.22.0 → 0.23.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 +1 -2
  2. package/YamlDiagnostic.js +1 -2
  3. package/YamlDocument.js +1 -2
  4. package/YamlEdit.js +1 -2
  5. package/YamlFormat.js +1 -2
  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 +0 -20
  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
package/Yaml.js CHANGED
@@ -5,7 +5,7 @@ import { StringifyDepthExceeded, StringifyFailure, stringifyValue } from "./inte
5
5
  import { YamlDiagnostic } from "./YamlDiagnostic.js";
6
6
  import { Effect, Result, Schema, SchemaIssue, SchemaTransformation } from "effect";
7
7
 
8
- //#region src/Yaml.ts
8
+ // src/Yaml.ts
9
9
  /**
10
10
  * Options controlling parse behavior. All fields are omissible; absent fields
11
11
  * resolve to `strict` `true`, `maxAliasCount` `100` (the alias-based
@@ -774,5 +774,4 @@ function deepEqualValues(a, b) {
774
774
  return false;
775
775
  }
776
776
 
777
- //#endregion
778
777
  export { Yaml, YamlParseError, YamlParseOptions, YamlStringifyError, YamlStringifyOptions };
package/YamlDiagnostic.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { YAML_COMPOSE_ERROR_CODES, YAML_LEX_ERROR_CODES, YAML_MODIFY_ERROR_CODES, YAML_PARSE_ERROR_CODES, YAML_STRINGIFY_ERROR_CODES, isFatalCode } from "./internal/diagnostics.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/YamlDiagnostic.ts
4
+ // src/YamlDiagnostic.ts
5
5
  /**
6
6
  * Error codes emitted by the lexer stage.
7
7
  *
@@ -128,5 +128,4 @@ function lineChar(text, offset) {
128
128
  };
129
129
  }
130
130
 
131
- //#endregion
132
131
  export { YamlComposerErrorCode, YamlDiagnostic, YamlErrorCode, YamlLexErrorCode, YamlModifyErrorCode, YamlParseErrorCode, YamlStringifyErrorCode };
package/YamlDocument.js CHANGED
@@ -6,7 +6,7 @@ import { YamlDiagnostic } from "./YamlDiagnostic.js";
6
6
  import { YamlParseError, YamlStringifyError } from "./Yaml.js";
7
7
  import { Effect, Schema, SchemaIssue, SchemaTransformation } from "effect";
8
8
 
9
- //#region src/YamlDocument.ts
9
+ // src/YamlDocument.ts
10
10
  /**
11
11
  * A YAML directive appearing before a document (e.g. `%YAML 1.2` or
12
12
  * `%TAG ! tag:example.com,2000:`). `"YAML"` and `"TAG"` are the YAML 1.2
@@ -243,5 +243,4 @@ function toRawDocument(doc) {
243
243
  };
244
244
  }
245
245
 
246
- //#endregion
247
246
  export { YamlDirective, YamlDocument, documentFromRaw };
package/YamlEdit.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Schema } from "effect";
2
2
 
3
- //#region src/YamlEdit.ts
3
+ // src/YamlEdit.ts
4
4
  /**
5
5
  * A range within a YAML document, expressed as a zero-based character
6
6
  * `offset` and a `length` in UTF-16 code units. Pass to `YamlFormat.format`
@@ -52,5 +52,4 @@ var YamlEdit = class extends Schema.Class("YamlEdit")({
52
52
  }
53
53
  };
54
54
 
55
- //#endregion
56
55
  export { YamlEdit, YamlRange };
package/YamlFormat.js CHANGED
@@ -9,7 +9,7 @@ import { computeEdits } from "./internal/diff.js";
9
9
  import { requoteScalarText } from "./internal/requote.js";
10
10
  import { Effect, Schema } from "effect";
11
11
 
12
- //#region src/YamlFormat.ts
12
+ // src/YamlFormat.ts
13
13
  /**
14
14
  * Options controlling formatting behavior: every {@link YamlStringifyOptions}
15
15
  * field (derived, not hand-duplicated — including `indentSequences`,
@@ -819,5 +819,4 @@ var YamlFormat = class YamlFormat {
819
819
  });
820
820
  };
821
821
 
822
- //#endregion
823
822
  export { YamlFormat, YamlFormattingOptions, YamlModificationError };
package/YamlLint.js CHANGED
@@ -8,7 +8,7 @@ import { builtinOptionsSchemas, builtinRules } from "./internal/rules/catalog.js
8
8
  import { YamlTokens } from "./YamlToken.js";
9
9
  import { Result, Schema } from "effect";
10
10
 
11
- //#region src/YamlLint.ts
11
+ // src/YamlLint.ts
12
12
  /**
13
13
  * One entry of the config `rules` map: a bare severity literal (the common
14
14
  * case), `"off"` to disable, or a typed per-rule options object (the tuning
@@ -551,5 +551,4 @@ var YamlLint = class YamlLint {
551
551
  }
552
552
  };
553
553
 
554
- //#endregion
555
554
  export { StyleConflict, StyleEvidence, StyleFloorTally, StyleVoteTally, YamlLint, YamlLintConfig, YamlLintRuleSetting, YamlStyleConflictError };
package/YamlLintRule.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { YamlEdit } from "./YamlEdit.js";
2
2
  import { Schema } from "effect";
3
3
 
4
- //#region src/YamlLintRule.ts
4
+ // src/YamlLintRule.ts
5
5
  /**
6
6
  * Lint diagnostic severities. `"off"` is a config-level disable only and
7
7
  * never reaches a diagnostic — a rule set to `"off"` is not run.
@@ -81,5 +81,4 @@ var StyleFloor = class extends Schema.TaggedClass()("StyleFloor", {
81
81
  value: Schema.Number
82
82
  }) {};
83
83
 
84
- //#endregion
85
84
  export { StyleFloor, StyleVote, YamlLintDiagnostic, YamlLintSeverity };
package/YamlNode.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Option, Schema } from "effect";
2
2
 
3
- //#region src/YamlNode.ts
3
+ // src/YamlNode.ts
4
4
  /**
5
5
  * YAML scalar presentation styles.
6
6
  *
@@ -456,5 +456,4 @@ function nodeToValue(node, anchors, budget, counting = false) {
456
456
  return null;
457
457
  }
458
458
 
459
- //#endregion
460
459
  export { AliasExpansionBudgetExceeded, CollectionStyle, QuoteCompat, QuoteStyle, ScalarChomp, ScalarStyle, YamlAlias, YamlMap, YamlNode, YamlPair, YamlScalar, YamlSeq, aliasExpansionLimit, nodeToJsValue };
package/YamlToken.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { lexAll } from "./internal/lexer.js";
2
2
  import { Result, Schema, Stream } from "effect";
3
3
 
4
- //#region src/YamlToken.ts
4
+ // src/YamlToken.ts
5
5
  /**
6
6
  * The 22 lexical token kinds produced by the YAML tokenizer.
7
7
  *
@@ -139,5 +139,4 @@ var YamlTokens = class YamlTokens {
139
139
  }
140
140
  };
141
141
 
142
- //#endregion
143
142
  export { YamlToken, YamlTokenKind, YamlTokens };
package/YamlVisitor.js CHANGED
@@ -3,7 +3,7 @@ import { composeAllDocuments } from "./internal/composer/document.js";
3
3
  import { YamlDiagnostic } from "./YamlDiagnostic.js";
4
4
  import { Data, Stream } from "effect";
5
5
 
6
- //#region src/YamlVisitor.ts
6
+ // src/YamlVisitor.ts
7
7
  /**
8
8
  * Constructors and matchers for the `YamlVisitorEvent` union (e.g.
9
9
  * `YamlVisitorEvent.Scalar({ path, depth, value, style })`,
@@ -225,5 +225,4 @@ function* walkPair(pair, parentPath, depth) {
225
225
  if (pair.value !== null) yield* walkNode(pair.value, pairPath, depth + 1);
226
226
  }
227
227
 
228
- //#endregion
229
228
  export { YamlVisitor, YamlVisitorEvent };
package/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { Data, Effect, Option, Result, Schema, Stream } from "effect";
2
- //#region src/YamlDiagnostic.d.ts
3
2
  /**
4
3
  * Error codes emitted by the lexer stage.
5
4
  *
@@ -121,8 +120,6 @@ export declare class YamlDiagnostic extends YamlDiagnostic_base {
121
120
  readonly length: number;
122
121
  }, text: string): YamlDiagnostic;
123
122
  }
124
- //#endregion
125
- //#region src/Yaml.d.ts
126
123
  declare const YamlParseOptions_base: Schema.Class<YamlParseOptions, Schema.Struct<{
127
124
  readonly strict: Schema.optionalKey<Schema.Boolean>;
128
125
  readonly maxAliasCount: Schema.optionalKey<Schema.Number>;
@@ -620,8 +617,6 @@ export declare class Yaml {
620
617
  */
621
618
  static bind<T, E, RD = never, RE = never>(target: Schema.Codec<T, E, RD, RE>): YamlBoundCodec<T, RD, RE>;
622
619
  }
623
- //#endregion
624
- //#region src/YamlEdit.d.ts
625
620
  /**
626
621
  * A single path segment: a `string` for mapping keys or a `number` for
627
622
  * sequence indices.
@@ -678,8 +673,6 @@ export declare class YamlEdit extends YamlEdit_base {
678
673
  */
679
674
  static applyAll(text: string, edits: ReadonlyArray<YamlEdit>): string;
680
675
  }
681
- //#endregion
682
- //#region src/YamlNode.d.ts
683
676
  /**
684
677
  * YAML scalar presentation styles.
685
678
  *
@@ -990,8 +983,6 @@ export declare class YamlSeq extends YamlSeq_base {
990
983
  /** See `YamlScalar.toValue`. Pure and total. */
991
984
  toValue(anchors?: Map<string, YamlNode>): unknown;
992
985
  }
993
- //#endregion
994
- //#region src/YamlDocument.d.ts
995
986
  declare const YamlDirective_base: Schema.Class<YamlDirective, Schema.Struct<{
996
987
  readonly name: Schema.String;
997
988
  readonly parameters: Schema.$Array<Schema.String>;
@@ -1115,8 +1106,6 @@ export declare class YamlDocument extends YamlDocument_base {
1115
1106
  */
1116
1107
  toValue(): unknown;
1117
1108
  }
1118
- //#endregion
1119
- //#region src/YamlFormat.d.ts
1120
1109
  /**
1121
1110
  * A range accepted at the `format`/`formatToString`/etc. call sites: either a
1122
1111
  * {@link YamlRange} instance or a plain `{ offset, length }` literal (the two
@@ -1415,8 +1404,6 @@ export declare class YamlFormat {
1415
1404
  */
1416
1405
  static readonly modifyToString: (text: string, path: YamlPath, value: unknown, options?: YamlStringifyOptions | undefined) => Effect.Effect<string, YamlModificationError, never>;
1417
1406
  }
1418
- //#endregion
1419
- //#region src/YamlToken.d.ts
1420
1407
  /**
1421
1408
  * The 22 lexical token kinds produced by the YAML tokenizer.
1422
1409
  *
@@ -1500,8 +1487,6 @@ export declare class YamlTokens {
1500
1487
  */
1501
1488
  static stream(text: string): Stream.Stream<YamlToken>;
1502
1489
  }
1503
- //#endregion
1504
- //#region src/YamlLintRule.d.ts
1505
1490
  /**
1506
1491
  * Lint diagnostic severities. `"off"` is a config-level disable only and
1507
1492
  * never reaches a diagnostic — a rule set to `"off"` is not run.
@@ -1650,8 +1635,6 @@ interface YamlRule {
1650
1635
  readonly check: (ctx: LintContext, options: unknown) => Iterable<YamlLintDiagnostic>;
1651
1636
  readonly infer?: (ctx: LintContext) => Iterable<StyleObservation>;
1652
1637
  }
1653
- //#endregion
1654
- //#region src/YamlLint.d.ts
1655
1638
  /**
1656
1639
  * One entry of the config `rules` map: a bare severity literal (the common
1657
1640
  * case), `"off"` to disable, or a typed per-rule options object (the tuning
@@ -1938,8 +1921,6 @@ export declare class YamlLint {
1938
1921
  */
1939
1922
  static inferLenient(text: string, rules: ReadonlyArray<YamlRule>, base?: YamlLintConfig): YamlLintInference;
1940
1923
  }
1941
- //#endregion
1942
- //#region src/YamlVisitor.d.ts
1943
1924
  /**
1944
1925
  * The discriminated union of YAML AST visitor events. Every variant carries
1945
1926
  * `path` (segments from the document root) and `depth` (zero-based nesting
@@ -2561,6 +2542,5 @@ export declare class YamlVisitor {
2561
2542
  */
2562
2543
  static visit(text: string, options?: YamlParseOptions): Stream.Stream<YamlVisitorEvent>;
2563
2544
  }
2564
- //#endregion
2565
2545
  export type { LintContext, LintLine, StyleObservation, YamlAliasEncoded, YamlBoundCodec, YamlLintInference, YamlMapEncoded, YamlPath, YamlRangeLike, YamlRule, YamlScalarEncoded, YamlSegment, YamlSeqEncoded };
2566
2546
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { YamlAlias } from "../../YamlNode.js";
2
2
 
3
- //#region src/internal/composer/anchors.ts
3
+ // src/internal/composer/anchors.ts
4
4
  /**
5
5
  * Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
6
6
  * Aliases represent references to existing anchored nodes and cannot have their own anchors.
@@ -68,5 +68,4 @@ function scanName(text, start) {
68
68
  return text.slice(start, end);
69
69
  }
70
70
 
71
- //#endregion
72
71
  export { checkAnchorOnAlias, getAliasName, getAnchorName, makeAlias, registerAnchor, scanName };
@@ -4,7 +4,7 @@ import { blankAboveIsKeepChompContent, columnAt, hasBlankLineAbove, isAfterIndic
4
4
  import { enterNesting, exitNesting, hasMeta, hasNonWhitespaceBeforeOnLine, lineCol, lineIndentColumn, sameLine } from "./state.js";
5
5
  import { blockMapStartsWithValueSep, classifyPlainNumeric, collectMultilineKey, collectMultilinePlainScalar, findFirstContent, findLastContent, findNextContentInList, findNextSignificantChild, findValueSepOffset, getScalarStyle, hasValueSepAfterInList, hasValueSepBetween, hasValueSepThroughPlainScalars, makeScalar, resolveScalar, shouldPreserveRaw } from "./scalars.js";
6
6
 
7
- //#region src/internal/composer/block.ts
7
+ // src/internal/composer/block.ts
8
8
  /**
9
9
  * Compose a block map from its CST children, with an optional external first key.
10
10
  *
@@ -1429,5 +1429,4 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
1429
1429
  return map;
1430
1430
  }
1431
1431
 
1432
- //#endregion
1433
1432
  export { buildPairs, checkDuplicateKeys, checkMultilineImplicitKeys, checkTrailingContentOnSameLine, composeBlockMap, composeBlockSeq, composeFlatBlockMap, flattenBlockMapChildren, keyIdentity };
@@ -1,6 +1,6 @@
1
1
  import { YamlAlias, YamlMap, YamlScalar, YamlSeq } from "../../YamlNode.js";
2
2
 
3
- //#region src/internal/composer/comments.ts
3
+ // src/internal/composer/comments.ts
4
4
  /** True when there is no line break between `start` and `end` in `text`. */
5
5
  function sameLineSpan(text, start, end) {
6
6
  if (start < 0) return false;
@@ -220,5 +220,4 @@ function mergedCommentFields(existing, incoming) {
220
220
  };
221
221
  }
222
222
 
223
- //#endregion
224
223
  export { blankAboveIsKeepChompContent, blankLineAboveStart, columnAt, hasBlankLineAbove, hasBlankLineBelow, isAfterIndicatorOnly, isOwnLineAt, joinComments, rawCommentText, sameLineSpan, withCommentFields };
@@ -8,7 +8,7 @@ import { collectMultilinePlainScalar, findNextContentChild, getScalarStyle, hasB
8
8
  import { composeBlockMap, composeBlockSeq, composeFlatBlockMap } from "./block.js";
9
9
  import { composeFlowMap, composeFlowSeq } from "./flow.js";
10
10
 
11
- //#region src/internal/composer/document.ts
11
+ // src/internal/composer/document.ts
12
12
  /** The flow-composer dispatch wired into every state this module creates. */
13
13
  const FLOW = {
14
14
  composeFlowMap,
@@ -798,5 +798,4 @@ function stripOwnComment(node) {
798
798
  });
799
799
  }
800
800
 
801
- //#endregion
802
801
  export { EMPTY_DOCUMENT, composeAllDocuments, composeDocument, composeFirstDocument, composeFirstDocumentCounted, validateCrossDocumentDirectives };
@@ -5,7 +5,7 @@ import { enterNesting, exitNesting, hasMeta } from "./state.js";
5
5
  import { collectMultilineKey, collectMultilinePlainScalar, getScalarStyle, hasValueSepThroughPlainScalars, makeScalar, resolveScalar } from "./scalars.js";
6
6
  import { buildPairs, checkDuplicateKeys, checkMultilineImplicitKeys } from "./block.js";
7
7
 
8
- //#region src/internal/composer/flow.ts
8
+ // src/internal/composer/flow.ts
9
9
  /**
10
10
  * Validate that flow collection entries are separated by commas.
11
11
  *
@@ -495,5 +495,4 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
495
495
  return seq;
496
496
  }
497
497
 
498
- //#endregion
499
498
  export { composeFlowMap, composeFlowSeq, flattenFlowChildren };
@@ -4,7 +4,7 @@ import { rawCommentText } from "./comments.js";
4
4
  import { lineCol } from "./state.js";
5
5
  import { resolveTagHandle } from "./tags.js";
6
6
 
7
- //#region src/internal/composer/scalars.ts
7
+ // src/internal/composer/scalars.ts
8
8
  const NULL_RE = /^(?:null|Null|NULL|~)$/;
9
9
  const TRUE_RE = /^(?:true|True|TRUE)$/;
10
10
  const FALSE_RE = /^(?:false|False|FALSE)$/;
@@ -930,5 +930,4 @@ function shouldPreserveRaw(rawValue, value) {
930
930
  return false;
931
931
  }
932
932
 
933
- //#endregion
934
933
  export { blockMapStartsWithValueSep, classifyPlainNumeric, collectMultilineKey, collectMultilinePlainScalar, findFirstContent, findLastContent, findNextContentChild, findNextContentInList, findNextSignificantChild, findValueSepOffset, foldFlowLines, getBlockChomp, getBlockIndent, getScalarStyle, getScalarValue, hasBlockMapAfterInList, hasValueSepAfter, hasValueSepAfterInList, hasValueSepBetween, hasValueSepThroughPlainScalars, indexOfChild, makeScalar, resolveScalar, shouldPreserveRaw };
@@ -1,4 +1,4 @@
1
- //#region src/internal/composer/state.ts
1
+ // src/internal/composer/state.ts
2
2
  let lineStartsText;
3
3
  let lineStartsCache = [];
4
4
  function getLineStarts(text) {
@@ -134,5 +134,4 @@ function exitNesting(state) {
134
134
  state.depth--;
135
135
  }
136
136
 
137
- //#endregion
138
137
  export { clearMeta, commentProps, createState, enterNesting, exitNesting, getLineStarts, hasMeta, hasNonWhitespaceBeforeOnLine, lineCol, lineIndentColumn, sameLine };
@@ -1,4 +1,4 @@
1
- //#region src/internal/composer/tags.ts
1
+ // src/internal/composer/tags.ts
2
2
  /**
3
3
  * Resolve a tag shorthand using the document's %TAG directives.
4
4
  * For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
@@ -84,5 +84,4 @@ function validateTagHandlesInDocument(docCst, state) {
84
84
  }
85
85
  }
86
86
 
87
- //#endregion
88
87
  export { parseDirective, resolveTagHandle, validateTagHandlesInDocument };
@@ -1,6 +1,6 @@
1
1
  import { lexAll } from "./lexer.js";
2
2
 
3
- //#region src/internal/cst-parser.ts
3
+ // src/internal/cst-parser.ts
4
4
  /**
5
5
  * Hardening: cap CST nesting so hostile inputs cannot overflow the stack
6
6
  * while the tree is being BUILT. Set slightly above the composer's
@@ -721,5 +721,4 @@ function parseCSTAll(text) {
721
721
  return parseDocuments(lexAll(text), text);
722
722
  }
723
723
 
724
- //#endregion
725
724
  export { parseCSTAll };
@@ -1,4 +1,4 @@
1
- //#region src/internal/diagnostics.ts
1
+ // src/internal/diagnostics.ts
2
2
  /** Error codes emitted by the lexer stage. */
3
3
  const YAML_LEX_ERROR_CODES = [
4
4
  "UnexpectedCharacter",
@@ -93,5 +93,4 @@ function isFatalCode(code) {
93
93
  return FATAL_CODES.has(code);
94
94
  }
95
95
 
96
- //#endregion
97
96
  export { FATAL_CODES, YAML_COMPOSE_ERROR_CODES, YAML_LEX_ERROR_CODES, YAML_MODIFY_ERROR_CODES, YAML_PARSE_ERROR_CODES, YAML_STRINGIFY_ERROR_CODES, isFatalCode };
package/internal/diff.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/internal/diff.ts
1
+ // src/internal/diff.ts
2
2
  /**
3
3
  * Compute edits by diffing two strings character by character.
4
4
  *
@@ -52,5 +52,4 @@ function computeEdits(original, modified) {
52
52
  }];
53
53
  }
54
54
 
55
- //#endregion
56
55
  export { computeEdits };
package/internal/fold.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/internal/fold.ts
1
+ // src/internal/fold.ts
2
2
  /**
3
3
  * Column-based line folding for a single logical scalar line (YAML 1.2 flow
4
4
  * folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
@@ -246,5 +246,4 @@ function renderBlockFolded(s, indent, explicitChomp, explicitIndent) {
246
246
  return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
247
247
  }
248
248
 
249
- //#endregion
250
249
  export { foldRenderedScalar, foldScalarLine, hasInteriorTrailingWhitespace, hasNewlineSpacesTab, isControlChar, renderBlockFolded, renderBlockLiteral, renderSingleQuotedMultiline };
package/internal/lexer.js CHANGED
@@ -1,4 +1,4 @@
1
- //#region src/internal/lexer.ts
1
+ // src/internal/lexer.ts
2
2
  /**
3
3
  * Create a new YAML scanner for the given source text.
4
4
  *
@@ -959,5 +959,4 @@ function lexAll(text) {
959
959
  return tokens;
960
960
  }
961
961
 
962
- //#endregion
963
962
  export { createScanner, lexAll };
@@ -1,7 +1,7 @@
1
1
  import { isControlChar } from "./fold.js";
2
2
  import { renderDoubleQuoted, renderSingleQuoted } from "./stringifier.js";
3
3
 
4
- //#region src/internal/requote.ts
4
+ // src/internal/requote.ts
5
5
  /**
6
6
  * True when `value` can be carried by a single-quoted flow scalar on one
7
7
  * line. Single-quoted style has exactly one escape (`''`), so any character
@@ -44,5 +44,4 @@ function requoteScalarText(text, scalar, quote, mode) {
44
44
  return renderSingleQuoted(scalar.value);
45
45
  }
46
46
 
47
- //#endregion
48
47
  export { requoteScalarText };
@@ -13,7 +13,7 @@ import { quotedStrings, quotedStringsOptions } from "./quoted-strings.js";
13
13
  import { trailingSpaces, trailingSpacesOptions } from "./trailing-spaces.js";
14
14
  import { truthy, truthyOptions } from "./truthy.js";
15
15
 
16
- //#region src/internal/rules/catalog.ts
16
+ // src/internal/rules/catalog.ts
17
17
  const catalog = [
18
18
  [parseValidity, parseValidityOptions],
19
19
  [lineLength, lineLengthOptions],
@@ -35,5 +35,4 @@ const builtinRules = catalog.map(([rule]) => rule);
35
35
  /** Per-rule options schemas — the rule-aware half of config validation. */
36
36
  const builtinOptionsSchemas = new Map(catalog.map(([rule, options]) => [rule.id, options]));
37
37
 
38
- //#endregion
39
38
  export { builtinOptionsSchemas, builtinRules };
@@ -3,7 +3,7 @@ import { YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintRule.js";
3
3
  import { nonNegativeIntegerOption, positiveIntegerOption } from "./util.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/internal/rules/colon-spacing.ts
6
+ // src/internal/rules/colon-spacing.ts
7
7
  /**
8
8
  * Options for `colon-spacing`: `maxSpacesBefore` (default 0) and
9
9
  * `maxSpacesAfter` (default 1) around the `:` indicator. `maxSpacesBefore: 0`
@@ -73,5 +73,4 @@ const colonSpacing = {
73
73
  }
74
74
  };
75
75
 
76
- //#endregion
77
76
  export { colonSpacing, colonSpacingOptions };
@@ -3,7 +3,7 @@ import { StyleVote, YamlLintDiagnostic, YamlLintSeverity } from "../../YamlLintR
3
3
  import { nonNegativeIntegerOption } from "./util.js";
4
4
  import { Schema } from "effect";
5
5
 
6
- //#region src/internal/rules/comments-spacing.ts
6
+ // src/internal/rules/comments-spacing.ts
7
7
  /**
8
8
  * Options for `comments-spacing`: `minSpacesBefore` between content and a
9
9
  * trailing `#` (default 1 — the kit's own emission spelling) and
@@ -103,5 +103,4 @@ const commentsSpacing = {
103
103
  }
104
104
  };
105
105
 
106
- //#endregion
107
106
  export { commentsSpacing, commentsSpacingOptions };
@@ -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-end.ts
5
+ // src/internal/rules/document-end.ts
6
6
  /** Options for `document-end`: require (`true`, default) or forbid the marker. */
7
7
  const documentEndOptions = Schema.Struct({
8
8
  severity: Schema.optionalKey(YamlLintSeverity),
@@ -91,5 +91,4 @@ const documentEnd = {
91
91
  }
92
92
  };
93
93
 
94
- //#endregion
95
94
  export { documentEnd, documentEndOptions };
@@ -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.23.0",
4
4
  "private": false,
5
5
  "description": "Zero-dependency YAML parsing, editing, formatting and linting as Effect schemas.",
6
6
  "keywords": [