chore(workspace): R5.7 delete packages/anatomy and packages/domain

The TS pipeline, domain, upload script and legacy scripts leave; xmldom out of the
lockfile, Dockerfile copies trimmed. LEDGER.tsv (407 cases) and FILES.tsv (112 files)
record each disposition; r4 and r5 census tests guard the tree, lockfile and
production imports.
This commit is contained in:
bchanot committed 2026-10-25 04:00:07 +01:00
1 parent 0da7d3ab9f
commit 1b359598ab
124 files changed
+910 -17475

No files matched your search

+22 -7
View File
@@ -2,7 +2,8 @@
* R4.8 census (plan §B.7 R4.8, RUST.md §10.10): the PDF path runs on the core and nothing of
* the TypeScript engine is left where the application or its glue could reach it. Grep facts
* over the repository, so that a reintroduced import, a dependency added back or a script
* repointed fails here before anything else.
* repointed fails here before anything else. Since R5.7 xmldom, the TypeScript domain and the
* pipeline package are gone too (`r5.census.test.ts` holds the rest of that census).
*/
import { describe, it, expect } from 'vitest'
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'
@@ -43,6 +44,7 @@ describe('the TypeScript PDF engine is gone', () => {
'@faunosteo/pdf',
'pdf-lib',
'@faunosteo/domain',
'@faunosteo/anatomy',
'@xmldom/xmldom',
]
for (const file of [
@@ -70,6 +72,8 @@ describe('the TypeScript PDF engine is gone', () => {
'@faunosteo/pdf',
'pdf-lib',
'@faunosteo/domain',
'@faunosteo/anatomy',
'@xmldom/xmldom',
'tsx',
]) {
expect(names, path).not.toContain(banned)
@@ -77,16 +81,27 @@ describe('the TypeScript PDF engine is gone', () => {
}
})
it('the lockfile holds no pdf-lib, @pdf-lib or resvg; xmldom only under packages/anatomy', () => {
it('the lockfile holds no pdf-lib, @pdf-lib, resvg or xmldom (R5.7: the pipeline left with its xmldom)', () => {
const lock = read('pnpm-lock.yaml')
for (const name of ['pdf-lib@', '@pdf-lib/', '@resvg/resvg-js']) {
expect(lock, name).not.toContain(name)
}
const importers = lock.split(/^ (?=[a-z@][^\n]*:$)/m)
const withXmldom = importers
.filter((block) => block.includes("'@xmldom/xmldom':"))
.map((block) => block.split(':')[0]!.trim())
expect(withXmldom).toEqual(['packages/anatomy'])
const section = lock.slice(
lock.indexOf('\nimporters:\n'),
lock.indexOf('\npackages:\n'),
)
const importers = section
.split(/\n(?= [^ \n][^\n]*:\n)/)
.slice(1)
.map((block) => block.slice(2, block.indexOf(':\n')))
// Non-vacuity: the split finds the importers a dependency would sit under.
expect(importers).toEqual(
expect.arrayContaining(['.', 'apps/app', 'packages/core-wasm']),
)
expect(importers).not.toContain('packages/anatomy')
expect(importers).not.toContain('packages/domain')
expect(lock).toContain("'@faunosteo/core-wasm':")
expect(lock).not.toContain('@xmldom/xmldom')
})
})