@effected/toml 0.11.0 → 0.11.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.
Files changed (3) hide show
  1. package/Toml.js +8 -1
  2. package/index.d.ts +7 -0
  3. package/package.json +2 -2
package/Toml.js CHANGED
@@ -27,13 +27,20 @@ var TomlStringifyOptions = class extends Schema.Class("TomlStringifyOptions")({
27
27
  * array shape matches `@effected/yaml`'s aggregate contract). Raised by
28
28
  * {@link Toml.parse} and the decode direction of the schema factories.
29
29
  *
30
+ * @remarks
31
+ * The `message` renders the first diagnostic's position 1-based
32
+ * (`line + 1:character + 1`) for human readers — a CLI printing this string
33
+ * shows the line/column a person counts in their editor. The structured
34
+ * {@link TomlDiagnostic} `line`/`character` fields stay 0-based (LSP
35
+ * convention); the offset applies to the rendered message only.
36
+ *
30
37
  * @public
31
38
  */
32
39
  var TomlParseError = class extends Schema.TaggedError()("TomlParseError", { diagnostics: Schema.Array(TomlDiagnostic) }) {
33
40
  get message() {
34
41
  const count = this.diagnostics.length;
35
42
  const first = this.diagnostics[0];
36
- const detail = first === void 0 ? "" : `: ${first.code} at ${first.line}:${first.character} ${first.message}`;
43
+ const detail = first === void 0 ? "" : `: ${first.code} at ${first.line + 1}:${first.character + 1} ${first.message}`;
37
44
  return `TOML parse failed with ${count} error${count === 1 ? "" : "s"}${detail}`;
38
45
  }
39
46
  };
package/index.d.ts CHANGED
@@ -127,6 +127,13 @@ declare const TomlParseError_base: Schema.Class<TomlParseError, Schema.TaggedStr
127
127
  * array shape matches `@effected/yaml`'s aggregate contract). Raised by
128
128
  * {@link Toml.parse} and the decode direction of the schema factories.
129
129
  *
130
+ * @remarks
131
+ * The `message` renders the first diagnostic's position 1-based
132
+ * (`line + 1:character + 1`) for human readers — a CLI printing this string
133
+ * shows the line/column a person counts in their editor. The structured
134
+ * {@link TomlDiagnostic} `line`/`character` fields stay 0-based (LSP
135
+ * convention); the offset applies to the rendered message only.
136
+ *
130
137
  * @public
131
138
  */
132
139
  export declare class TomlParseError extends TomlParseError_base {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/toml",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "private": false,
5
5
  "description": "TOML 1.1.0 parsing, editing and formatting as Effect schemas: typed diagnostics, a lossless CST and first-class date-time values.",
6
6
  "keywords": [
@@ -38,7 +38,7 @@
38
38
  "./package.json": "./package.json"
39
39
  },
40
40
  "peerDependencies": {
41
- "effect": "^4.0.0"
41
+ "effect": "4.0.2"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=24.11.0"