From 4398fe580f69dee3353b935218d66218015f962d Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 23 Aug 2026 23:49:35 +0200 Subject: [PATCH 1/3] Scaffold: package contract, docker CI gate, Renovate --- .gitea/workflows/ci.yml | 9 + .gitea/workflows/renovate.yml | 24 ++ .gitignore | 2 + .npmrc | 1 + AGENTS.md | 5 +- README.md | 4 +- ci.sh | 10 + package-lock.json | 412 ++++++++++++++++++++++++++++++++++ package.json | 23 ++ renovate.json | 23 ++ src/index.test.ts | 7 + src/index.ts | 1 + todo.md | 5 +- tsconfig.json | 28 +++ 14 files changed, 548 insertions(+), 6 deletions(-) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .gitea/workflows/renovate.yml create mode 100644 .gitignore create mode 100644 .npmrc create mode 100755 ci.sh create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 renovate.json create mode 100644 src/index.test.ts create mode 100644 src/index.ts create mode 100644 tsconfig.json diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..0ec48c4 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,9 @@ +name: CI +on: push + +jobs: + gate: + runs-on: docker-host + steps: + - uses: actions/checkout@v7.0.1 + - run: bash ci.sh diff --git a/.gitea/workflows/renovate.yml b/.gitea/workflows/renovate.yml new file mode 100644 index 0000000..b8c9348 --- /dev/null +++ b/.gitea/workflows/renovate.yml @@ -0,0 +1,24 @@ +name: Renovate +on: + schedule: + - cron: '43 4 * * *' + workflow_dispatch: + +jobs: + renovate: + runs-on: docker-host + steps: + - name: Run Renovate against this repo + env: + GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_TOKEN }} + RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} + run: | + docker run --rm \ + -e GITHUB_COM_TOKEN \ + -e LOG_LEVEL=info \ + -e RENOVATE_ENDPOINT=https://gitea.larvit.se/api/v1 \ + -e RENOVATE_GIT_AUTHOR="Renovate Bot " \ + -e RENOVATE_PLATFORM=gitea \ + -e RENOVATE_REPOSITORIES=${{ github.repository }} \ + -e RENOVATE_TOKEN \ + renovate/renovate:44.39.2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1eae0cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +node_modules/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..cffe8cd --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +save-exact=true diff --git a/AGENTS.md b/AGENTS.md index bff6957..6b1dec9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,8 +49,9 @@ keep; they never reach a consumer. ## 6. The package contract - ESM only — no CommonJS build, no dual-package hazard. -- Two entrypoints: built JavaScript, and TypeScript source for Node's type stripping. Types for - both (`.d.ts` beside the JavaScript). +- One entrypoint: built JavaScript, `.d.ts` beside it. Do not add a TypeScript-source entrypoint — + Node refuses to type-strip under `node_modules` (`ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`), + so it cannot serve an npm consumer. - Published to public npmjs as `@larvit/atlassian-adf-converter`. Public source: the Gitea repo goes public, LICENSE in place, before the first publish. - Exact versions: `save-exact=true` in `.npmrc`. diff --git a/README.md b/README.md index 2e50f6f..7e24acd 100644 --- a/README.md +++ b/README.md @@ -55,5 +55,5 @@ Personas, never named consumers (AGENTS.md §7): ## The package -ESM only, no runtime dependencies, public npmjs. Two entrypoints — built JavaScript, and -TypeScript source for Node's type stripping — with types either way. Contract: `AGENTS.md` §5–6. +ESM only, no runtime dependencies, public npmjs. Built JavaScript with `.d.ts` beside it. +Contract: `AGENTS.md` §5–6. diff --git a/ci.sh b/ci.sh new file mode 100755 index 0000000..65a22d9 --- /dev/null +++ b/ci.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -euo pipefail +cd "$(dirname "$0")" + +image=node:24.19.0-alpine3.24 +in_node() { docker run --rm -v "$PWD:/app" -w /app "$image" "$@"; } + +in_node npm ci +in_node npm run typecheck +in_node npm test diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..dbce450 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,412 @@ +{ + "name": "@larvit/atlassian-adf-converter", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@larvit/atlassian-adf-converter", + "version": "0.0.0", + "license": "MIT", + "devDependencies": { + "@types/node": "24.13.3", + "typescript": "7.0.2" + }, + "engines": { + "node": ">=24" + } + }, + "node_modules/@types/node": { + "version": "24.13.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz", + "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b0e722a --- /dev/null +++ b/package.json @@ -0,0 +1,23 @@ +{ + "name": "@larvit/atlassian-adf-converter", + "version": "0.0.0", + "private": true, + "description": "Lossless conversion between Atlassian Document Format, extended markdown and HTML", + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://gitea.larvit.se/larvit/atlassian-adf-converter.git" + }, + "type": "module", + "engines": { + "node": ">=24" + }, + "scripts": { + "test": "node --test \"src/**/*.test.ts\"", + "typecheck": "tsc --noEmit" + }, + "devDependencies": { + "@types/node": "24.13.3", + "typescript": "7.0.2" + } +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..e20f1d5 --- /dev/null +++ b/renovate.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "automerge": true, + "customManagers": [ + { + "customType": "regex", + "description": "Pin the node image ci.sh runs", + "managerFilePatterns": ["ci.sh"], + "matchStrings": ["node:(?[0-9][^\\s\"']*)"], + "depNameTemplate": "node", + "datasourceTemplate": "docker" + }, + { + "customType": "regex", + "description": "Pin the Renovate image the Renovate workflow runs", + "managerFilePatterns": [".gitea/workflows/renovate.yml"], + "matchStrings": ["renovate/renovate:(?[0-9][^\\s\"']*)"], + "depNameTemplate": "renovate/renovate", + "datasourceTemplate": "docker" + } + ] +} diff --git a/src/index.test.ts b/src/index.test.ts new file mode 100644 index 0000000..fc6fe0c --- /dev/null +++ b/src/index.test.ts @@ -0,0 +1,7 @@ +import assert from 'node:assert/strict' +import test from 'node:test' + +test('the test harness runs TypeScript', () => { + const answer: number = 42 + assert.equal(answer, 42) +}) diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 0000000..336ce12 --- /dev/null +++ b/src/index.ts @@ -0,0 +1 @@ +export {} diff --git a/todo.md b/todo.md index c28256a..b5b49a3 100644 --- a/todo.md +++ b/todo.md @@ -5,7 +5,7 @@ detail is settled at its own milestone. ## Milestones -- [ ] **0 — Scaffold.** `package.json` per §6, `tsconfig.json`, `.npmrc` (`save-exact=true`), the +- [x] **0 — Scaffold.** `package.json` per §6, `tsconfig.json`, `.npmrc` (`save-exact=true`), the Docker tooling, `renovate.json` (§9), and `.gitea/workflows/ci.yml` gating branches: `runs-on: docker-host`, actions pinned to semver tags. - [ ] **1 — The flavour spec.** The markdown flavour written as this repo's specification before @@ -18,7 +18,8 @@ detail is settled at its own milestone. - [ ] **4 — Round-trip property tests** over the corpus, both ways — the thing that proves 2 and 3. - [ ] **5 — Release pipeline, ship `0.1.0`.** Publish-on-version-change (§9), `NPM_TOKEN` secret, the repo made public first (§6). `0.1.0` is the markdown round-trip: both markdown - directions, the types, `isAdfDocument`. + directions, the types, `isAdfDocument`. The maintainer's bump PR also removes + `private: true`, the guard against any earlier publish. - [ ] **6 — The HTML dialect spec.** Element-by-element mapping, the `data-*` fidelity scheme, the opaque-carry form, and the documented foreign-element set `htmlToAdf` accepts. - [ ] **7 — HTML, ship `0.2.0`.** `adfToHtml`, `htmlToAdf`, the composed `markdownToHtml` / diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..56b43c1 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "module": "NodeNext", + "moduleResolution": "NodeNext", + "target": "ESNext", + "types": ["node"], + + "allowImportingTsExtensions": true, + "erasableSyntaxOnly": true, + "isolatedModules": true, + "noEmit": true, + "verbatimModuleSyntax": true, + + "strict": true, + "exactOptionalPropertyTypes": true, + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true + }, + "include": ["src"] +} -- 2.52.0 From a5f87e42044ce04c0bf32d79f00c9d933571e136 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 23 Aug 2026 23:55:13 +0200 Subject: [PATCH 2/3] Name the build in milestone 5, run CI containers as the host user --- ci.sh | 2 +- todo.md | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ci.sh b/ci.sh index 65a22d9..33e0a62 100755 --- a/ci.sh +++ b/ci.sh @@ -3,7 +3,7 @@ set -euo pipefail cd "$(dirname "$0")" image=node:24.19.0-alpine3.24 -in_node() { docker run --rm -v "$PWD:/app" -w /app "$image" "$@"; } +in_node() { docker run --rm -u "$(id -u):$(id -g)" -e HOME=/tmp -v "$PWD:/app" -w /app "$image" "$@"; } in_node npm ci in_node npm run typecheck diff --git a/todo.md b/todo.md index b5b49a3..dc365f4 100644 --- a/todo.md +++ b/todo.md @@ -13,13 +13,16 @@ detail is settled at its own milestone. syntax from the inventory below, the opaque-carry spelling, the pipe-vs-directive table rule, and what CommonMark's raw-HTML constructs become in ADF, which has no raw-HTML node — likely the §3 element mapping, error otherwise. Start the corpus (§10) from this spec. -- [ ] **2 — `adfToMarkdown`.** +- [ ] **2 — `adfToMarkdown`.** First real code — decide here where §10's coverage check lives. - [ ] **3 — `markdownToAdf`.** The CommonMark parser is the largest single component. - [ ] **4 — Round-trip property tests** over the corpus, both ways — the thing that proves 2 and 3. - [ ] **5 — Release pipeline, ship `0.1.0`.** Publish-on-version-change (§9), `NPM_TOKEN` secret, the repo made public first (§6). `0.1.0` is the markdown round-trip: both markdown - directions, the types, `isAdfDocument`. The maintainer's bump PR also removes - `private: true`, the guard against any earlier publish. + directions, the types, `isAdfDocument`. The build lands here: a build tsconfig emitting JS + and `.d.ts` to `dist/` (the dev config's `allowImportingTsExtensions` forces `noEmit`, so + the build config needs `rewriteRelativeImportExtensions`), plus `exports`/`files` in + `package.json`. The maintainer's bump PR also removes `private: true`, the guard against any + earlier publish. - [ ] **6 — The HTML dialect spec.** Element-by-element mapping, the `data-*` fidelity scheme, the opaque-carry form, and the documented foreign-element set `htmlToAdf` accepts. - [ ] **7 — HTML, ship `0.2.0`.** `adfToHtml`, `htmlToAdf`, the composed `markdownToHtml` / -- 2.52.0 From 00c6d46f11fe55c94b94844a7fa8cfebec1b71f2 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 24 Aug 2026 00:01:20 +0200 Subject: [PATCH 3/3] Docker versioning for Renovate pins, fail the gate on zero tests, refresh status line --- README.md | 2 +- ci.sh | 8 +++++++- renovate.json | 14 ++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7e24acd..569d55c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Lossless conversion between **Atlassian Document Format** (ADF), an extended markdown flavour, and an HTML dialect. -**Status: specification only, no code yet.** Plan: `todo.md`. Decisions: `AGENTS.md`. +**Status: scaffold only, no conversion code yet.** Plan: `todo.md`. Decisions: `AGENTS.md`. ## What it is for diff --git a/ci.sh b/ci.sh index 33e0a62..3d17b21 100755 --- a/ci.sh +++ b/ci.sh @@ -7,4 +7,10 @@ in_node() { docker run --rm -u "$(id -u):$(id -g)" -e HOME=/tmp -v "$PWD:/app" - in_node npm ci in_node npm run typecheck -in_node npm test + +test_output=$(in_node npm test) +printf '%s\n' "$test_output" +if printf '%s' "$test_output" | grep -q 'ℹ tests 0'; then + echo 'the gate ran zero tests — failing instead of a vacuous green' + exit 1 +fi diff --git a/renovate.json b/renovate.json index e20f1d5..1c7b4c6 100644 --- a/renovate.json +++ b/renovate.json @@ -1,23 +1,25 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:recommended"], "automerge": true, "customManagers": [ { "customType": "regex", + "datasourceTemplate": "docker", + "depNameTemplate": "node", "description": "Pin the node image ci.sh runs", "managerFilePatterns": ["ci.sh"], "matchStrings": ["node:(?[0-9][^\\s\"']*)"], - "depNameTemplate": "node", - "datasourceTemplate": "docker" + "versioningTemplate": "docker" }, { "customType": "regex", + "datasourceTemplate": "docker", + "depNameTemplate": "renovate/renovate", "description": "Pin the Renovate image the Renovate workflow runs", "managerFilePatterns": [".gitea/workflows/renovate.yml"], "matchStrings": ["renovate/renovate:(?[0-9][^\\s\"']*)"], - "depNameTemplate": "renovate/renovate", - "datasourceTemplate": "docker" + "versioningTemplate": "docker" } - ] + ], + "extends": ["config:recommended"] } -- 2.52.0