3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 23:25:43 +01:00

Answer stability round 1: 0 🔴, 3 🟡; pin the comparison's dependency tree by date, print what reads back, let Renovate watch its image

This commit is contained in:
2026-10-14 20:00:04 +02:00
committed by Lillem4n
parent fb0bc45060
commit 63494c5657
6 changed files with 19 additions and 16 deletions
+8 -7
View File
@@ -1,15 +1,15 @@
import { createRequire } from "node:module";
import { readFileSync } from "node:fs";
import { isDeepStrictEqual } from "node:util";
import * as atlaskitJson from "@atlaskit/editor-json-transformer";
import * as atlaskitMarkdown from "@atlaskit/editor-markdown-transformer";
import * as adf2markdown from "adf2markdown";
import * as adfCodec from "@larvit/adf-codec";
import * as adfToMarkdown from "adf-to-markdown";
import adfToMd from "adf-to-md";
import * as adf2markdown from "adf2markdown";
import * as atlaskitJson from "@atlaskit/editor-json-transformer";
import * as atlaskitMarkdown from "@atlaskit/editor-markdown-transformer";
import { createRequire } from "node:module";
import * as extendedParser from "extended-markdown-adf-parser";
import { isDeepStrictEqual } from "node:util";
import * as marklassian from "marklassian";
import mdToAdf from "md-to-adf";
import { readFileSync } from "node:fs";
const { defaultSchema } = createRequire(import.meta.url)("@atlaskit/adf-schema/schema-default");
@@ -78,7 +78,8 @@ for (const [name, { toAdf, toMarkdown }] of Object.entries(converters)) {
console.log("runtime dependencies:", Object.keys(manifest.dependencies ?? {}).length);
const written = toMarkdown && show("ADF to markdown", () => toMarkdown(roundTripDoc));
if (written !== undefined) {
if (toAdf) show("round-trip deep-equal", () => isDeepStrictEqual(toAdf(written), roundTripDoc));
const readBack = toAdf && show("read back", () => toAdf(written));
if (readBack !== undefined) console.log("round-trip deep-equal:", isDeepStrictEqual(readBack, roundTripDoc));
const unknown = show("unknown node to markdown", () => toMarkdown(unknownNodeDoc));
if (toAdf && unknown !== undefined) show("unknown node read back", () => toAdf(unknown));
}
+3 -2
View File
@@ -2,9 +2,10 @@
# Re-checks the README's comparison table against each package's published version.
set -eu
here=$(cd "$(dirname "$0")" && pwd)
node_image=node:24.21.0-alpine3.24
docker run --rm --ulimit core=0 -u "$(id -u):$(id -g)" -e HOME=/tmp -v "$here:/comparison:ro" -w /tmp \
node:24.21.0-alpine3.24 sh -c '
npm install --ignore-scripts --no-audit --no-fund --silent \
"$node_image" sh -c '
npm install --before=2026-10-15 --ignore-scripts --no-audit --no-fund --silent \
@atlaskit/editor-json-transformer@10.0.0 \
@atlaskit/editor-markdown-transformer@6.3.1 \
@larvit/adf-codec@0.2.0 \