@effected/yaml 0.19.0 → 0.19.2

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 CHANGED
@@ -151,6 +151,13 @@ var YamlStringifyOptions = class extends Schema.Class("YamlStringifyOptions")({
151
151
  * `code` field: read the code from the diagnostics —
152
152
  * `error.diagnostics[0].code` is the primary failure.
153
153
  *
154
+ * @remarks
155
+ * The `message` renders each diagnostic's position 1-based
156
+ * (`line + 1:character + 1`) for human readers — a CLI printing this string
157
+ * shows the line/column a person counts in their editor. The structured
158
+ * {@link YamlDiagnostic} `line`/`character` fields stay 0-based (LSP
159
+ * convention); the offset applies to the rendered message only.
160
+ *
154
161
  * @public
155
162
  */
156
163
  var YamlParseError = class extends Schema.TaggedError()("YamlParseError", {
@@ -159,7 +166,7 @@ var YamlParseError = class extends Schema.TaggedError()("YamlParseError", {
159
166
  }) {
160
167
  get message() {
161
168
  const count = this.diagnostics.length;
162
- const summary = this.diagnostics.map((d) => `${d.code} at ${d.line}:${d.character}`).join("; ");
169
+ const summary = this.diagnostics.map((d) => `${d.code} at ${d.line + 1}:${d.character + 1}`).join("; ");
163
170
  return `YAML parse failed with ${count} error${count === 1 ? "" : "s"}: ${summary}`;
164
171
  }
165
172
  };
package/YamlLint.js CHANGED
@@ -279,11 +279,16 @@ var StyleConflict = class extends Schema.Class("StyleConflict")({
279
279
  * rule). Unobserved dimensions never conflict: they fall back to the base
280
280
  * config's defaults.
281
281
  *
282
+ * @remarks
283
+ * The `message` renders each candidate's first-seen position 1-based
284
+ * (`line + 1:character + 1`) for human readers; the structured
285
+ * {@link StyleVoteTally} `line`/`character` fields stay 0-based.
286
+ *
282
287
  * @public
283
288
  */
284
289
  var YamlStyleConflictError = class extends Schema.TaggedError()("YamlStyleConflictError", { conflicts: Schema.Array(StyleConflict) }) {
285
290
  get message() {
286
- return this.conflicts.map((conflict) => `Conflicting style for ${conflict.rule}.${conflict.dimension}: ${conflict.candidates.map((c) => `${JSON.stringify(c.value)} (${c.count}×, first at ${c.line}:${c.character})`).join(" vs ")}`).join("; ");
291
+ return this.conflicts.map((conflict) => `Conflicting style for ${conflict.rule}.${conflict.dimension}: ${conflict.candidates.map((c) => `${JSON.stringify(c.value)} (${c.count}×, first at ${c.line + 1}:${c.character + 1})`).join(" vs ")}`).join("; ");
287
292
  }
288
293
  };
289
294
  /** Group canonical vote tallies by rule, then dimension (order-preserving). */
package/index.d.ts CHANGED
@@ -274,6 +274,13 @@ declare const YamlParseError_base: Schema.Class<YamlParseError, Schema.TaggedStr
274
274
  * `code` field: read the code from the diagnostics —
275
275
  * `error.diagnostics[0].code` is the primary failure.
276
276
  *
277
+ * @remarks
278
+ * The `message` renders each diagnostic's position 1-based
279
+ * (`line + 1:character + 1`) for human readers — a CLI printing this string
280
+ * shows the line/column a person counts in their editor. The structured
281
+ * {@link YamlDiagnostic} `line`/`character` fields stay 0-based (LSP
282
+ * convention); the offset applies to the rendered message only.
283
+ *
277
284
  * @public
278
285
  */
279
286
  export declare class YamlParseError extends YamlParseError_base {
@@ -1784,6 +1791,11 @@ declare const YamlStyleConflictError_base: Schema.Class<YamlStyleConflictError,
1784
1791
  * rule). Unobserved dimensions never conflict: they fall back to the base
1785
1792
  * config's defaults.
1786
1793
  *
1794
+ * @remarks
1795
+ * The `message` renders each candidate's first-seen position 1-based
1796
+ * (`line + 1:character + 1`) for human readers; the structured
1797
+ * {@link StyleVoteTally} `line`/`character` fields stay 0-based.
1798
+ *
1787
1799
  * @public
1788
1800
  */
1789
1801
  export declare class YamlStyleConflictError extends YamlStyleConflictError_base {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/yaml",
3
- "version": "0.19.0",
3
+ "version": "0.19.2",
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"
44
+ "effect": "4.0.2"
45
45
  },
46
46
  "engines": {
47
47
  "node": ">=24.11.0"