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

Answer prose round 1: 0 🔴, 4 🟡; say what each package was given, drop our row's version, state the pin invariant

This commit is contained in:
2026-10-14 20:02:04 +02:00
committed by Lillem4n
parent 63494c5657
commit faf43dcd3a
4 changed files with 13 additions and 10 deletions
+8 -6
View File
@@ -194,15 +194,17 @@ UI. They know markdown and not ADF, and rely on every spelling saying what it me
## Other ADF converters ## Other ADF converters
Serves [Goals](#goals) 3. Every npm package converting ADF to or from markdown with over 1,000 Serves [Goals](#goals) 3. The table lists every other npm package that converts ADF to or from
downloads a week, at the version named, checked 2026-10-14 by running its published code with its markdown and has over 1,000 downloads a week. On 2026-10-14,
default options on one document holding marks, a link, a mention, a status, a panel and a list, and [`converter-comparison/`](https://github.com/larvit/adf-codec/tree/main/converter-comparison) ran
on one holding a node type it cannot know: each package's published code, at the version the table names, with its default options. A package
[`converter-comparison/`](https://github.com/larvit/adf-codec/tree/main/converter-comparison). writing markdown got a document holding marks, a link, a mention, a status, a panel and a list, and
a document holding a node type it cannot know. A package reading markdown got markdown holding the
same marks and link.
| Package | Converts | ADF to markdown to ADF | A node type it does not know | Formats | Direct runtime dependencies | | Package | Converts | ADF to markdown to ADF | A node type it does not know | Formats | Direct runtime dependencies |
| --- | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- | --- |
| `@larvit/adf-codec` 0.2.0 | both ways | the same document | kept | markdown: lossless, portable, CommonMark | 0 | | `@larvit/adf-codec` | both ways | the same document | kept | markdown: lossless, portable; CommonMark in | 0 |
| `@atlaskit/editor-markdown-transformer` 6.3.1 | markdown to ADF, through `@atlaskit/editor-json-transformer` 10.0.0; ADF to markdown throws "This is not implemented yet" | – | – | markdown | 5 | | `@atlaskit/editor-markdown-transformer` 6.3.1 | markdown to ADF, through `@atlaskit/editor-json-transformer` 10.0.0; ADF to markdown throws "This is not implemented yet" | – | – | markdown | 5 |
| `adf-to-markdown` 1.0.1 | ADF to markdown | – | dropped with its text | markdown | 0 | | `adf-to-markdown` 1.0.1 | ADF to markdown | – | dropped with its text | markdown | 0 |
| `adf-to-md` 1.2.1 | ADF to markdown | – | dropped with its text, as are mentions, statuses and panels | markdown | 1 | | `adf-to-md` 1.2.1 | ADF to markdown | – | dropped with its text, as are mentions, statuses and panels | markdown | 1 |
+1 -1
View File
@@ -75,7 +75,7 @@ const show = (label, call) => {
for (const [name, { toAdf, toMarkdown }] of Object.entries(converters)) { for (const [name, { toAdf, toMarkdown }] of Object.entries(converters)) {
const manifest = JSON.parse(readFileSync(`node_modules/${name}/package.json`, "utf8")); const manifest = JSON.parse(readFileSync(`node_modules/${name}/package.json`, "utf8"));
console.log(`\n## ${name} ${manifest.version}`); console.log(`\n## ${name} ${manifest.version}`);
console.log("runtime dependencies:", Object.keys(manifest.dependencies ?? {}).length); console.log("direct runtime dependencies:", Object.keys(manifest.dependencies ?? {}).length);
const written = toMarkdown && show("ADF to markdown", () => toMarkdown(roundTripDoc)); const written = toMarkdown && show("ADF to markdown", () => toMarkdown(roundTripDoc));
if (written !== undefined) { if (written !== undefined) {
const readBack = toAdf && show("read back", () => toAdf(written)); const readBack = toAdf && show("read back", () => toAdf(written));
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# Re-checks the README's comparison table against each package's published version. # Keep these versions and --before in step with the README's comparison table.
set -eu set -eu
here=$(cd "$(dirname "$0")" && pwd) here=$(cd "$(dirname "$0")" && pwd)
node_image=node:24.21.0-alpine3.24 node_image=node:24.21.0-alpine3.24
+3 -2
View File
@@ -71,8 +71,9 @@
### 73. Announce the package where someone needing an ADF converter already reads: JRACLOUD-77436, the Atlassian developer community and Stack Overflow's ADF-to-markdown questions. ### 73. Announce the package where someone needing an ADF converter already reads: JRACLOUD-77436, the Atlassian developer community and Stack Overflow's ADF-to-markdown questions.
Each post links the GitHub repository, the README's comparison table and a README that opens with Each post links the GitHub repository, the README's comparison table and a README that opens with
what the package is. Before posting, `converter-comparison/run.sh` checks the table again with what the package is. Before posting, set `converter-comparison/run.sh`'s pins to each package's
`0.3.0` and today's date in `--before`. We draft each post for the place it goes; the maintainer posts them once latest version, `@larvit/adf-codec@0.3.0` included, and `--before` to today. Run it, then bring the
README table, its versions and its date in step with the output. We draft each post for the place it goes; the maintainer posts them once
`0.3.0` is published. Found while planning discoverability, 2026-10-04. `0.3.0` is published. Found while planning discoverability, 2026-10-04.
### 114. Build code-marked text holding no mark besides `link` and `annotation`, in every reader, and have `adfToLosslessMarkdown` carry code text holding any other mark. ### 114. Build code-marked text holding no mark besides `link` and `annotation`, in every reader, and have `adfToLosslessMarkdown` carry code text holding any other mark.