5c: the build, the freeze audit and the release pipeline
CI / gate (push) Successful in 16s
CI / publish (push) Has been skipped

This commit is contained in:
2026-09-03 20:25:41 +02:00
parent 839e48d5dc
commit ece1b029ee
25 changed files with 298 additions and 79 deletions
+11
View File
@@ -0,0 +1,11 @@
import { adfToMarkdown, isAdfDocument, markdownToAdf, type AdfDocument, type ConvertErrorCode, type ParseError, type Result } from '@larvit/adf-codec'
const document: AdfDocument = { content: [{ content: [{ text: 'x', type: 'text' }], type: 'paragraph' }], type: 'doc', version: 1 }
const emitted: Result<string> = adfToMarkdown(document)
const parsed: Result<AdfDocument, ParseError> = markdownToAdf('x\n')
const guarded: boolean = isAdfDocument(document)
const code: ConvertErrorCode | undefined = emitted.ok ? undefined : emitted.error.code
const line: number | undefined = parsed.ok ? undefined : parsed.error.position.line
export const surface = { code, guarded, line }
+9
View File
@@ -0,0 +1,9 @@
import assert from 'node:assert/strict'
import { adfToMarkdown, markdownToAdf } from '@larvit/adf-codec'
const document = { content: [{ content: [{ marks: [{ type: 'em' }], text: 'x', type: 'text' }], type: 'paragraph' }], type: 'doc', version: 1 }
const emitted = adfToMarkdown(document)
assert.ok(emitted.ok, emitted.ok ? '' : emitted.error.message)
assert.deepEqual(markdownToAdf(emitted.value), { ok: true, value: document })
+12
View File
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"lib": ["ES2022"],
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noEmit": true,
"strict": true,
"target": "ES2022",
"types": []
},
"include": ["consumer.ts"]
}