@toon-format/spec 1.3.1 → 1.3.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@toon-format/spec",
3
3
  "type": "module",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "packageManager": "pnpm@10.19.0",
6
6
  "description": "Official specification for Token-Oriented Object Notation (TOON)",
7
7
  "author": "Johann Schopplich <hello@johannschopplich.com>",
@@ -14,6 +14,14 @@
14
14
  },
15
15
  "specSection": "7"
16
16
  },
17
+ {
18
+ "name": "parses list arrays with empty items",
19
+ "input": "items[3]:\n - first\n - second\n -",
20
+ "expected": {
21
+ "items": ["first", "second", {}]
22
+ },
23
+ "specSection": "7.3"
24
+ },
17
25
  {
18
26
  "name": "parses objects with nested values inside list items",
19
27
  "input": "items[1]:\n - id: 1\n nested:\n x: 1",
@@ -91,6 +91,14 @@
91
91
  },
92
92
  "specSection": "7.1"
93
93
  },
94
+ {
95
+ "name": "parses quoted key containing brackets with inline array",
96
+ "input": "\"key[test]\"[3]: 1,2,3",
97
+ "expected": {
98
+ "key[test]": [1, 2, 3]
99
+ },
100
+ "specSection": "7.1"
101
+ },
94
102
  {
95
103
  "name": "parses quoted key with empty array",
96
104
  "input": "\"x-custom\"[0]:",
@@ -156,6 +156,27 @@
156
156
  },
157
157
  "specSection": "9"
158
158
  },
159
+ {
160
+ "name": "accepts list items with irregular nested indentation when strict=false",
161
+ "input": "items[2]:\n - id: 1\n nested:\n value: test\n - id: 2",
162
+ "expected": {
163
+ "items": [
164
+ {
165
+ "id": 1,
166
+ "nested": {
167
+ "value": "test"
168
+ }
169
+ },
170
+ {
171
+ "id": 2
172
+ }
173
+ ]
174
+ },
175
+ "options": {
176
+ "strict": false
177
+ },
178
+ "specSection": "4"
179
+ },
159
180
  {
160
181
  "name": "empty lines do not trigger validation errors",
161
182
  "input": "a: 1\n\nb: 2",