feat!: remove optional length marker option [#N] in favor of [N]

This commit is contained in:
Johann Schopplich
2025-11-10 17:28:49 +01:00
parent 1c74f09177
commit e8ae024e54
16 changed files with 38 additions and 109 deletions

View File

@@ -7,7 +7,6 @@ import arraysTabular from '@toon-format/spec/tests/fixtures/encode/arrays-tabula
import delimiters from '@toon-format/spec/tests/fixtures/encode/delimiters.json'
import keyFolding from '@toon-format/spec/tests/fixtures/encode/key-folding.json'
import objects from '@toon-format/spec/tests/fixtures/encode/objects.json'
import options from '@toon-format/spec/tests/fixtures/encode/options.json'
import primitives from '@toon-format/spec/tests/fixtures/encode/primitives.json'
import whitespace from '@toon-format/spec/tests/fixtures/encode/whitespace.json'
import { describe, expect, it } from 'vitest'
@@ -23,7 +22,6 @@ const fixtureFiles = [
keyFolding,
delimiters,
whitespace,
options,
] as Fixtures[]
for (const fixtures of fixtureFiles) {
@@ -49,7 +47,6 @@ function resolveEncodeOptions(options?: TestCase['options']): ResolvedEncodeOpti
return {
indent: options?.indent ?? 2,
delimiter: options?.delimiter ?? DEFAULT_DELIMITER,
lengthMarker: options?.lengthMarker === '#' ? '#' : false,
keyFolding: options?.keyFolding ?? 'off',
flattenDepth: options?.flattenDepth ?? Number.POSITIVE_INFINITY,
}